Skip to content

Commit b34d8a2

Browse files
Release 0.15.0 (#2435)
- bump versions - remove piece of code required for torch <= 1.12 - Small adjustments to release instructions regarding versions
1 parent 48e0c5d commit b34d8a2

File tree

3 files changed

+5
-8
lines changed

3 files changed

+5
-8
lines changed

setup.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
from setuptools import find_packages, setup
1616

1717

18-
VERSION = "0.14.1.dev0"
18+
VERSION = "0.15.0"
1919

2020
extras = {}
2121
extras["quality"] = [
@@ -87,7 +87,7 @@
8787
)
8888

8989
# Release checklist
90-
# 1. Change the version in __init__.py and setup.py to the release version, e.g. from "0.6.0.dev0" to "0.6.0"
90+
# 1. Change the version in __init__.py and setup.py to the release version, e.g. from "0.6.1.dev0" to "0.7.0"
9191
# 2. Check if there are any deprecations that need to be addressed for this release by searching for "# TODO" in the code
9292
# 3. Commit these changes with the message: "Release: VERSION", create a PR and merge it.
9393
# 4. Add a tag in git to mark the release: "git tag -a VERSION -m 'Adds tag VERSION for pypi' "
@@ -107,4 +107,4 @@
107107
# twine upload dist/* -r pypi
108108
# 9. Add release notes to the tag on https://github.com/huggingface/peft/releases once everything is looking hunky-dory.
109109
# Check the notes here: https://docs.google.com/document/d/1k-sOIfykuKjWcOIALqjhFKz4amFEp-myeJUJEzNgjoU/edit?usp=sharing
110-
# 10. Update the version in __init__.py, setup.py to the bumped minor version + ".dev0" (e.g. from "0.6.0" to "0.7.0.dev0")
110+
# 10. Update the version in __init__.py, setup.py to the bumped patch version + ".dev0" (e.g. from "0.7.0" to "0.7.1.dev0")

src/peft/__init__.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
1414

15-
__version__ = "0.14.1.dev0"
15+
__version__ = "0.15.0"
1616

1717
from .auto import (
1818
MODEL_TYPE_TO_PEFT_MODEL_MAPPING,

src/peft/utils/save_and_load.py

+1-4
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@
2121
import torch
2222
from huggingface_hub import file_exists, hf_hub_download
2323
from huggingface_hub.errors import EntryNotFoundError, LocalEntryNotFoundError
24-
from packaging import version
2524
from safetensors.torch import load_file as safe_load_file
2625

2726
from peft.mapping import PEFT_TYPE_TO_PREFIX_MAPPING
@@ -468,15 +467,13 @@ def renamed_dora_weights(k):
468467
return load_result
469468

470469

470+
# TODO: remove this function, use vanilla torch.load as soon as torch < 2.6.0 is no longer supported
471471
def torch_load(*args, weights_only=True, **kwargs):
472472
"""Call torch.load and handle weights_only.
473473
474474
Defaults to weights_only=True to anticipate upcoming switch on the PyTorch side.
475475
476476
"""
477-
# TODO: weights_only was added in 1.13, remove if 1.12 no longer needs to be supported
478-
if version.parse(torch.__version__) < version.parse("1.13"):
479-
return torch.load(*args, **kwargs)
480477
return torch.load(*args, weights_only=weights_only, **kwargs)
481478

482479

0 commit comments

Comments
 (0)