Skip to content

Commit

Permalink
Added reinit__is_reduced and sync_all_reduce docs in metrics doc (#1373)
Browse files Browse the repository at this point in the history
* added links to reinit__is_reduced and sync_all_reduce decorators in metrics documentation

* updated order in list of metrics

* deleted decorators from metric list

* Update metrics.rst

Co-authored-by: vfdev <[email protected]>
  • Loading branch information
jossperdomo and vfdev-5 committed Oct 7, 2020
1 parent 391c13a commit 52bb624
Showing 1 changed file with 8 additions and 6 deletions.
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

0 comments on commit 52bb624

Please sign in to comment.