Skip to content

Commit

Permalink
don't update with empty configs
Browse files Browse the repository at this point in the history
  • Loading branch information
mschwoer committed Dec 20, 2024
1 parent 01e5da4 commit 70f57a5
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions alphadia/search_step.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ def _init_config(

config_updates = []

if user_config is not None:
if user_config:
logger.info("loading additional config provided via CLI")
# load update config from dict
if isinstance(user_config, dict):
Expand All @@ -108,15 +108,15 @@ def _init_config(
"'config' parameter must be of type 'dict' or 'Config'"
)

if cli_config is not None:
if cli_config:
logger.info("loading additional config provided via CLI parameters")
cli_config_update = Config(
cli_config, experiment_name=USER_DEFINED_CLI_PARAM
)
config_updates.append(cli_config_update)

# this needs to be last
if extra_config is not None:
if extra_config:
extra_config_update = Config(extra_config, experiment_name=MULTISTEP_SEARCH)
# need to overwrite user-defined output folder here to have correct value in config dump
extra_config[ConfigKeys.OUTPUT_DIRECTORY] = output_folder
Expand Down

0 comments on commit 70f57a5

Please sign in to comment.