Register
Login
Resources
Docs Blog Datasets Glossary Case Studies Tutorials & Webinars
Product
Data Engine LLMs Platform Enterprise
Pricing Explore
Connect to our Discord channel

setup.py 2.0 KB

You have to be logged in to leave a comment. Sign In
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
  1. # coding: utf-8
  2. """
  3. Deci Training Toolkit
  4. """
  5. from setuptools import setup
  6. from setuptools import find_packages
  7. README_LOCATION = "README.md"
  8. REQ_LOCATION = "requirements.txt"
  9. REQ_PRO_LOCATION = "requirements.pro.txt"
  10. VERSION_FILE = "version.txt"
  11. INIT_FILE = "src/super_gradients/__init__.py"
  12. def readme():
  13. """print long description"""
  14. with open(README_LOCATION, encoding="utf-8") as f:
  15. return f.read()
  16. def get_requirements():
  17. with open(REQ_LOCATION, encoding="utf-8") as f:
  18. requirements = f.read().splitlines()
  19. return [r for r in requirements if not r.startswith("--") and not r.startswith("#")]
  20. def get_pro_requirements():
  21. with open(REQ_PRO_LOCATION, encoding="utf-8") as f:
  22. return f.read().splitlines()
  23. def get_version():
  24. with open(VERSION_FILE, encoding="utf-8") as f:
  25. ver = f.readline()
  26. if ver.startswith("for"):
  27. with open(INIT_FILE, encoding="utf-8") as f:
  28. for line in f.readlines():
  29. if line.startswith("__version__"):
  30. ver = line.split()[-1].strip('"') + "+master"
  31. return ver
  32. setup(
  33. name="super-gradients",
  34. version=get_version(),
  35. description="SuperGradients",
  36. author="Deci AI",
  37. author_email="rnd@deci.ai",
  38. url="https://docs.deci.ai/super-gradients/documentation/source/welcome.html",
  39. keywords=["Deci", "AI", "Training", "Deep Learning", "Computer Vision", "PyTorch", "SOTA", "Recipes", "Pre Trained", "Models"],
  40. install_requires=get_requirements(),
  41. packages=find_packages(where="./src"),
  42. package_dir={"": "src"},
  43. package_data={
  44. "super_gradients.recipes": ["*.yaml", "**/*.yaml"],
  45. "super_gradients.common": ["auto_logging/auto_logging_conf.json"],
  46. "super_gradients.examples": ["*.ipynb", "**/*.ipynb"],
  47. "super_gradients": ["requirements.txt", "requirements.pro.txt"],
  48. },
  49. long_description=readme(),
  50. long_description_content_type="text/markdown",
  51. extras_require={"pro": get_pro_requirements()},
  52. )
Tip!

Press p or to see the previous file or, n or to see the next file

Comments

Loading...