Skip to content

Commit 3aef65a

Browse files
Update simple_cerebros_random_search.py
Enforce mutex parameters
1 parent d14d14f commit 3aef65a

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

cerebros/simplecerebrosrandomsearch/simple_cerebros_random_search.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -357,6 +357,13 @@ def __init__(
357357
self.maximum_units_per_level = maximum_units_per_level
358358
self.minimum_neurons_per_unit = minimum_neurons_per_unit
359359
self.maximum_neurons_per_unit = maximum_neurons_per_unit
360+
# enforce mutual exclusivity of parameters (training_data, labels) OR dataset
361+
if dataset is not None and training_data is not None and training_data:
362+
raise ValueError("If using a tf.Dataset: Set Either "
363+
"set training_data and labels to None "
364+
"or a falsy value: [] '' ... Use of the "
365+
"parameter dataset OR training_data and "
366+
"labels is mutually exclusive ")
360367
self.dataset = dataset
361368
self.activation = activation
362369
self.final_activation = final_activation

0 commit comments

Comments
 (0)