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 1.7 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
  1. import sys
  2. from itertools import chain
  3. from deadtrees.constants import HOME_HTML, MODEL_CHECKPOINT_PATH, PACKAGE_DIR
  4. from deadtrees.version import __version__
  5. from setuptools import find_packages, setup
  6. if not MODEL_CHECKPOINT_PATH.exists():
  7. # develop will be in argv if we do e.g. `pip install -e .`
  8. if "develop" not in sys.argv:
  9. # logger.error("can't build a non-development package with no model")
  10. # raise FileNotFoundError(MODEL_CHECKPOINT_PATH)
  11. pass
  12. # extra package dependencies
  13. EXTRAS = {
  14. "train": ["wandb", "seaborn"],
  15. "preprocess": [
  16. "gdal",
  17. "pygeos",
  18. "bottleneck",
  19. "dask",
  20. "rioxarray>=0.4",
  21. "xarray",
  22. ],
  23. }
  24. EXTRAS["all"] = [i for i in chain.from_iterable(EXTRAS.values())]
  25. setup(
  26. name="deadtrees",
  27. version=__version__,
  28. packages=find_packages(),
  29. install_requires=[
  30. "albumentations",
  31. "dvc[s3]",
  32. "python-dotenv",
  33. "hydra-core>=1.1.0",
  34. "hydra-colorlog>=1.1.0",
  35. "pydantic",
  36. "torch>=1.10.0",
  37. "torchvision>=0.12.0",
  38. "pytorch-lightning>=1.5",
  39. "rich",
  40. "tqdm",
  41. "webdataset==0.1.62",
  42. "segmentation_models_pytorch>=0.2.1",
  43. "efficientnet-pytorch>=0.7.1",
  44. ],
  45. # install in editable mode: pip install -e ".[train,preprocess]" or
  46. # pip install -e ".[all]"
  47. extras_require=EXTRAS,
  48. entry_points={
  49. "demo": [
  50. "deadtrees=deadtrees.__main__:main",
  51. ],
  52. },
  53. package_data={
  54. "deadtrees": [
  55. # str(MODEL_CHECKPOINT_PATH.relative_to(PACKAGE_DIR) / "*.torch"),
  56. # str(HOME_HTML.relative_to(PACKAGE_DIR)),
  57. ]
  58. },
  59. )
Tip!

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

Comments

Loading...