Skip to content

Added reinit__is_reduced and sync_all_reduce docs in metrics doc #1373

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 8 additions & 6 deletions docs/source/metrics.rst
Original file line number Diff line number Diff line change
Expand Up @@ -229,11 +229,11 @@ Complete list of usages
Metrics and distributed computations
------------------------------------

In the above example, ``CustomAccuracy`` has ``reset``, ``update``, ``compute`` methods
decorated with ``reinit__is_reduced``, ``sync_all_reduce``. The purpose of these features is to adapt metrics in distributed
computations on supported backend and devices (:doc:`distributed`). More precisely, in the above example we
added ``@sync_all_reduce("_num_examples", "_num_correct")`` over ``compute`` method. This means that when ``compute`` method
is called, metric's interal variables ``self._num_examples`` and ``self._num_correct`` are summed up over all participating
In the above example, ``CustomAccuracy`` has ``reset``, ``update``, ``compute`` methods decorated
with :meth:`~ignite.metrics.metric.reinit__is_reduced`, :meth:`~ignite.metrics.metric.sync_all_reduce`. The purpose of these features is to adapt metrics in distributed
computations on supported backend and devices (see :doc:`distributed` for more details). More precisely, in the above
example we added ``@sync_all_reduce("_num_examples", "_num_correct")`` over ``compute`` method. This means that when ``compute``
method is called, metric's interal variables ``self._num_examples`` and ``self._num_correct`` are summed up over all participating
devices. Therefore, once collected, these internal variables can be used to compute the final metric value.

Complete list of metrics
Expand Down Expand Up @@ -262,6 +262,7 @@ Complete list of metrics
- :class:`~ignite.metrics.TopKCategoricalAccuracy`
- :class:`~ignite.metrics.VariableAccumulation`


.. currentmodule:: ignite.metrics

.. autoclass:: Accuracy
Expand Down Expand Up @@ -320,6 +321,7 @@ Complete list of metrics

.. currentmodule:: ignite.metrics.metric

.. autofunction:: reinit__is_reduced

.. autofunction:: sync_all_reduce

.. autofunction:: reinit__is_reduced