Skip to main content
Version: 1.0

Customizing working directory pattern

Example application

Below are a few examples of customizing output directory patterns.

Run output directory grouped by day:

hydra:
run:
dir: ./outputs/${now:%Y-%m-%d}/${now:%H-%M-%S}

Sweep sub directory contains the the job number and the override parameters for the job instance:

hydra:
sweep:
subdir: ${hydra.job.num}_${hydra.job.override_dirname}

Run output directory grouped by job name:

hydra:
run:
dir: outputs/${hydra.job.name}/${now:%Y-%m-%d_%H-%M-%S}

Run output directory can contain user configuration variables:

hydra:
run:
dir: outputs/${now:%Y-%m-%d_%H-%M-%S}/opt:${optimizer.type}

Run output directory can contain override parameters for the job:

See Override dirname in the Job configuration page for details on how to customize hydra.job.override_dirname.

hydra:
run:
dir: output/${hydra.job.override_dirname}