slurmray 2.2.0__tar.gz → 2.4.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of slurmray might be problematic. Click here for more details.
- {slurmray-2.2.0 → slurmray-2.4.0}/PKG-INFO +2 -1
- {slurmray-2.2.0 → slurmray-2.4.0}/pyproject.toml +2 -1
- {slurmray-2.2.0 → slurmray-2.4.0}/slurmray/RayLauncher.py +8 -7
- {slurmray-2.2.0 → slurmray-2.4.0}/LICENSE +0 -0
- {slurmray-2.2.0 → slurmray-2.4.0}/README.md +0 -0
- {slurmray-2.2.0 → slurmray-2.4.0}/slurmray/__init__.py +0 -0
- {slurmray-2.2.0 → slurmray-2.4.0}/slurmray/assets/sbatch_template.sh +0 -0
- {slurmray-2.2.0 → slurmray-2.4.0}/slurmray/assets/spython_template.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: slurmray
|
|
3
|
-
Version: 2.
|
|
3
|
+
Version: 2.4.0
|
|
4
4
|
Summary: SlurmRay is a module for effortlessly distributing tasks on a Slurm cluster using the Ray library.
|
|
5
5
|
Home-page: https://henri-jamet.vercel.app/
|
|
6
6
|
License: Apache License
|
|
@@ -10,6 +10,7 @@ Requires-Python: ==3.9.13
|
|
|
10
10
|
Classifier: License :: Other/Proprietary License
|
|
11
11
|
Classifier: Programming Language :: Python :: 3
|
|
12
12
|
Requires-Dist: dill (>=0.3.7,<0.4.0)
|
|
13
|
+
Requires-Dist: pdoc3 (>=0.10.0,<0.11.0)
|
|
13
14
|
Requires-Dist: ray[data,serve,train,tune] (>=2.7.1,<3.0.0)
|
|
14
15
|
Project-URL: Documentation, https://henri-jamet.vercel.app/cards/documentation/slurm-ray/slurm-ray/
|
|
15
16
|
Description-Content-Type: text/markdown
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[tool.poetry]
|
|
2
2
|
name = "slurmray"
|
|
3
|
-
version = "2.
|
|
3
|
+
version = "2.4.0"
|
|
4
4
|
description = "SlurmRay is a module for effortlessly distributing tasks on a Slurm cluster using the Ray library. "
|
|
5
5
|
authors = ["Henri Jamet <henri.jamet@unil.ch>"]
|
|
6
6
|
license = "Apache License"
|
|
@@ -12,6 +12,7 @@ readme = "README.md"
|
|
|
12
12
|
python = "3.9.13"
|
|
13
13
|
dill = "^0.3.7"
|
|
14
14
|
ray = {extras = ["data", "serve", "train", "tune"], version = "^2.7.1"}
|
|
15
|
+
pdoc3 = "^0.10.0"
|
|
15
16
|
|
|
16
17
|
|
|
17
18
|
[build-system]
|
|
@@ -53,7 +53,7 @@ class RayLauncher:
|
|
|
53
53
|
raise ValueError("memory must be an int")
|
|
54
54
|
if not isinstance(max_running_time, int):
|
|
55
55
|
raise ValueError("max_running_time must be an int")
|
|
56
|
-
|
|
56
|
+
|
|
57
57
|
# Save the parameters
|
|
58
58
|
self.project_name = project_name
|
|
59
59
|
self.func = func
|
|
@@ -73,7 +73,7 @@ class RayLauncher:
|
|
|
73
73
|
self.cluster = os.path.exists("/usr/bin/sbatch")
|
|
74
74
|
|
|
75
75
|
# Create the project directory if not exists
|
|
76
|
-
self.pwd_path = os.path.join(os.path.dirname(os.path.abspath(__file__))
|
|
76
|
+
self.pwd_path = os.path.join(os.path.dirname(os.path.abspath(__file__)))
|
|
77
77
|
self.project_path = os.path.join(self.pwd_path, "logs", self.project_name)
|
|
78
78
|
if not os.path.exists(self.project_path):
|
|
79
79
|
os.makedirs(self.project_path)
|
|
@@ -150,7 +150,9 @@ class RayLauncher:
|
|
|
150
150
|
dill.dump(args, f)
|
|
151
151
|
|
|
152
152
|
# Write the python script
|
|
153
|
-
with open(
|
|
153
|
+
with open(
|
|
154
|
+
os.path.join(self.pwd_path, "assets", "spython_template.py"), "r"
|
|
155
|
+
) as f:
|
|
154
156
|
text = f.read()
|
|
155
157
|
|
|
156
158
|
text = text.replace("{{PROJECT_PATH}}", f'"{self.project_path}"')
|
|
@@ -159,8 +161,8 @@ class RayLauncher:
|
|
|
159
161
|
str(
|
|
160
162
|
f""
|
|
161
163
|
if not self.cluster
|
|
162
|
-
else "\n\taddress='auto'
|
|
163
|
-
)
|
|
164
|
+
else "\n\taddress='auto',\n\tinclude_dashboard=True,\n\tdashboard_host='0.0.0.0',\n\tdashboard_port=8888,\n"
|
|
165
|
+
),
|
|
164
166
|
)
|
|
165
167
|
with open(os.path.join(self.project_path, "spython.py"), "w") as f:
|
|
166
168
|
f.write(text)
|
|
@@ -175,7 +177,7 @@ class RayLauncher:
|
|
|
175
177
|
str: Name of the job
|
|
176
178
|
"""
|
|
177
179
|
print("Writing slurm script...")
|
|
178
|
-
template_file = os.path.join(self.pwd_path, "
|
|
180
|
+
template_file = os.path.join(self.pwd_path, "assets", "sbatch_template.sh")
|
|
179
181
|
|
|
180
182
|
JOB_NAME = "{{JOB_NAME}}"
|
|
181
183
|
NUM_NODES = "{{NUM_NODES}}"
|
|
@@ -332,7 +334,6 @@ class RayLauncher:
|
|
|
332
334
|
print("Job finished!")
|
|
333
335
|
|
|
334
336
|
|
|
335
|
-
|
|
336
337
|
# ---------------------------------------------------------------------------- #
|
|
337
338
|
# EXAMPLE OF EXECUTION #
|
|
338
339
|
# ---------------------------------------------------------------------------- #
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|