diff --git a/.gitignore b/.gitignore index 43d51e5..83cfc3f 100644 --- a/.gitignore +++ b/.gitignore @@ -4,6 +4,7 @@ runs/* wandb/ outputs/ multirun/ +metrics/ # Python-generated files __pycache__/ diff --git a/configs/README.md b/configs/README.md index 21f95b1..91208f2 100644 --- a/configs/README.md +++ b/configs/README.md @@ -49,4 +49,6 @@ python scripts/train.py --cfg job - **Adding a new group**: Create a subdirectory in `configs/` and register the new dataclass in `src/brittle_star_project/configs/register_configs.py`. - **Typo Catching**: If you see a `ConfigAttributeError`, check for typos in your YAML keys or CLI overrides. -- **Output Redirection**: Hydra automatically creates `outputs/` directories. On HPC, ensure `hydra.run.dir` is set to a fast scratch storage. +- **Output Redirection**: We use `experiment.base_run_dir` to configure where logs and models are stored (defaults to `runs/`). + - To change it locally: `python scripts/train.py experiment.base_run_dir=/path/to/custom/dir` + - On HPC, ensure this points to a fast scratch storage. diff --git a/configs/main_config.yaml b/configs/main_config.yaml index 7e3d642..a4efbb7 100644 --- a/configs/main_config.yaml +++ b/configs/main_config.yaml @@ -12,3 +12,9 @@ defaults: - arena: default - environment: directed_locomotion - _self_ + +hydra: + job: + chdir: True + run: + dir: ${experiment.base_run_dir}/${experiment.exp_name}/${now:%Y-%m-%d}/${now:%H-%M-%S} diff --git a/src/brittle_star_project/configs/config_experiment.py b/src/brittle_star_project/configs/config_experiment.py index 716d3b6..7409811 100644 --- a/src/brittle_star_project/configs/config_experiment.py +++ b/src/brittle_star_project/configs/config_experiment.py @@ -8,3 +8,4 @@ class ExperimentConfig: torch_deterministic: bool = True cuda: bool = True debug_sanity: bool = False + base_run_dir: str = "runs"