module emote.mixins.logging
Classes
class LoggingMixin:
A Mixin that accepts logging calls. Logged data is saved on this object and gets written by a Logger. This therefore doesn't care how the data is logged, it only provides a standard interface for storing the data to be handled by a Logger.
Methods
def __init__(self, *default_window_length) -> None
Arguments:
default_window_length(int)
def log_scalar(self, key, value) -> None
Use log_scalar to periodically log scalar data.
Arguments:
key(str)
value(float | torch.Tensor)
def log_windowed_scalar(self, key, value) -> None
Log scalars using a moving window average.
By default this will use default_window_length
from the constructor as the window
length. It can also be overridden on a per-key basis using the format
windowed[LENGTH]:foo/bar. Note that this cannot be changed between multiple invocations -
whichever length is found first will be permanent.
Arguments:
key(str)
value(float | torch.Tensor | Iterable[torch.Tensor | float])
def log_image(self, key, value) -> None
Use log_image to periodically log image data.
Arguments:
key(str)
value(torch.Tensor)
def log_video(self, key, value) -> None
Use log_scalar to periodically log scalar data.
Arguments:
key(str)
value(Tuple[np.ndarray, int])
def log_histogram(self, key, value) -> None
def state_dict(self) -> None
def load_state_dict(
self,
state_dict,
load_network,
load_optimizer,
load_hparams
) -> None