hydra_callbacks

Callback mechanism for hydra jobs.

Adapted from https://github.com/paquiteau/hydra-callbacks

class AnyRunCallback(enabled: bool = True)[source]

Abstract Callback that execute on any run.

__init__(enabled: bool = True)[source]
_on_anyrun_end(config: DictConfig, **kwargs: None) None[source]

Execute before any run.

_on_anyrun_start(config: DictConfig, **kwargs: None) None[source]

Execute before any run.

on_multirun_end(config: DictConfig, **kwargs: None) None[source]

Execute before a multi run.

on_multirun_start(config: DictConfig, **kwargs: None) None[source]

Execute before a multi run.

on_run_end(config: DictConfig, **kwargs: None) None[source]

Execute before a single run.

on_run_start(config: DictConfig, **kwargs: None) None[source]

Execute before a single run.

class GitInfo(clean: bool = False)[source]

Callback that check git infos and log them.

Parameters

clean

if True, will fail if the repo is not clean

__init__(clean: bool = False)[source]
_on_anyrun_start(config: DictConfig, **kwargs: None) None[source]

Execute before any run.

dummy_run(config: DictConfig, **kwargs: None) None[source]

Do nothing.