Inheritance diagram for IPython.parallel.controller.scheduler:
The Python scheduler for rich scheduling.
The Pure ZMQ scheduler does not allow routing schemes other than LRU, nor does it check msg_id DAG dependencies. For those, a slightly slower Python Scheduler exists.
Authors:
Bases: IPython.zmq.session.SessionFactory
Python TaskScheduler object.
This is the simplest object that supports msg_id based DAG dependencies. Only task msg_ids are checked, not msg_ids of jobs submitted via the MUX queue.
Called after self.targets[idx] just got the job with header. Override with subclasses. The default ordering is simple LRU. The default loads are the number of outstanding jobs.
An instance of a Python set.
An instance of a Python set.
An instance of a Python set.
An instance of a Python set.
Audit all waiting tasks for expired timeouts.
A trait whose value must be an instance of a specified class.
The value can also be an instance of a subclass of the specified class.
An instance of a Python dict.
Get the config class config section
Get the help string for this class in ReST format.
If inst is given, it’s current trait values will be used in place of class defaults.
Get the help string for a single trait.
If inst is given, it’s current trait values will be used in place of the class default.
Get the help string for a single trait and print it.
Get a list of all the names of this classes traits.
This method is just like the trait_names() method, but is unbound.
Get a list of all the traits of this class.
This method is just like the traits() method, but is unbound.
The TraitTypes returned don’t know anything about the values that the various HasTrait’s instances are holding.
This follows the same algorithm as traits does and does not allow for any simple way of specifying merely that a metadata name exists, but has any value. This is because get_metadata returns None if a metadata key doesn’t exist.
A trait whose value must be an instance of a specified class.
The value can also be an instance of a subclass of the specified class.
An instance of a Python dict.
An instance of a Python dict.
A trait whose value must be an instance of a specified class.
The value can also be an instance of a subclass of the specified class.
A trait whose value must be an instance of a specified class.
The value can also be an instance of a subclass of the specified class.
An instance of a Python dict.
An instance of a Python dict.
dispatch register/unregister events.
dispatch method for result replies
Dispatch job submission to appropriate handlers.
A trait whose value must be an instance of a specified class.
The value can also be an instance of a subclass of the specified class.
a task has become unreachable, send a reply with an ImpossibleDependency error.
An instance of a Python dict.
Called after self.targets[idx] just finished a job. Override with subclasses.
An instance of a Python dict.
handle a real task result, either success or failure
Deal with jobs resident in an engine that died.
handle an unmet dependency
An integer trait.
Longs that are unnecessary (<= sys.maxint) are cast to ints.
A casting version of the byte string trait.
An instance of a Python list.
A trait whose value must be an instance of a specified class.
The value can also be an instance of a subclass of the specified class.
A trait for unicode strings.
A trait whose value must be an instance of a specified class.
The value can also be an instance of a subclass of the specified class.
check location dependencies, and run if they are met.
A trait whose value must be an instance of a specified class.
The value can also be an instance of a subclass of the specified class.
A trait whose value must be an instance of a specified class.
The value can also be an instance of a subclass of the specified class.
Setup a handler to be called when a trait changes.
This is used to setup dynamic notifications of trait changes.
Static handlers can be created by creating methods on a HasTraits subclass with the naming convention ‘_[traitname]_changed’. Thus, to create static handler for the trait ‘a’, create the method _a_changed(self, name, old, new) (fewer arguments can be used, see below).
Parameters : | handler : callable
name : list, str, None
remove : bool
|
---|
An instance of a Python dict.
Resume accepting jobs.
An instance of a Python dict.
Save a message for later submission when its dependencies are met.
A trait whose value must be an instance of a specified class.
The value can also be an instance of a subclass of the specified class.
An enum that whose value must be in a given sequence.
A trait whose value must be an instance of a specified class.
The value can also be an instance of a subclass of the specified class.
Stop accepting jobs while there are no engines. Leave them in the ZMQ queue.
Submit a task to any of a subset of our targets.
An instance of a Python list.
Get metadata values for trait by key.
Get a list of all the names of this classes traits.
Get a list of all the traits of this class.
The TraitTypes returned don’t know anything about the values that the various HasTrait’s instances are holding.
This follows the same algorithm as traits does and does not allow for any simple way of specifying merely that a metadata name exists, but has any value. This is because get_metadata returns None if a metadata key doesn’t exist.
Fire the traits events when the config is updated.
dep_id just finished. Update our dependency graph and submit any jobs that just became runable.
Called with dep_id=None to update entire graph for hwm, but without finishing a task.
Always choose the lowest load.
If the lowest load occurs more than once, the first occurance will be used. If loads has LRU ordering, this means the LRU of those with the lowest load is chosen.
Always pick the front of the line.
The content of loads is ignored.
Assumes LRU ordering of loads, with oldest first.
Plain random pick.
Pick two at random, use the LRU of the two.
The content of loads is ignored.
Assumes LRU ordering of loads, with oldest first.
Pick two at random using inverse load as weight.
Return the less loaded of the two.