Repository navigation
|
I'm using the override_dirname as the folder to store checkpoints and logs. This does store the logs, but since my configs contain overrides with For more details, here is how I'm overriding some configs. If there is an alternative where I can just not use In |
Replies: 2 comments
There are certainly ways to avoid using a slash Instead of changing the overrides that you use, I'd recommend using an OmegaConf resolver to sanitize the override_dirname. This would mean replacing |
|
With Hydra 1.4 or newer, use Register a resolver before Hydra starts: from omegaconf import OmegaConf
OmegaConf.register_resolver(
"pathsafe",
lambda value: str(value).replace("/", "_").replace("\\", "_"),
)Then, for example: hydra:
sweep:
subdir: '${hydra_override_dirname:{element_resolver: pathsafe}}'
|
With Hydra 1.4 or newer, use
${hydra_override_dirname:}instead of the deprecatedhydra.job.override_dirnamefield. Itselement_resolveroption can sanitize each override before assembling the directory name.Register a resolver before Hydra starts:
Then, for example:
models/temporal_nets=net2then contributesmodels_temporal_nets=net2to the directory name. Your config layout and actual overrides stay the same.