Thanks to visit codestin.com
Credit goes to github.com

Skip to content

DOC Improve doc about joblib warnings #1367

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 5 commits into from
Aug 3, 2024
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
21 changes: 12 additions & 9 deletions doc/configuration.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2155,16 +2155,19 @@ If an ``int``, then that number of jobs will be passed to :class:`joblib.Paralle
If ``True``, then the same number of jobs will be used as the ``-j`` flag for
Sphinx.

Warnings emitted by :mod:`joblib` during gallery generation (e.g., the ``UserWarning``
about a `worker restarting <https://github.com/joblib/joblib/issues/883>`_),
will be captured by Sphinx-Gallery in a similar way to warnings during example
execution. This can be filtered out with ``warnings.filterwarnings``
(see :ref:`removing_warnings`). This can be particularly important
to do if you have tweaked warning handling in your doc build
Warnings emitted by :mod:`joblib` during documentation building (e.g., the
``UserWarning`` about a
`worker restarting <https://github.com/joblib/joblib/issues/883>`_) are emitted
during gallery generation at the same time as warnings from example
code execution. These can be filtered out with
``warnings.filterwarnings`` (see :ref:`removing_warnings`). This is particularly
important to do if you have tweaked warning handling in your documentation build
to treat warnings as errors, e.g., with a line like
``warnings.filterwarnings("error")``. Note that this
differs from warnings affected by the ``- W`` / ``--fail-on-warning`` ``sphinx-build``
flag, which converts warnings during documentation building into errors.
``warnings.filterwarnings("error)`` which converts all warnings into errors. In
this case, if joblib emits a warning during build of an example, this example will fail
unexpectedly unless they are filtered out. Note that this differs from the warnings
affected by the ``- W`` / ``--fail-on-warning`` ``sphinx-build`` flag, which converts
Sphinx warnings during documentation building into errors.

.. warning::
Some packages might not play nicely with parallel processing, so this feature
Expand Down
Loading