mythos.ui.loggers.logger ======================== .. py:module:: mythos.ui.loggers.logger .. autoapi-nested-parse:: Base logger protocol. Attributes ---------- .. autoapisummary:: mythos.ui.loggers.logger.MISSING_LOGDIR_WANING Classes ------- .. autoapisummary:: mythos.ui.loggers.logger.Status mythos.ui.loggers.logger.StatusKind mythos.ui.loggers.logger.Logger mythos.ui.loggers.logger.NullLogger Module Contents --------------- .. py:data:: MISSING_LOGDIR_WANING :value: '`log_dir` not results might not be saved to disk.' .. py:class:: Status(*args, **kwds) Bases: :py:obj:`enum.Enum` Status of a simulator, objective, or observable. .. py:attribute:: STARTED :value: 0 .. py:attribute:: RUNNING :value: 1 .. py:attribute:: COMPLETE :value: 2 .. py:attribute:: ERROR :value: 3 .. py:class:: StatusKind(*args, **kwds) Bases: :py:obj:`enum.Enum` Kind of status for a simulator, objective, or observable. .. py:attribute:: SIMULATOR :value: 0 .. py:attribute:: OBJECTIVE :value: 1 .. py:attribute:: OBSERVABLE :value: 2 .. py:class:: Logger Bases: :py:obj:`abc.ABC` Base Logger abstract class. .. py:method:: log_metric(name: str, value: float, step: int) -> None :abstractmethod: Log the `value` for `name` at `step`. :param name: the name of the metric :type name: str :param value: the value of the metric :type value: float :param step: the step at which the metric was recorded :type step: int .. py:method:: update_status(name: str, kind: StatusKind, status: Status) -> None :abstractmethod: Updates the status of a simulator, objective, or observable. .. py:method:: update_simulator_status(name: str, status: Status) -> None Updates the status of a simulator. .. py:method:: set_simulator_started(name: str) -> None Sets the status of a simulator to STARTED. .. py:method:: set_simulator_running(name: str) -> None Sets the status of a simulator to RUNNING. .. py:method:: set_simulator_complete(name: str) -> None Sets the status of a simulator to COMPLETE. .. py:method:: set_simulator_error(name: str) -> None Sets the status of a simulator to ERROR. .. py:method:: update_objective_status(name: str, status: Status) -> None Updates the status of an objective. .. py:method:: set_objective_started(name: str) -> None Sets the status of an objective to STARTED. .. py:method:: set_objective_running(name: str) -> None Sets the status of an objective to RUNNING. .. py:method:: set_objective_complete(name: str) -> None Sets the status of an objective to COMPLETE. .. py:method:: set_objective_error(name: str) -> None Sets the status of an objective to ERROR. .. py:method:: update_observable_status(name: str, status: Status) -> None Updates the status of an observable. .. py:method:: set_observable_started(name: str) -> None Sets the status of an observable to STARTED. .. py:method:: set_observable_running(name: str) -> None Sets the status of an observable to RUNNING. .. py:method:: set_observable_complete(name: str) -> None Sets the status of an observable to COMPLETE. .. py:method:: set_observable_error(name: str) -> None Sets the status of an observable to ERROR. .. py:class:: NullLogger Bases: :py:obj:`Logger` A logger that does nothing. .. py:method:: log_metric(name: str, value: float, step: int) -> None Intentionally Does nothing. .. py:method:: update_status(name: str, kind: StatusKind, status: Status) -> None Intentionally Does nothing.