releso.agent.BaseAgent

class releso.agent.BaseAgent(*, save_location: Path, logger_name: str | None = None, tensorboard_log: str | None = None)

Bases: BaseModel

Base agent definition.

The class BaseAgent should be used as the base class for all classes defining agents for the ReLeSO framework.

__init__(**data: Any) None

Constructor for the ReLeSO basemodel object.

Methods

convert_to_pathlib_add_datetime(v)

Add timestamp to save_location, of applicable.

get_logger()

Gets the currently defined environment logger.

get_next_tensorboard_experiment_name()

Return tensorboard experiment name.

set_logger_name_recursively(logger_name)

Set the logger_name variable for all child elements.

Attributes

tensorboard_log

base directory of the tensorboard logs if given an experiment name with a current timestamp is also added.

save_location

Definition of the save location of the logs and validation results.

logger_name

name of the logger.

get_next_tensorboard_experiment_name() str | None

Return tensorboard experiment name.

Adds a date and time marker to the tensorboard experiment name so that it can be distinguished from other experiments.

Returns:

Experiment name consisting of a time and date stamp.

Return type:

str

tensorboard_log: str | None

base directory of the tensorboard logs if given an experiment name with a current timestamp is also added.