peft

Форк
0
/
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

15
from setuptools import find_packages, setup
16

17

18
VERSION = "0.9.1.dev0"
19

20
extras = {}
21
extras["quality"] = [
22
    "black",  # doc-builder has an implicit dependency on Black, see huggingface/doc-builder#434
23
    "hf-doc-builder",
24
    "ruff~=0.2.1",
25
]
26
extras["docs_specific"] = [
27
    "black",  # doc-builder has an implicit dependency on Black, see huggingface/doc-builder#434
28
    "hf-doc-builder",
29
]
30
extras["dev"] = extras["quality"] + extras["docs_specific"]
31
extras["test"] = extras["dev"] + [
32
    "pytest",
33
    "pytest-cov",
34
    "pytest-xdist",
35
    "parameterized",
36
    "datasets",
37
    "diffusers<0.21.0",
38
    "scipy",
39
]
40

41
setup(
42
    name="peft",
43
    version=VERSION,
44
    description="Parameter-Efficient Fine-Tuning (PEFT)",
45
    license_files=["LICENSE"],
46
    long_description=open("README.md", encoding="utf-8").read(),
47
    long_description_content_type="text/markdown",
48
    keywords="deep learning",
49
    license="Apache",
50
    author="The HuggingFace team",
51
    author_email="sourab@huggingface.co",
52
    url="https://github.com/huggingface/peft",
53
    package_dir={"": "src"},
54
    packages=find_packages("src"),
55
    package_data={"peft": ["py.typed"]},
56
    entry_points={},
57
    python_requires=">=3.8.0",
58
    install_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
    ],
70
    extras_require=extras,
71
    classifiers=[
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

Использование cookies

Мы используем файлы cookie в соответствии с Политикой конфиденциальности и Политикой использования cookies.

Нажимая кнопку «Принимаю», Вы даете АО «СберТех» согласие на обработку Ваших персональных данных в целях совершенствования нашего веб-сайта и Сервиса GitVerse, а также повышения удобства их использования.

Запретить использование cookies Вы можете самостоятельно в настройках Вашего браузера.