# tensorplay.monitor API Source: https://www.tensorplay.cn/docs/api/tensorplay.monitor.html ## Functions 3 [#](#api-tensorplay.monitor.log_event) ### log_event function[Full reference ↗](/docs/generated/tensorplay.monitor.log_event.html) ```python tensorplay.monitor.log_event(event: tensorplay._C._monitor.Event) → None ``` [#](#api-tensorplay.monitor.register_event_handler) ### register_event_handler function[Full reference ↗](/docs/generated/tensorplay.monitor.register_event_handler.html) ```python tensorplay.monitor.register_event_handler(callback: collections.abc.Callable) → int ``` [#](#api-tensorplay.monitor.unregister_event_handler) ### unregister_event_handler function[Full reference ↗](/docs/generated/tensorplay.monitor.unregister_event_handler.html) ```python tensorplay.monitor.unregister_event_handler(handle: SupportsInt | SupportsIndex) → None ``` ## Classes 5 [#](#api-tensorplay.monitor.Aggregation) ### Aggregation class[Full reference ↗](/docs/generated/tensorplay.monitor.Aggregation.html) ```python class tensorplay.monitor.Aggregation ``` Members: NONE VALUE MEAN COUNT SUM MAX MIN ```python Aggregation.name -> str ``` [#](#api-tensorplay.monitor.Event) ### Event class[Full reference ↗](/docs/generated/tensorplay.monitor.Event.html) ```python class tensorplay.monitor.Event ``` [#](#api-tensorplay.monitor.Stat) ### Stat class[Full reference ↗](/docs/generated/tensorplay.monitor.Stat.html) ```python class tensorplay.monitor.Stat ``` ```python add(self: tensorplay._C._monitor.Stat, arg0: SupportsFloat | SupportsIndex) → None ``` ```python count(self: tensorplay._C._monitor.Stat) → int ``` ```python get(self: tensorplay._C._monitor.Stat) → list[tensorplay._C._monitor.StatResult] ``` [#](#api-tensorplay.monitor.StatResult) ### StatResult class[Full reference ↗](/docs/generated/tensorplay.monitor.StatResult.html) ```python class tensorplay.monitor.StatResult ``` [#](#api-tensorplay.monitor.TensorboardEventHandler) ### TensorboardEventHandler class[Full reference ↗](/docs/generated/tensorplay.monitor.TensorboardEventHandler.html) ```python class tensorplay.monitor.TensorboardEventHandler(writer) ``` Forwards known events to a TensorBoard writer as scalars. The handler accepts any writer exposing add_scalar(tag, value, walltime=...); only [STAT_EVENT](/docs/generated/tensorplay.monitor.STAT_EVENT.html#tensorplay.monitor.STAT_EVENT) events are forwarded, one scalar per data key. ## Variables 1 [#](#api-tensorplay.monitor.STAT_EVENT) ### STAT_EVENT data[Full reference ↗](/docs/generated/tensorplay.monitor.STAT_EVENT.html) ```python tensorplay.monitor.STAT_EVENT = 'tensorplay.monitor.Stat' ``` str(object=’’) -> str str(bytes_or_buffer[, encoding[, errors]]) -> str Create a new string object from the given object. If encoding or errors is specified, then the object must expose a data buffer that will be decoded using the given encoding and error handler. Otherwise, returns the result of object.__str__() (if defined) or repr(object). encoding defaults to sys.getdefaultencoding(). errors defaults to ‘strict’.