-
Notifications
You must be signed in to change notification settings - Fork 121
/
setup.py
78 lines (71 loc) · 2.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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
import setuptools
import sys
if "apex" in sys.argv:
sys.argv.remove("apex")
# install requirements for mixed precision training
import subprocess
import torch
TORCH_MAJOR = int(torch.__version__.split(".")[0])
if TORCH_MAJOR == 0:
subprocess.run(
[
sys.executable,
"-m",
"pip",
"install",
"git+https://github.com/NVIDIA/apex",
"-v",
"--no-cache-dir",
]
)
else:
subprocess.run(
[
sys.executable,
"-m",
"pip",
"install",
"git+https://github.com/NVIDIA/apex",
"-v",
"--no-cache-dir",
"--global-option=--cpp_ext",
"--global-option=--cuda_ext",
]
)
with open("README.md", "r") as f:
long_description = f.read()
setuptools.setup(
name="torch-lr-finder",
version="0.2.2",
author="David Silva",
author_email="[email protected]",
description="Pytorch implementation of the learning rate range test",
long_description=long_description,
long_description_content_type="text/markdown",
url="https://github.com/davidtvs/pytorch-lr-finder",
packages=setuptools.find_packages(exclude=["examples", "images"]),
classifiers=[
"Programming Language :: Python",
"License :: OSI Approved :: MIT License",
"Intended Audience :: Developers",
"Intended Audience :: Science/Research",
"Intended Audience :: Education",
"Topic :: Software Development",
"Topic :: Scientific/Engineering :: Artificial Intelligence",
],
python_requires=">=3.5.9",
install_requires=["matplotlib", "numpy", "torch>=0.4.1", "tqdm", "packaging"],
extras_require={
"tests": ["pytest", "pytest-cov", "pytest-mock"],
"dev": [
"pytest",
"pytest-cov",
"pytest-mock",
"flake8",
"black",
"pep8-naming",
"torchvision",
"ipywidgets",
],
},
)