ray.rllib.utils.metrics.metrics_logger.MetricsLogger.activate_tensor_mode#

MetricsLogger.activate_tensor_mode()[source]#

Switches to tensor-mode, in which in-graph tensors can be logged.

Should be used before calling in-graph/copmiled functions, for example loss functions. The user can then still call the log_... APIs, but each incoming value will be checked for a) whether it is a tensor indeed and b) the window args must be 1 (MetricsLogger does not support any tensor-framework reducing operations).

When in tensor-mode, we also track all incoming log_... values and return them TODO (sven) continue docstring