Skip to content

Commit bcb8d73

Browse files
committed
added raise error
1 parent 68fd0c2 commit bcb8d73

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

DeepLabStream.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -433,8 +433,12 @@ def set_up_experiment():
433433
import importlib
434434
from utils.configloader import EXP_NAME
435435
mod = importlib.import_module('experiments.experiments')
436-
experiment_class = getattr(mod, EXP_NAME)
437-
experiment = experiment_class()
436+
try:
437+
experiment_class = getattr(mod, EXP_NAME)
438+
experiment = experiment_class()
439+
except:
440+
raise ValueError(f'Experiment: {EXP_NAME} not in experiments.py.')
441+
438442
return experiment
439443

440444
def start_experiment(self):

0 commit comments

Comments
 (0)