distributed 2021.10.0

ParametersBackRef
cli_keywords(d: 'dict', cls=None, cmd=None)

Parameters

d : dict

The keywords to convert

cls : callable

The callable that consumes these terms to check them for validity

cmd : string or object

A string with the name of a module, or the module containing a click-generated command with a "main" function, or the function itself. It may be used to parse a module's custom arguments (i.e., arguments that are not part of Worker class), such as nprocs from dask-worker CLI or enable_nvlink from dask-cuda-worker CLI.

Convert a kwargs dictionary into a list of CLI keywords

Examples

This example is valid syntax, but we were not able to check execution
>>> cli_keywords({"x": 123, "save_file": "foo.txt"})
['--x', '123', '--save-file', 'foo.txt']
This example is valid syntax, but we were not able to check execution
>>> from dask.distributed import Worker
... cli_keywords({"x": 123}, Worker) Traceback (most recent call last): ... ValueError: Class distributed.worker.Worker does not support keyword x
See :

Back References

The following pages refer to to this document either explicitly or contain code examples using this.

distributed.utils.cli_keywords

Local connectivity graph

Hover to see nodes names; edges to Self not shown, Caped at 50 nodes.

Using a canvas is more power efficient and can get hundred of nodes ; but does not allow hyperlinks; , arrows or text (beyond on hover)

SVG is more flexible but power hungry; and does not scale well to 50 + nodes.

All aboves nodes referred to, (or are referred from) current nodes; Edges from Self to other have been omitted (or all nodes would be connected to the central node "self" which is not useful). Nodes are colored by the library they belong to, and scaled with the number of references pointing them


File: /distributed/utils.py#1241
type: <class 'function'>
Commit: