src.callback#

Module Contents#

Classes#

LogJobReturnCallback

Experiment

Helper class that provides a standard way to create an ABC using

RunExperiment

Helper class that provides a standard way to create an ABC using

MultirunExperiment

Helper class that provides a standard way to create an ABC using

ResultCollector

class src.callback.LogJobReturnCallback#

Bases: hydra.experimental.callback.Callback

on_job_end(config: omegaconf.DictConfig, job_return: hydra.core.utils.JobReturn, **kwargs: Any) None#

Check the status of job in hydra.

Parameters:
  • config (DictConfig) – DictConfig

  • job_return (JobReturn) – JobReturn

class src.callback.Experiment(path: pathlib.Path)#

Bases: abc.ABC

Helper class that provides a standard way to create an ABC using inheritance.

abstract property timestamp: datetime.datetime#
static parse_timestamp(date: str, time: str) datetime.datetime#
get_score() float | None#
get_config() dict[str, Any]#
get_n_targets() int | None#
process() dict#
class src.callback.RunExperiment(path: pathlib.Path)#

Bases: Experiment

Helper class that provides a standard way to create an ABC using inheritance.

property timestamp: datetime.datetime#

Retrive the time stamp from the name of directories.

Returns:

date and time in string

Return type:

datetime.datetime

class src.callback.MultirunExperiment(path: pathlib.Path)#

Bases: Experiment

Helper class that provides a standard way to create an ABC using inheritance.

property timestamp: datetime.datetime#

Retrive the time stamp from the name of directories.

Returns:

date and time in string

Return type:

datetime.datetime

class src.callback.ResultCollector#

Bases: hydra.experimental.callback.Callback

OUTPUTS_PATH#
MULTIRUN_PATH#
write_results() None#

Write results into csv and json files in the results directory.

on_run_end(config: omegaconf.DictConfig, **kwargs: Any) None#

Load results from outputs directory and write them to the results directory.

Parameters:

config (DictConfig) – DictConfig

on_multirun_end(config: omegaconf.DictConfig, **kwargs: Any) None#

Load results from multirun directory and write them to the results directory.

Parameters:

config (DictConfig) – DictConfig