You can use the methods on this object to query the graph structure and find work items.
Methods
dependencyForKey(key)
→ pdg.Dependency
Returns an external dependency object for the specified key.
dependencyGraph(expand_partitions=False, scheduler=None)
→ tuple
of dict
Returns the entire static dependency graph, represented as a tuple containing a map of work item->dependencies, work item->dependents and a list of items currently ready to cook.
The expand_partitions
argument configures whether partitions should be
expanded into a flat dependency graph containing only regular work items, or
kept in the tuple.
If a pdg.SchedulerBase is passed in, it will be used to filter the dependency graph so that only work items that are processed by that scheduler are included.
nodePort(node_name, port_name)
→ pdg.Port
Looks up a port object using a node and port name.
nodePort(full_name)
→ pdg.Port
Loops up a port object using the concatenated node port name, with a dot
separator. For example, processor.command
.
nodes()
→ list
of pdg.Node
Returns the list of all nodes in the graph.
workItemById(id)
→ pdg.WorkItem
Returns the work item with the specified unique id, or None
if no item
exists with that id.
workItemByName(name)
→ pdg.WorkItem
Returns the work item with the specified unique name, or None
if no item
exists with that name.