The job configuration resides in
The structure definition is below, the latest definition in the code.
The job name is used by different things in Hydra, such as the log file name (
It is normally derived from the Python file name (file:
train.py -> name:
You can override it via the command line or your config file.
This field is populated automatically using your command line arguments and is typically being used as a part of your output directory pattern. For example, the command line arguments:
Would result in
hydra.job.override_dirname getting the value a=10,b=20.
When used with the output directory override, it can automatically generate directories that represent the
command line arguments used in your run.
The generation of override_dirname can be controlled by
In particular, the separator char
= and the item separator char
, can be modified, and in addition some command line
override keys can be automatically excluded from the generated
An example of a case where the exclude is useful is a random seed.
With this configuration, running
Would result in a directory like:
Allowing you to more easily group identical runs with different random seeds together.
The job ID is populated by active Hydra launcher. For the basic launcher, the job ID is just a serial job number, but for other systems this could be the SLURM job ID or the AWS Instance ID.
Serial job number within this current sweep run. (0 to n-1)
The config name used by the job, this is populated automatically to match the config name in @hydra.main()
A Dict[str, str] that is used to set the environment variables of the running job. Some common use cases are to set environment variables that are effecting underlying libraries, for example
Disables multithreading in Intel IPP and MKL.
Another example, is to use interpolation to automatically set the rank for Torch Distributed run to match the job number in the sweep.
In some cases you want to automatically copy local environment variables to the running job environment variables. This is particularly useful for remote runs.