Skip to content

Commit

Permalink
Minor tweaks to Sphinx documentation (#7041)
Browse files Browse the repository at this point in the history
  • Loading branch information
crusaderky authored Sep 19, 2022
1 parent aed10bd commit 2b23840
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 19 deletions.
4 changes: 2 additions & 2 deletions distributed/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -4158,8 +4158,8 @@ def subscribe_topic(self, topic, handler):
single argument `event` which is a tuple `(timestamp, msg)` where
timestamp refers to the clock on the scheduler.
Example
-------
Examples
--------
>>> import logging
>>> logger = logging.getLogger("myLogger") # Log config not shown
Expand Down
27 changes: 13 additions & 14 deletions distributed/nanny.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,20 +89,19 @@ class Nanny(ServerNode):
2. Existing environment variables
3. Dask configuration
Note
----
Some environment variables, like ``OMP_NUM_THREADS``, must be set before
importing numpy to have effect. Others, like ``MALLOC_TRIM_THRESHOLD_`` (see
:ref:`memtrim`), must be set before starting the Linux process. Such variables
would be ineffective if set here or in ``distributed.nanny.environ``; they
must be set in ``distributed.nanny.pre-spawn-environ`` so that they are set
before spawning the subprocess, even if this means poisoning the
process running the Nanny.
For the same reason, be warned that changing
``distributed.worker.multiprocessing-method`` from ``spawn`` to ``fork`` or
``forkserver`` may inhibit some environment variables; if you do, you should
set the variables yourself in the shell before you start ``dask-worker``.
.. note::
Some environment variables, like ``OMP_NUM_THREADS``, must be set before
importing numpy to have effect. Others, like ``MALLOC_TRIM_THRESHOLD_`` (see
:ref:`memtrim`), must be set before starting the Linux process. Such
variables would be ineffective if set here or in
``distributed.nanny.environ``; they must be set in
``distributed.nanny.pre-spawn-environ`` so that they are set before spawning
the subprocess, even if this means poisoning the process running the Nanny.
For the same reason, be warned that changing
``distributed.worker.multiprocessing-method`` from ``spawn`` to ``fork`` or
``forkserver`` may inhibit some environment variables; if you do, you should
set the variables yourself in the shell before you start ``dask-worker``.
See Also
--------
Expand Down
4 changes: 2 additions & 2 deletions distributed/worker_state_machine.py
Original file line number Diff line number Diff line change
Expand Up @@ -363,8 +363,8 @@ def match(cls, **kwargs: Any) -> _InstructionMatch:
:meth:`WorkerState.handle_stimulus` or in :attr:`WorkerState.stimulus_log` vs.
an expected list of matches.
Example
-------
Examples
--------
.. code-block:: python
Expand Down
6 changes: 5 additions & 1 deletion docs/source/scheduling-policies.rst
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,11 @@ functions in ``scheduler.py``.

.. autosummary:: decide_worker

.. autosummary:: Scheduler.decide_worker
.. autosummary:: Scheduler.decide_worker_non_rootish

.. autosummary:: Scheduler.decide_worker_rootish_queuing_disabled

.. autosummary:: Scheduler.decide_worker_rootish_queuing_enabled

.. autosummary:: Scheduler.worker_objective

Expand Down

0 comments on commit 2b23840

Please sign in to comment.