File tree 3 files changed +5
-8
lines changed
3 files changed +5
-8
lines changed Original file line number Diff line number Diff line change 15
15
from setuptools import find_packages , setup
16
16
17
17
18
- VERSION = "0.14.1.dev0 "
18
+ VERSION = "0.15.0 "
19
19
20
20
extras = {}
21
21
extras ["quality" ] = [
87
87
)
88
88
89
89
# 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"
91
91
# 2. Check if there are any deprecations that need to be addressed for this release by searching for "# TODO" in the code
92
92
# 3. Commit these changes with the message: "Release: VERSION", create a PR and merge it.
93
93
# 4. Add a tag in git to mark the release: "git tag -a VERSION -m 'Adds tag VERSION for pypi' "
107
107
# twine upload dist/* -r pypi
108
108
# 9. Add release notes to the tag on https://github.com/huggingface/peft/releases once everything is looking hunky-dory.
109
109
# 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")
Original file line number Diff line number Diff line change 12
12
# See the License for the specific language governing permissions and
13
13
# limitations under the License.
14
14
15
- __version__ = "0.14.1.dev0 "
15
+ __version__ = "0.15.0 "
16
16
17
17
from .auto import (
18
18
MODEL_TYPE_TO_PEFT_MODEL_MAPPING ,
Original file line number Diff line number Diff line change 21
21
import torch
22
22
from huggingface_hub import file_exists , hf_hub_download
23
23
from huggingface_hub .errors import EntryNotFoundError , LocalEntryNotFoundError
24
- from packaging import version
25
24
from safetensors .torch import load_file as safe_load_file
26
25
27
26
from peft .mapping import PEFT_TYPE_TO_PREFIX_MAPPING
@@ -468,15 +467,13 @@ def renamed_dora_weights(k):
468
467
return load_result
469
468
470
469
470
+ # TODO: remove this function, use vanilla torch.load as soon as torch < 2.6.0 is no longer supported
471
471
def torch_load (* args , weights_only = True , ** kwargs ):
472
472
"""Call torch.load and handle weights_only.
473
473
474
474
Defaults to weights_only=True to anticipate upcoming switch on the PyTorch side.
475
475
476
476
"""
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 )
480
477
return torch .load (* args , weights_only = weights_only , ** kwargs )
481
478
482
479
You can’t perform that action at this time.
0 commit comments