jax_dna.ui.loggers.logger ========================= .. py:module:: jax_dna.ui.loggers.logger .. autoapi-nested-parse:: Base logger protocol. Attributes ---------- .. autoapisummary:: jax_dna.ui.loggers.logger.MISSING_LOGDIR_WANING Classes ------- .. autoapisummary:: jax_dna.ui.loggers.logger.Status jax_dna.ui.loggers.logger.Logger Functions --------- .. autoapisummary:: jax_dna.ui.loggers.logger.convert_to_fname 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:function:: convert_to_fname(name: str) -> str Convert a metric name to a valid filename. .. py:class:: Logger(log_dir: str | pathlib.Path | None = None) Base Logger that logs to disk. .. py:attribute:: log_dir :value: None .. py:method:: log_metric(name: str, value: float, step: int) -> None 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, status: Status) -> None 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.