Skip to content

Commit f0e9ea7

Browse files
committed
small edit
1 parent cbd89d3 commit f0e9ea7

File tree

1 file changed

+7
-9
lines changed

1 file changed

+7
-9
lines changed

n3fit/src/n3fit/checks.py

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -41,15 +41,12 @@ def _is_floatable(num):
4141
return False
4242

4343
def check_hyperopt_parameters(parameters, trial_specs):
44-
if trial_specs:
45-
tmp = []
46-
for param in HYPEROPTIMIZED_PARAMETERS:
47-
if param in parameters.keys():
48-
tmp.append(param)
49-
if tmp:
50-
raise CheckError(f"Parameters {tmp} already contained in the hyperoptimization scan. Please remove them from the parameters namespace.")
51-
else:
52-
log.warning("No trials specifications provided. Using fixed hyperparameters")
44+
tmp = []
45+
for param in HYPEROPTIMIZED_PARAMETERS:
46+
if param in parameters.keys():
47+
tmp.append(param)
48+
if tmp:
49+
raise CheckError(f"Parameters {tmp} already contained in the hyperoptimization scan. Please remove them from the parameters namespace.")
5350

5451
# Checks on the NN parameters
5552
def check_existing_parameters(parameters):
@@ -241,6 +238,7 @@ def wrapper_check_NN(tensorboard, save, load, parameters, trial_specs):
241238
if trial_specs:
242239
check_hyperopt_parameters(parameters, trial_specs)
243240
else:
241+
log.warning("No trials specifications provided. Using fixed hyperparameters")
244242
check_existing_parameters(parameters)
245243
check_consistent_layers(parameters)
246244
check_stopping(parameters)

0 commit comments

Comments
 (0)