submit(self, func, *args, key=None, workers=None, resources=None, retries=None, priority=0, fifo_timeout='100 ms', allow_other_workers=False, actor=False, actors=False, pure=None, **kwargs)
Callable to be scheduled as func(*args **kwargs)
. If func
returns a coroutine, it will be run on the main event loop of a worker. Otherwise func
will be run in a worker's task executor pool (see Worker.executors
for more information.)
Whether or not the function is pure. Set pure=False
for impure functions like np.random.random
. See pure functions
for more details.
A set of worker addresses or hostnames on which computations may be performed. Leave empty to default to all workers (common case)
Unique identifier for the task. Defaults to function-name and hash
Used with workers
. Indicates whether or not the computations may be performed on workers that are not in the :None:None:`workers`
set(s).
Number of allowed automatic retries if the task fails
Optional prioritization of task. Zero is default. Higher priorities take precedence
Allowed amount of time between calls to consider the same priority
Defines the resources
each instance of this mapped task requires on the worker; e.g. {'GPU': 2}
. See worker resources <resources>
for details on defining resources.
Whether this task should exist on the worker as a stateful actor. See actors
for additional details.
Alias for actor
Submit a function application to the scheduler
Client.map
Submit on many arguments at once
>>> c = client.submit(add, a, b) # doctest: +SKIPSee :
The following pages refer to to this document either explicitly or contain code examples using this.
distributed.client.Client.scatter
distributed.variable.Variable
distributed.actor.Actor
distributed.client.Client
distributed.queues.Queue
distributed.client.Client.gather
distributed.client.Client.map
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