Make config consumed checks optional
This commit is contained in:
parent
cdb1dad534
commit
0090d502f9
@ -11,6 +11,8 @@ from multiprocessing import Process
|
|||||||
import pdb
|
import pdb
|
||||||
d = pdb.set_trace
|
d = pdb.set_trace
|
||||||
|
|
||||||
|
REQUIRE_CONFIG_CONSUMED = False
|
||||||
|
|
||||||
try:
|
try:
|
||||||
import pyslurm
|
import pyslurm
|
||||||
except ImportError:
|
except ImportError:
|
||||||
@ -127,7 +129,7 @@ class Slate():
|
|||||||
def _reps_for_job(self, schedulerC, job_id):
|
def _reps_for_job(self, schedulerC, job_id):
|
||||||
reps = schedulerC.get('repetitions', 1)
|
reps = schedulerC.get('repetitions', 1)
|
||||||
if job_id == None:
|
if job_id == None:
|
||||||
return range(0, reps)
|
return list(range(0, reps))
|
||||||
num_jobs = self._calc_num_jobs(schedulerC)
|
num_jobs = self._calc_num_jobs(schedulerC)
|
||||||
reps_for_job = [[]] * num_jobs
|
reps_for_job = [[]] * num_jobs
|
||||||
for i in range(reps):
|
for i in range(reps):
|
||||||
@ -221,7 +223,7 @@ class Slate():
|
|||||||
) as run:
|
) as run:
|
||||||
runner(self, run, config)
|
runner(self, run, config)
|
||||||
|
|
||||||
assert config == {}, ('Config was not completely consumed: ', config)
|
assert not REQUIRE_CONFIG_CONSUMED or config == {}, ('Config was not completely consumed: ', config)
|
||||||
orig_config = config
|
orig_config = config
|
||||||
|
|
||||||
def _run_from_sweep(self, orig_config, p_ind):
|
def _run_from_sweep(self, orig_config, p_ind):
|
||||||
|
Loading…
Reference in New Issue
Block a user