drytorch.trackers.yaml

Module containing YAML options and dumper.

MAX_LENGTH_PLAIN_REPR

Maximum length for sequences in plain style.

MAX_LENGTH_SHORT_REPR

Maximum string length in Sequences in plain style.

TS_FMT

format for representing a timestamp.

Functions

has_short_repr(obj[, max_length])

Indicate whether an object has a short representation.

represent_literal_str(dumper, literal_str)

YAML representer for literal strings.

represent_omitted(dumper, data)

YAML representer for omitted values.

represent_sequence(dumper, sequence[, ...])

YAML representer for sequences.

Classes

YamlDumper([par_dir])

Tracker that dumps metadata in a YAML file.

class YamlDumper(par_dir: Path | None = None)[source]

Bases: Dumper

Tracker that dumps metadata in a YAML file.

Class Attributes:

folder_name: name for the folder that contains metadata.

Initialize.

Parameters:

par_dir (Path | None) – directory where to dump metadata. Defaults to the current experiment’s one.

notify(event: Event) None[source]
notify(event: StartExperimentEvent) None
notify(event: ModelRegistrationEvent) None
notify(event: ActorRegistrationEvent) None

Notify the tracker of an event.

Parameters:

event (Event) – the event to notify about.

Return type:

None