Skip to content

Commit

Permalink
[air][tune] Aim logger (ray-project#32041)
Browse files Browse the repository at this point in the history
Co-authored-by: Justin Yu <justinvyu@anyscale.com>
Co-authored-by: angelinalg <122562471+angelinalg@users.noreply.github.com>
Co-authored-by: tmynn <hovhannes.tamoyan@gmail.com>
Co-authored-by: Justin Yu <justinvyu@berkeley.edu>
Closes ray-project#30537
Fixes ray-project#30674
  • Loading branch information
ju2ez authored and peytondmurray committed Mar 22, 2023
1 parent f24fffc commit 5947002
Show file tree
Hide file tree
Showing 10 changed files with 810 additions and 35 deletions.
6 changes: 4 additions & 2 deletions doc/source/_toc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -202,12 +202,14 @@ parts:
title: "Huggingface Example"
- file: tune/examples/experiment-tracking
sections:
- file: tune/examples/tune-comet
title: "Comet Example"
- file: tune/examples/tune-wandb
title: "Weights & Biases Example"
- file: tune/examples/tune-mlflow
title: "MLflow Example"
- file: tune/examples/tune-aim
title: "Aim Example"
- file: tune/examples/tune-comet
title: "Comet Example"
- file: tune/examples/hpo-frameworks
sections:
- file: tune/examples/ax_example
Expand Down
Binary file added doc/source/images/aim_example_metrics_page.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added doc/source/images/aim_logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added doc/source/images/aim_logo_full.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
78 changes: 48 additions & 30 deletions doc/source/tune/api/logging.rst
Original file line number Diff line number Diff line change
Expand Up @@ -10,28 +10,33 @@ If you need to log something lower level like model weights or gradients,
see :ref:`Trainable Logging <trainable-logging>`.

.. 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.
to use the ``LoggerCallback`` interface instead.


Viskit
------
.. currentmodule:: ray

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:
.. _logger-interface:

.. code-block:: bash
LoggerCallback Interface (tune.logger.LoggerCallback)
-----------------------------------------------------

$ git clone https://github.com/rll/rllab.git
$ python rllab/rllab/viskit/frontend.py ~/ray_results/my_experiment
.. autosummary::
:toctree: doc/
:template: autosummary/class_with_autosummary.rst

The non-relevant metrics (like timing stats) can be disabled on the left to show only the
relevant ones (like accuracy, loss, etc.).
~tune.logger.LoggerCallback

.. image:: ../images/ray-tune-viskit.png
.. autosummary::
:toctree: doc/

~tune.logger.LoggerCallback.log_trial_start
~tune.logger.LoggerCallback.log_trial_restore
~tune.logger.LoggerCallback.log_trial_save
~tune.logger.LoggerCallback.log_trial_result
~tune.logger.LoggerCallback.log_trial_end

.. currentmodule:: ray

Tune Built-in Loggers
---------------------
Expand All @@ -44,46 +49,59 @@ Tune Built-in Loggers
tune.logger.TBXLoggerCallback


MLFlow Integration: MLFlowLoggerCallback
----------------------------------------
MLFlow Integration
------------------

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>`.
See the :doc:`tutorial here </tune/examples/tune-mlflow>`.

.. autosummary::
:toctree: doc/

air.integrations.mlflow.MLflowLoggerCallback

Wandb Integration: WandbLoggerCallback
--------------------------------------
Wandb Integration
-----------------

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>`.
See the :doc:`tutorial here </tune/examples/tune-wandb>`.

.. autosummary::
:toctree: doc/

air.integrations.wandb.WandbLoggerCallback

.. _logger-interface:
Aim Integration
---------------

LoggerCallback Interface (tune.logger.LoggerCallback)
-----------------------------------------------------
Tune also provides a logger for the `Aim <https://aimstack.io/>`_ experiment tracker.
You can install Aim via ``pip install aim``.
See the :doc:`tutorial here </tune/examples/tune-aim>`

.. autosummary::
:toctree: doc/
:template: autosummary/class_with_autosummary.rst

~tune.logger.LoggerCallback
~tune.logger.aim.AimLoggerCallback

.. autosummary::
:toctree: doc/

~tune.logger.LoggerCallback.log_trial_start
~tune.logger.LoggerCallback.log_trial_restore
~tune.logger.LoggerCallback.log_trial_save
~tune.logger.LoggerCallback.log_trial_result
~tune.logger.LoggerCallback.log_trial_end
Other Integrations
------------------

Viskit
~~~~~~

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:

.. code-block:: bash
$ git clone https://github.com/rll/rllab.git
$ python rllab/rllab/viskit/frontend.py ~/ray_results/my_experiment
The non-relevant metrics (like timing stats) can be disabled on the left to show only the
relevant ones (like accuracy, loss, etc.).

.. image:: ../images/ray-tune-viskit.png

8 changes: 8 additions & 0 deletions doc/source/tune/examples/experiment-tracking.rst
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,14 @@ to use Ray Tune with Tensorboard, you can find more information in our
:column: col-md-4 px-2 py-2
:img-top-cls: pt-5 w-75 d-block mx-auto

---
:img-top: /images/aim_logo.png

+++
.. link-button:: tune-aim-ref
:type: ref
:text: Using Aim with Ray Tune For Experiment Management
:classes: btn-link btn-block stretched-link
---
:img-top: /images/comet_logo_full.png

Expand Down
Loading

0 comments on commit 5947002

Please sign in to comment.