resubmit 0.0.5__tar.gz → 0.0.7__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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: resubmit
3
- Version: 0.0.5
3
+ Version: 0.0.7
4
4
  Summary: Small wrapper around submitit to simplify cluster submissions
5
5
  Author: Amir Mehrpanah
6
6
  License: MIT
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "resubmit"
7
- version = "0.0.5"
7
+ version = "0.0.7"
8
8
  description = "Small wrapper around submitit to simplify cluster submissions"
9
9
  readme = "README.md"
10
10
  license = { text = "MIT" }
@@ -153,6 +153,7 @@ def submit_jobs(
153
153
  block: bool = False,
154
154
  prompt: bool = True,
155
155
  local_run: bool = False,
156
+ job_name: Optional[str] = "resubmit",
156
157
  slurm_additional_parameters: Dict | None = None,
157
158
  ) -> Any:
158
159
  """
@@ -193,5 +194,6 @@ def submit_jobs(
193
194
  block=block,
194
195
  prompt=prompt,
195
196
  local_run=local_run,
197
+ job_name=job_name,
196
198
  slurm_additional_parameters=slurm_additional_parameters,
197
199
  )
@@ -15,6 +15,7 @@ def _submit_jobs(
15
15
  block: bool,
16
16
  prompt: bool,
17
17
  local_run: bool,
18
+ job_name: Optional[str] = "resubmit",
18
19
  slurm_additional_parameters: Optional[Dict] = None,
19
20
  ):
20
21
  """Submit jobs described by `jobs_args` where each entry is a dict of kwargs for `func`.
@@ -48,18 +49,13 @@ def _submit_jobs(
48
49
  print("submitting jobs")
49
50
  executor = submitit.AutoExecutor(folder=folder)
50
51
 
51
- # default slurm params (keep cluster-specific options out unless explicitly set)
52
- if slurm_additional_parameters is None:
53
- slurm_additional_parameters = {"gpus": num_gpus}
54
- else:
55
- slurm_additional_parameters = dict(slurm_additional_parameters)
56
- slurm_additional_parameters.setdefault("gpus", num_gpus)
57
-
58
52
  print("Slurm additional parameters:", slurm_additional_parameters)
59
53
 
60
54
  executor.update_parameters(
55
+ name=job_name,
61
56
  timeout_min=timeout_min,
62
57
  cpus_per_task=cpus_per_task,
58
+ gpus_per_node=num_gpus,
63
59
  mem_gb=mem_gb,
64
60
  slurm_additional_parameters=slurm_additional_parameters,
65
61
  )
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: resubmit
3
- Version: 0.0.5
3
+ Version: 0.0.7
4
4
  Summary: Small wrapper around submitit to simplify cluster submissions
5
5
  Author: Amir Mehrpanah
6
6
  License: MIT
File without changes
File without changes
File without changes