-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathpyproject.toml
More file actions
170 lines (130 loc) · 4.62 KB
/
Copy pathpyproject.toml
File metadata and controls
170 lines (130 loc) · 4.62 KB
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
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
[project]
name = "cluster-uv"
description = "cluv (from 'cluster' + 'uv') - A versatile tool to work with uv python projects across HPC clusters."
readme = "README.md"
authors = [{ name = "Fabrice Normandin", email = "normandf@mila.quebec" }]
requires-python = ">=3.11"
dynamic = ["version"]
dependencies = [
"milatools>=0.1.9",
"platformdirs>=4.9.6",
"pydantic>=2.0",
"pyyaml>=6.0.3",
"rich>=13.0",
"rich-argparse>=1.7.2",
"simple-parsing>=0.1.8",
]
[project.scripts]
cluv = "cluv.__main__:main"
[project.optional-dependencies]
hydra = [
"hydra-core>=1.3.2",
"hydra-submitit-launcher>=1.2.0",
"hydra-zen>=0.16.0",
"remote-slurm-executor",
]
[dependency-groups]
dev = [
"pytest>=9.0.2",
"uv-dynamic-versioning>=0.2.0",
"mkdocs<2.0.0",
"mkdocs-material>=9.5.44",
"mkdocstrings[python]>=0.27.0",
"pytest-asyncio>=1.3.0",
"pytest-cov>=7.0.0",
"pytest-timeout>=2.3.1",
"ruff",
"pytest-skip-slow>=0.0.5",
"torchvision>=0.25.0",
]
[tool.pytest.ini_options]
testpaths = ["cluv", "tests"]
norecursedirs = [".venv"]
addopts = ["--doctest-modules"]
asyncio_mode = "auto"
markers = [
"integration: requires live SSH connections to real clusters (deselect with '-m not integration')",
]
[tool.uv]
managed = true
[tool.uv.workspace]
members = ["examples/pytorch-example", "examples/hydra_example"]
[tool.uv.sources]
remote-slurm-executor = { git = "https://www.github.com/lebrice/remote-slurm-executor" }
[tool.uv-dynamic-versioning]
vcs = "git"
style = "semver"
[tool.ruff]
line-length = 99
[tool.docformatter]
wrap-summaries = 99
wrap-descriptions = 99
[build-system]
requires = ["hatchling", "uv-dynamic-versioning"]
build-backend = "hatchling.build"
[tool.hatch.build.targets.wheel]
packages = ["cluv", "hydra_plugins"]
[tool.hatch.build.targets.wheel.force-include]
"scripts" = "cluv/templates/scripts"
"pyproject.toml" = "cluv/templates/pyproject.toml"
[tool.hatch.version]
source = "uv-dynamic-versioning"
[tool.coverage.run]
source = ["cluv"]
[tool.coverage.report]
show_missing = true
### -------------- CLUV CONFIG -------------- ###
[tool.cluv]
# All variables below can be overridden per cluster (except data_source).
# Job script to use by default when one isn't passed to the `submit` command, on all clusters.
# Can also be overridden per job submission.
job_script_path = "scripts/job.sh"
# Where to store job results by default.
results_path = "$SCRATCH/logs/cluv"
# On clusters, Cluv creates a symlink (a shortcut) in your project folder to the results_path dir.
# This makes it easier to keep your project in $HOME and to see the results which are on $SCRATCH.
results_symlink = "logs"
## The path where the project should be replicated on remote clusters.
# project_dir = "$HOME/<project_name>"
## Where to read the data from when synchronizing data to all clusters.
# data_source = "<cluster>:<dataset_path_on_the_cluster>"
## Where the dataset should be replicated on all clusters.
# datasets_path = "<path_to_copy_datasets_on_all_clusters>"
[tool.cluv.env]
# Environment variables applied when using Slurm commands on all clusters.
# Assume that compute nodes don't have internet access by default. Override below when they do.
UV_OFFLINE = "1"
WANDB_MODE = "offline"
[tool.cluv.local]
# Settings (environment variables) applied when using cluv on a local machine (not on a Slurm cluster).
# Fake "$SCRATCH" directory to use when not on a Slurm cluster.
# This makes the examples runnable either from a laptop or from a Slurm cluster.
env = { SCRATCH = "$HOME/scratch" }
[tool.cluv.sbatch_args]
# sbatch flags applied on all clusters. CLI-supplied flags take precedence.
time = "3:00:00"
requeue = true
### -------------- Clusters Config -------------- ###
[tool.cluv.clusters.mila]
# Overrides specific to the Mila cluster.
env = { UV_OFFLINE = "0", WANDB_MODE = "online" }
[tool.cluv.clusters.tamia]
[tool.cluv.clusters.killarney]
# For example, you might not have a $SCRATCH on Killarney. This can be overwritten here.
results_path = "$HOME/logs/cluv"
[tool.cluv.clusters.vulcan]
[tool.cluv.clusters.rorqual]
sbatch_args = { account = "rrg-bengioy-ad" }
[tool.cluv.clusters.fir]
env = { UV_OFFLINE = "0", WANDB_MODE = "online" }
sbatch_args = { account = "rrg-bengioy-ad" }
[tool.cluv.clusters.nibi]
env = { UV_OFFLINE = "0", WANDB_MODE = "online" }
sbatch_args = { account = "rrg-bengioy-ad" }
[tool.cluv.clusters.trillium]
sbatch_args = { account = "rrg-bengioy-ad" }
[tool.cluv.clusters.trillium-gpu]
sbatch_args = { account = "rrg-bengioy-ad" }
[tool.cluv.clusters.narval]
# Mila doesn't have an allocation on Narval anymore.
sbatch_args = { account = "def-bengioy" }