resubmit 0.0.8__tar.gz → 0.0.9__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.8
3
+ Version: 0.0.9
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.8"
7
+ version = "0.0.9"
8
8
  description = "Small wrapper around submitit to simplify cluster submissions"
9
9
  readme = "README.md"
10
10
  license = { text = "MIT" }
@@ -48,7 +48,7 @@ def _submit_jobs(
48
48
 
49
49
  if debug:
50
50
  print("Debug mode: only running the first job locally")
51
- return func([jobs_list[0]])
51
+ return func(jobs_list[0])
52
52
 
53
53
  if len(jobs_list) == 0:
54
54
  print("No jobs to run exiting")
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: resubmit
3
- Version: 0.0.8
3
+ Version: 0.0.9
4
4
  Summary: Small wrapper around submitit to simplify cluster submissions
5
5
  Author: Amir Mehrpanah
6
6
  License: MIT
@@ -31,12 +31,15 @@ def test_maybe_attach_debugger_noop():
31
31
  maybe_attach_debugger(0)
32
32
 
33
33
 
34
- def test_runs_only_the_first_job_in_debug_mode(monkeypatch):
34
+ def test_runs_only_the_first_job_in_debug_mode():
35
35
  jobs = [{"id": 1}, {"id": 2}, {"id": 3}]
36
36
 
37
+ def dummy_func_single(job):
38
+ return f"ok-{job['id']}"
39
+
37
40
  res = _submit_jobs(
38
41
  jobs,
39
- dummy_func,
42
+ dummy_func_single,
40
43
  timeout_min=1,
41
44
  local_run=True,
42
45
  num_gpus=0,
@@ -48,7 +51,7 @@ def test_runs_only_the_first_job_in_debug_mode(monkeypatch):
48
51
  debug=True,
49
52
  )
50
53
  # only the first job should be run in debug mode
51
- assert res == ["ok-1"]
54
+ assert res == "ok-1"
52
55
 
53
56
 
54
57
  def test_slurm_parameters_optional(monkeypatch):
File without changes
File without changes
File without changes