Make config consumed checks optional

This commit is contained in:
Dominik Moritz Roth 2023-07-07 16:40:30 +02:00
parent cdb1dad534
commit 0090d502f9

View File

@ -11,6 +11,8 @@ from multiprocessing import Process
import pdb
d = pdb.set_trace
REQUIRE_CONFIG_CONSUMED = False
try:
import pyslurm
except ImportError:
@ -127,7 +129,7 @@ class Slate():
def _reps_for_job(self, schedulerC, job_id):
reps = schedulerC.get('repetitions', 1)
if job_id == None:
return range(0, reps)
return list(range(0, reps))
num_jobs = self._calc_num_jobs(schedulerC)
reps_for_job = [[]] * num_jobs
for i in range(reps):
@ -221,7 +223,7 @@ class Slate():
) as run:
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
def _run_from_sweep(self, orig_config, p_ind):