-
Notifications
You must be signed in to change notification settings - Fork 11
/
setup.py
39 lines (30 loc) · 1.15 KB
/
setup.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
import subprocess
import os
from setuptools import find_packages, setup
from setuptools.command.install import install
with open("README.md", "r", encoding="utf-8") as f:
long_description = f.read()
class CustomInstall(install):
def run(self):
install.run(self)
os.system('pip3 install -r requirements.txt --ignore-installed')
os.system('pip3 uninstall transformers -y')
os.system(
"pip install git+https://github.com/jordiclive/transformers.git@controlprefixes --ignore-installed"
)
os.system('pip3 install torchtext==0.8.0 torch==1.7.1')
# in the setup function:
setup(
name="ControlPrefixes",
version="0.1.0",
python_requires='>=3.7',
description="Code for Control Prefixes for Parameter-Efficient Text Generation",
long_description=long_description,
long_description_content_type="text/markdown",
author="Jordan Clive",
author_email="[email protected]",
url="https://github.com/jordiclive/ControlPrefixes",
download_url="https://github.com/jordiclive/ControlPrefixes.git",
license="MIT License",
cmdclass={'install': CustomInstall},
)