deepr.hooks.LoggingTensorHookFactory

class deepr.hooks.LoggingTensorHookFactory(tensors=None, functions=None, name=None, use_mlflow=False, use_graphite=False, skip_after_step=None, every_n_iter=None, every_n_secs=None, at_end=False, formatter=<function _default_formatter>)[source]

Parametrize the creation of a LoggingTensorHook factory.

Arguments for instantiation should be provided as keyword arguments.

tensors

Name of the tensors to use at runtime. If None (default), log all scalars.

Type:

List[str], Optional

functions

Additional “python” metrics. Each function should return a float

Type:

Dict[str, Callable[[], float]], Optional

name

Name used as prefix of tags when sending to MLFlow / Graphite

Type:

str, Optional

use_mlflow

If True, send metrics to MLFlow. Default is False.

Type:

bool, Optional

use_graphite

If True, send metrics to Graphite. Default is False.

Type:

bool, Optional

skip_after_step

If not None, do not run the hooks after this step.

Prevents outliers when used in conjunction with an early stopping hook that overrides the global_step.

Type:

int, Optional

formatter

Formatter for logging, default uses 7 digits precision.

Type:

Callable[[str, Any], str], Optional

__init__(tensors=None, functions=None, name=None, use_mlflow=False, use_graphite=False, skip_after_step=None, every_n_iter=None, every_n_secs=None, at_end=False, formatter=<function _default_formatter>)[source]

Methods

__init__([tensors, functions, name, ...])