peft
/
setup.py
105 строк · 4.1 Кб
1# Copyright 2023 The HuggingFace Team. All rights reserved.
2#
3# Licensed under the Apache License, Version 2.0 (the "License");
4# you may not use this file except in compliance with the License.
5# You may obtain a copy of the License at
6#
7# http://www.apache.org/licenses/LICENSE-2.0
8#
9# Unless required by applicable law or agreed to in writing, software
10# distributed under the License is distributed on an "AS IS" BASIS,
11# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12# See the License for the specific language governing permissions and
13# limitations under the License.
14
15from setuptools import find_packages, setup16
17
18VERSION = "0.9.1.dev0"19
20extras = {}21extras["quality"] = [22"black", # doc-builder has an implicit dependency on Black, see huggingface/doc-builder#43423"hf-doc-builder",24"ruff~=0.2.1",25]
26extras["docs_specific"] = [27"black", # doc-builder has an implicit dependency on Black, see huggingface/doc-builder#43428"hf-doc-builder",29]
30extras["dev"] = extras["quality"] + extras["docs_specific"]31extras["test"] = extras["dev"] + [32"pytest",33"pytest-cov",34"pytest-xdist",35"parameterized",36"datasets",37"diffusers<0.21.0",38"scipy",39]
40
41setup(42name="peft",43version=VERSION,44description="Parameter-Efficient Fine-Tuning (PEFT)",45license_files=["LICENSE"],46long_description=open("README.md", encoding="utf-8").read(),47long_description_content_type="text/markdown",48keywords="deep learning",49license="Apache",50author="The HuggingFace team",51author_email="sourab@huggingface.co",52url="https://github.com/huggingface/peft",53package_dir={"": "src"},54packages=find_packages("src"),55package_data={"peft": ["py.typed"]},56entry_points={},57python_requires=">=3.8.0",58install_requires=[59"numpy>=1.17",60"packaging>=20.0",61"psutil",62"pyyaml",63"torch>=1.13.0",64"transformers",65"tqdm",66"accelerate>=0.21.0",67"safetensors",68"huggingface_hub>=0.17.0",69],70extras_require=extras,71classifiers=[72"Development Status :: 5 - Production/Stable",73"Intended Audience :: Developers",74"Intended Audience :: Education",75"Intended Audience :: Science/Research",76"License :: OSI Approved :: Apache Software License",77"Operating System :: OS Independent",78"Programming Language :: Python :: 3",79"Programming Language :: Python :: 3.8",80"Topic :: Scientific/Engineering :: Artificial Intelligence",81],82)
83
84# Release checklist
85# 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"
86# 2. Check if there are any deprecations that need to be addressed for this release by searching for "# TODO" in the code
87# 3. Commit these changes with the message: "Release: VERSION", create a PR and merge it.
88# 4. Add a tag in git to mark the release: "git tag -a VERSION -m 'Adds tag VERSION for pypi' "
89# Push the tag to git:
90# git push --tags origin main
91# It is necessary to work on the original repository, not on a fork.
92# 5. Run the following commands in the top-level directory:
93# python setup.py bdist_wheel
94# python setup.py sdist
95# Ensure that you are on the clean and up-to-date main branch (git status --untracked-files=no should not list any
96# files and show the main branch)
97# 6. Upload the package to the pypi test server first:
98# twine upload dist/* -r pypitest
99# 7. Check that you can install it in a virtualenv by running:
100# pip install -i https://testpypi.python.org/pypi --extra-index-url https://pypi.org/simple peft
101# 8. Upload the final version to actual pypi:
102# twine upload dist/* -r pypi
103# 9. Add release notes to the tag on https://github.com/huggingface/peft/releases once everything is looking hunky-dory.
104# Check the notes here: https://docs.google.com/document/d/1k-sOIfykuKjWcOIALqjhFKz4amFEp-myeJUJEzNgjoU/edit?usp=sharing
105# 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")
106