-
Notifications
You must be signed in to change notification settings - Fork 0
/
pyproject.toml
95 lines (81 loc) · 3.14 KB
/
pyproject.toml
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
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
# example https://packaging.python.org/en/latest/guides/writing-pyproject-toml/
[project]
name = "torch_practice"
version = "0.0.1"
description = "Practice Pytorch, Ray, and packaging."
authors = [{ name = " Santiago Miranda", email = "[email protected]" }]
readme = "README.md"
license = { text = "MIT License" }
requires-python = ">=3.10"
keywords = ["sample project", "pytorch", "ray"]
classifiers = [
"Development Status :: 3 - Alpha",
"Intended Audience :: Developers",
"Intended Audience :: Science/Research",
"License :: OSI Approved :: MIT License",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Operating System :: Unix",
]
dependencies = [
"matplotlib>=3.9.0",
"ray[train,tune]>=2.39.0",
"tensorboard>=2.18.0",
"torchinfo>=1.8.0",
"tqdm>=4.66.5",
]
[project.optional-dependencies]
cpu = ["torch>=2.5.1", "torchvision>=0.20.1"]
cu121 = ["torch>=2.5.1", "torchvision>=0.20.1"]
cu124 = ["torch>=2.5.1", "torchvision>=0.20.1"]
ipynb = ["ipykernel>6.29"]
[project.urls]
Homepage = "https://github.com/ghsanti/learn_python"
Repository = "https://github.com/ghsanti/learn_python"
Issues = "https://github.com/ghsanti/learn_python/issues"
Documentation = "https://readthedocs.org"
Changelog = "https://github.com/ghsanti/learn_python/blob/main/CHANGELOG.md"
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
[tool.hatch.build.targets.wheel]
packages = ["src/torch_practice"]
# Exclude any files ending with '_test.py'
exclude = ["*_test.py"]
# dev dependencies. --dev or use --group name for other groups.
[dependency-groups]
dev = [ # advantage: 'dev' is synced by default. `uv add --dev pkgname`
"coverage>=7.6.9",
"pip>=24.3.1",
"pre-commit>=4.0.1",
"pyright>=1.1.390",
"pytest>=8.3.4",
"ruff>=0.8.2",
]
[tool.uv]
conflicts = [[{ extra = "cpu" }, { extra = "cu121" }, { extra = "cu124" }]]
[tool.uv.sources]
torch = [
{ index = "pytorch-cpu", extra = "cpu", marker = "platform_system != 'Darwin' and platform_machine != 'aarch64'" },
{ index = "pytorch-cu121", extra = "cu121", marker = "platform_system != 'Darwin' and platform_machine != 'aarch64' " },
{ index = "pytorch-cu124", extra = "cu124", marker = "platform_system != 'Darwin' and platform_machine != 'aarch64'" },
]
torchvision = [ # this is for linux arm; if you have mac silicon on linux docker, it should get it.
{ index = "pytorch-cpu", extra = "cpu", marker = "platform_system != 'Darwin' and platform_machine != 'aarch64'" },
{ index = "pytorch-cu121", extra = "cu121", marker = "platform_system != 'Darwin' and platform_machine != 'aarch64' " },
{ index = "pytorch-cu124", extra = "cu124", marker = "platform_system != 'Darwin' and platform_machine != 'aarch64' " },
]
[[tool.uv.index]]
name = "pytorch-cpu"
url = "https://download.pytorch.org/whl/cpu"
explicit = true
[[tool.uv.index]]
name = "pytorch-cu121"
url = "https://download.pytorch.org/whl/cu121"
explicit = true
[[tool.uv.index]]
name = "pytorch-cu124"
url = "https://download.pytorch.org/whl/cu124"
explicit = true