mythos.ui.loggers.logger

Base logger protocol.

Attributes

MISSING_LOGDIR_WANING

Classes

Status

Status of a simulator, objective, or observable.

StatusKind

Kind of status for a simulator, objective, or observable.

Logger

Base Logger abstract class.

NullLogger

A logger that does nothing.

Module Contents

mythos.ui.loggers.logger.MISSING_LOGDIR_WANING = '`log_dir` not results might not be saved to disk.'
class mythos.ui.loggers.logger.Status(*args, **kwds)[source]

Bases: enum.Enum

Status of a simulator, objective, or observable.

STARTED = 0
RUNNING = 1
COMPLETE = 2
ERROR = 3
class mythos.ui.loggers.logger.StatusKind(*args, **kwds)[source]

Bases: enum.Enum

Kind of status for a simulator, objective, or observable.

SIMULATOR = 0
OBJECTIVE = 1
OBSERVABLE = 2
class mythos.ui.loggers.logger.Logger[source]

Bases: abc.ABC

Base Logger abstract class.

abstractmethod log_metric(name: str, value: float, step: int) None[source]

Log the value for name at step.

Parameters:
  • name (str) – the name of the metric

  • value (float) – the value of the metric

  • step (int) – the step at which the metric was recorded

abstractmethod update_status(name: str, kind: StatusKind, status: Status) None[source]

Updates the status of a simulator, objective, or observable.

update_simulator_status(name: str, status: Status) None[source]

Updates the status of a simulator.

set_simulator_started(name: str) None[source]

Sets the status of a simulator to STARTED.

set_simulator_running(name: str) None[source]

Sets the status of a simulator to RUNNING.

set_simulator_complete(name: str) None[source]

Sets the status of a simulator to COMPLETE.

set_simulator_error(name: str) None[source]

Sets the status of a simulator to ERROR.

update_objective_status(name: str, status: Status) None[source]

Updates the status of an objective.

set_objective_started(name: str) None[source]

Sets the status of an objective to STARTED.

set_objective_running(name: str) None[source]

Sets the status of an objective to RUNNING.

set_objective_complete(name: str) None[source]

Sets the status of an objective to COMPLETE.

set_objective_error(name: str) None[source]

Sets the status of an objective to ERROR.

update_observable_status(name: str, status: Status) None[source]

Updates the status of an observable.

set_observable_started(name: str) None[source]

Sets the status of an observable to STARTED.

set_observable_running(name: str) None[source]

Sets the status of an observable to RUNNING.

set_observable_complete(name: str) None[source]

Sets the status of an observable to COMPLETE.

set_observable_error(name: str) None[source]

Sets the status of an observable to ERROR.

class mythos.ui.loggers.logger.NullLogger[source]

Bases: Logger

A logger that does nothing.

log_metric(name: str, value: float, step: int) None[source]

Intentionally Does nothing.

update_status(name: str, kind: StatusKind, status: Status) None[source]

Intentionally Does nothing.