slurmray 3.3.2__tar.gz → 3.5.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-3.3.2 → slurmray-3.5.0}/PKG-INFO +1 -1
- {slurmray-3.3.2 → slurmray-3.5.0}/pyproject.toml +1 -1
- {slurmray-3.3.2 → slurmray-3.5.0}/slurmray/RayLauncher.py +14 -6
- {slurmray-3.3.2 → slurmray-3.5.0}/LICENSE +0 -0
- {slurmray-3.3.2 → slurmray-3.5.0}/README.md +0 -0
- {slurmray-3.3.2 → slurmray-3.5.0}/slurmray/__init__.py +0 -0
- {slurmray-3.3.2 → slurmray-3.5.0}/slurmray/assets/sbatch_template.sh +0 -0
- {slurmray-3.3.2 → slurmray-3.5.0}/slurmray/assets/slurmray_server.sh +0 -0
- {slurmray-3.3.2 → slurmray-3.5.0}/slurmray/assets/slurmray_server_template.py +0 -0
- {slurmray-3.3.2 → slurmray-3.5.0}/slurmray/assets/spython_template.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[tool.poetry]
|
|
2
2
|
name = "slurmray"
|
|
3
|
-
version = "3.
|
|
3
|
+
version = "3.5.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"
|
|
@@ -132,10 +132,17 @@ class RayLauncher:
|
|
|
132
132
|
# Determine the path to the file
|
|
133
133
|
local_path = file_path
|
|
134
134
|
local_path_from_pwd = os.path.relpath(local_path, self.pwd_path)
|
|
135
|
-
cluster_path = os.path.join("/users", self.server_username, "slurmray-server",
|
|
135
|
+
cluster_path = os.path.join("/users", self.server_username, "slurmray-server", local_path_from_pwd)
|
|
136
136
|
|
|
137
137
|
# Create the directory if not exists
|
|
138
|
-
|
|
138
|
+
|
|
139
|
+
stdin, stdout, stderr = ssh_client.exec_command(f"mkdir -p '{os.path.dirname(cluster_path)}'")
|
|
140
|
+
while True:
|
|
141
|
+
line = stdout.readline()
|
|
142
|
+
if not line:
|
|
143
|
+
break
|
|
144
|
+
print(line, end="")
|
|
145
|
+
time.sleep(1) # Wait for the directory to be created
|
|
139
146
|
|
|
140
147
|
# Copy the file to the server
|
|
141
148
|
sftp.put(file_path, cluster_path)
|
|
@@ -411,10 +418,11 @@ class RayLauncher:
|
|
|
411
418
|
# Add slurmray --pre
|
|
412
419
|
lines.append("slurmray --pre")
|
|
413
420
|
# Adapt torch version
|
|
414
|
-
lines = [re.sub(r'\ntorch==.*', '
|
|
415
|
-
lines = [re.sub(r'\ntorchvision==.*', '
|
|
416
|
-
lines = [re.sub(r'\ntorchaudio==.*', '
|
|
417
|
-
lines = [re.sub(r'\nbitsandbytes==.*', '
|
|
421
|
+
lines = [re.sub(r'\ntorch==.*', '`\ntorch', line) for line in lines]
|
|
422
|
+
lines = [re.sub(r'\ntorchvision==.*', '\ntorchvision', line) for line in lines]
|
|
423
|
+
lines = [re.sub(r'\ntorchaudio==.*', '\ntorchaudio', line) for line in lines]
|
|
424
|
+
lines = [re.sub(r'\nbitsandbytes==.*', '\nbitsandbytes', line) for line in lines]
|
|
425
|
+
lines = [re.sub(r'\nslurmray==.*', '\n', line) for line in lines]
|
|
418
426
|
|
|
419
427
|
with open(f"{self.project_path}/requirements.txt", 'w') as file:
|
|
420
428
|
file.writelines(lines)
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|