[2810] Allow private config to override output directories and filename - #2811
Conversation
|
@grassesi : could you also have a look? |
|
@evenmn : could you lint please :) |
clessig
left a comment
There was a problem hiding this comment.
Thanks, this is a useful feature. Some minor comments. We also should merge this into the preops branch.
Signed-off-by: evenmn <evenmn@fys.uio.no>
Signed-off-by: evenmn <evenmn@fys.uio.no>
|
@clessig Thank you for the comments. Please have a look at my answers and latest commits |
clessig
left a comment
There was a problem hiding this comment.
Thanks for the changes! Some minor comments left. For the functions we anyway touch, we should be clear if config is "model config" or "private config". It makes the code much more readable.
| def get_path_run(config: Config) -> Path: | ||
| """Get the current runs results_path for storing run results and logs.""" | ||
| return _get_shared_wg_path() / "results" / get_run_id_from_config(config) | ||
| return _get_path_output(config, "path_results", "results", get_run_id_from_config(config)) |
There was a problem hiding this comment.
This function doesn't make sense--we don't the path for a run. Can you remove it. The function is used in trainer.py and in train_logger.py. It's calls should be replace by calls to get_path_logs()--but please check that you agree.
There was a problem hiding this comment.
I agree, get_path_run was replaced by get_path_results
evenmn
left a comment
There was a problem hiding this comment.
I have verified that the logs and models are written to the paths specified in private_config during training, and that the results are written to the expected file during inference
| def get_path_run(config: Config) -> Path: | ||
| """Get the current runs results_path for storing run results and logs.""" | ||
| return _get_shared_wg_path() / "results" / get_run_id_from_config(config) | ||
| return _get_path_output(config, "path_results", "results", get_run_id_from_config(config)) |
There was a problem hiding this comment.
I agree, get_path_run was replaced by get_path_results
clessig
left a comment
There was a problem hiding this comment.
Thanks for the changes. Looks great now--approving.
Can you open the PR also against the preops branch.
Description
Adds optional
private_configoverrides for model, log, and results directories, plus the output filename. Explicit directories are used directly, without appending the run ID. Existing defaults remain when overrides are omitted.When multiple samples are generated,
rankcan be used to separate the different samples:Other variables that can be used in the filename are
epochandstep.Checkpoint loading and logging use the selected private configuration.
Issue Number
Closes #2810
Is this PR a draft? Mark it as draft.
Checklist before asking for review
./scripts/actions.sh lint./scripts/actions.sh unit-test./scripts/actions.sh integration-testlaunch-slurm.py --time 60FastEvaluation