Skip to content

Commit

Permalink
refactor config manager and support cmd overrides (#157)
Browse files Browse the repository at this point in the history
This PR supports explicit cmd overrides, to allow infra layers to
override certain options (the most important one is dump_folder)
  • Loading branch information
wanchaol authored Mar 22, 2024
1 parent f7c22c5 commit 72aad15
Show file tree
Hide file tree
Showing 4 changed files with 130 additions and 78 deletions.
12 changes: 12 additions & 0 deletions test/test_job_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,3 +28,15 @@ def test_empty_config_file(self):
config = JobConfig()
config.parse_args(["--job.config_file", fp.name])
assert config.job.description

def test_job_config_file_cmd_overrides(self):
config = JobConfig()
config.parse_args(
[
"--job.config_file",
"./train_configs/debug_model.toml",
"--job.dump_folder",
"/tmp/test_tt/",
]
)
assert config.job.dump_folder == "/tmp/test_tt/"
Loading

0 comments on commit 72aad15

Please sign in to comment.