2020-04-25 18:25:56 -07:00
|
|
|
.. _loggers-docstring:
|
|
|
|
|
|
|
|
Loggers (tune.logger)
|
|
|
|
=====================
|
|
|
|
|
2022-02-27 08:07:34 +01:00
|
|
|
Tune automatically uses loggers for TensorBoard, CSV, and JSON formats.
|
|
|
|
By default, Tune only logs the returned result dictionaries from the training function.
|
2020-04-25 18:25:56 -07:00
|
|
|
|
2022-02-27 08:07:34 +01:00
|
|
|
If you need to log something lower level like model weights or gradients,
|
|
|
|
see :ref:`Trainable Logging <trainable-logging>`.
|
2020-05-17 12:19:44 -07:00
|
|
|
|
2020-11-17 00:08:37 +01:00
|
|
|
.. note::
|
|
|
|
Tune's per-trial ``Logger`` classes have been deprecated. They can still be used, but we encourage you
|
|
|
|
to use our new interface with the ``LoggerCallback`` class instead.
|
|
|
|
|
2020-05-17 12:19:44 -07:00
|
|
|
|
2020-04-25 18:25:56 -07:00
|
|
|
Viskit
|
|
|
|
------
|
|
|
|
|
2022-02-27 08:07:34 +01:00
|
|
|
Tune automatically integrates with `Viskit <https://github.com/vitchyr/viskit>`_ via the ``CSVLoggerCallback`` outputs.
|
|
|
|
To use VisKit (you may have to install some dependencies), run:
|
2020-04-25 18:25:56 -07:00
|
|
|
|
|
|
|
.. code-block:: bash
|
|
|
|
|
|
|
|
$ git clone https://github.com/rll/rllab.git
|
|
|
|
$ python rllab/rllab/viskit/frontend.py ~/ray_results/my_experiment
|
|
|
|
|
2022-02-27 08:07:34 +01:00
|
|
|
The non-relevant metrics (like timing stats) can be disabled on the left to show only the
|
|
|
|
relevant ones (like accuracy, loss, etc.).
|
2020-04-25 18:25:56 -07:00
|
|
|
|
[docs] new structure (#21776)
This PR consolidates both #21667 and #21759 (look there for features), but improves on them in the following way:
- [x] we reverted renaming of existing projects `tune`, `rllib`, `train`, `cluster`, `serve`, `raysgd` and `data` so that links won't break. I think my consolidation efforts with the `ray-` prefix were a little overeager in that regard. It's better like this. Only the creation of `ray-core` was a necessity, and some files moved into the `rllib` folder, so that should be relatively benign.
- [x] Additionally, we added Algolia `docsearch`, screenshot below. This is _much_ better than our current search. Caveat: there's a sphinx dependency that needs to be replaced (`sphinx-tabs`) by another, newer one (`sphinx-panels`), as the former prevents loading of the `algolia.js` library. Will follow-up in the next PR (hoping this one doesn't get re-re-re-re-reverted).
2022-01-22 00:42:05 +01:00
|
|
|
.. image:: ../images/ray-tune-viskit.png
|
2020-04-25 18:25:56 -07:00
|
|
|
|
|
|
|
|
|
|
|
TBXLogger
|
|
|
|
---------
|
|
|
|
|
2020-11-17 00:08:37 +01:00
|
|
|
.. autoclass:: ray.tune.logger.TBXLoggerCallback
|
2020-04-25 18:25:56 -07:00
|
|
|
|
|
|
|
JsonLogger
|
|
|
|
----------
|
|
|
|
|
2020-11-17 00:08:37 +01:00
|
|
|
.. autoclass:: ray.tune.logger.JsonLoggerCallback
|
2020-04-25 18:25:56 -07:00
|
|
|
|
|
|
|
CSVLogger
|
|
|
|
---------
|
|
|
|
|
2020-11-17 00:08:37 +01:00
|
|
|
.. autoclass:: ray.tune.logger.CSVLoggerCallback
|
2020-04-25 18:25:56 -07:00
|
|
|
|
2020-12-19 00:40:02 -08:00
|
|
|
MLFlowLogger
|
2020-04-25 18:25:56 -07:00
|
|
|
------------
|
|
|
|
|
2022-02-27 08:07:34 +01:00
|
|
|
Tune also provides a logger for `MLflow <https://mlflow.org>`_.
|
|
|
|
You can install MLflow via ``pip install mlflow``.
|
|
|
|
You can see the :doc:`tutorial here </tune/examples/tune-mlflow>`.
|
2020-12-19 00:40:02 -08:00
|
|
|
|
|
|
|
WandbLogger
|
|
|
|
-----------
|
2020-04-25 18:25:56 -07:00
|
|
|
|
2022-02-27 08:07:34 +01:00
|
|
|
Tune also provides a logger for `Weights & Biases <https://www.wandb.ai/>`_.
|
|
|
|
You can install Wandb via ``pip install wandb``.
|
|
|
|
You can see the :doc:`tutorial here </tune/examples/tune-wandb>`
|
2020-05-17 12:19:44 -07:00
|
|
|
|
|
|
|
|
|
|
|
.. _logger-interface:
|
|
|
|
|
2020-11-17 00:08:37 +01:00
|
|
|
LoggerCallback
|
|
|
|
--------------
|
2020-05-17 12:19:44 -07:00
|
|
|
|
2020-11-17 00:08:37 +01:00
|
|
|
.. autoclass:: ray.tune.logger.LoggerCallback
|
|
|
|
:members: log_trial_start, log_trial_restore, log_trial_save, log_trial_result, log_trial_end
|