Skip to content

Commit

Permalink
Convert - dashes to _ underscores when parsing CLI arg extra globals.
Browse files Browse the repository at this point in the history
  • Loading branch information
bpkroth committed Aug 19, 2024
1 parent d53fdbc commit 2493fea
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions mlos_bench/mlos_bench/tests/launcher_parse_args_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -260,9 +260,12 @@ def test_launcher_args_parse_3(config_paths: List[str]) -> None:
" ".join([f"--config-path {config_path}" for config_path in config_paths])
+ f" --config {config_file}"
+ f" --globals {globals_file}"
+ " --max-suggestions 10" # check for - to _ conversion too
)
launcher = _get_launcher(__name__, cli_args)

assert launcher.optimizer.max_suggestions == 10 # from CLI args

# Check that CLI file parameter overrides JSON config:
assert isinstance(launcher.scheduler, SyncScheduler)
# from test-cli-config.jsonc (should override scheduler config file)
Expand Down

0 comments on commit 2493fea

Please sign in to comment.