Inform user about unconsumed config
This commit is contained in:
+12
-2
@@ -223,7 +223,12 @@ class Slate():
|
|||||||
) as run:
|
) as run:
|
||||||
runner(self, run, config)
|
runner(self, run, config)
|
||||||
|
|
||||||
assert not REQUIRE_CONFIG_CONSUMED or config == {}, ('Config was not completely consumed: ', config)
|
if config != {}:
|
||||||
|
msg = ('Config was not completely consumed: ', config)
|
||||||
|
if REQUIRE_CONFIG_CONSUMED:
|
||||||
|
raise Exception(msg)
|
||||||
|
else:
|
||||||
|
print(msg)
|
||||||
orig_config = config
|
orig_config = config
|
||||||
|
|
||||||
def _run_from_sweep(self, orig_config, p_ind):
|
def _run_from_sweep(self, orig_config, p_ind):
|
||||||
@@ -240,7 +245,12 @@ class Slate():
|
|||||||
self.deep_update(config, wandb.config)
|
self.deep_update(config, wandb.config)
|
||||||
runner(self, run, config)
|
runner(self, run, config)
|
||||||
|
|
||||||
assert config == {}, ('Config was not completely consumed: ', config)
|
if config != {}:
|
||||||
|
msg = ('Config was not completely consumed: ', config)
|
||||||
|
if REQUIRE_CONFIG_CONSUMED:
|
||||||
|
raise Exception(msg)
|
||||||
|
else:
|
||||||
|
print(msg)
|
||||||
orig_config = config
|
orig_config = config
|
||||||
|
|
||||||
def from_args(self):
|
def from_args(self):
|
||||||
|
|||||||
Reference in New Issue
Block a user