Skip to content

Commit 400973d

Browse files
authored
Add fixes to doctest and fix incorrect link (#3443)
1 parent 72fede0 commit 400973d

File tree

4 files changed

+9
-3
lines changed

4 files changed

+9
-3
lines changed

docs/source/conf.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@
1212
# add these directories to sys.path here. If the directory is relative to the
1313
# documentation root, use os.path.abspath to make it absolute, like shown here.
1414
#
15+
import doctest
16+
1517
import os
1618
import shutil
1719
import sys
@@ -106,6 +108,10 @@
106108
# The name of the Pygments (syntax highlighting) style to use.
107109
pygments_style = "sphinx"
108110

111+
# -- Options for doctest ------------------------------------------------------
112+
113+
# Enable ellipsis for floating-point comparisons
114+
doctest_default_flags = doctest.ELLIPSIS | doctest.NORMALIZE_WHITESPACE
109115

110116
# -- Options for HTML output -------------------------------------------------
111117

ignite/handlers/wandb_logger.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ class WandBLogger(BaseLogger):
2626
Args:
2727
args: Positional arguments accepted by `wandb.init`.
2828
kwargs: Keyword arguments accepted by `wandb.init`.
29-
Please see `wandb.init <https://docs.wandb.ai/ref/python/init>`_ for documentation of possible parameters.
29+
Please see `wandb.init <https://docs.wandb.ai/ref/python/sdk/functions/init/>`_ for documentation of possible parameters.
3030
3131
Examples:
3232
.. code-block:: python

ignite/metrics/js_divergence.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ class JSDivergence(KLDivergence):
7373
7474
.. testoutput::
7575
76-
0.16266516844431558
76+
0.1626...
7777
7878
.. versionchanged:: 0.5.1
7979
``skip_unrolling`` argument is added.

ignite/metrics/maximum_mean_discrepancy.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ class MaximumMeanDiscrepancy(Metric):
7878
7979
.. testoutput::
8080
81-
1.072697639465332
81+
1.0726...
8282
8383
.. versionchanged:: 0.5.1
8484
``skip_unrolling`` argument is added.

0 commit comments

Comments
 (0)