From 0090d502f97a587351db7d2e69882e5d7b273465 Mon Sep 17 00:00:00 2001 From: Dominik Roth Date: Fri, 7 Jul 2023 16:40:30 +0200 Subject: [PATCH] Make config consumed checks optional --- slate/slate.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/slate/slate.py b/slate/slate.py index a29e7a7..5329172 100644 --- a/slate/slate.py +++ b/slate/slate.py @@ -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):