nipype.pipeline.plugins.base module

Common graph operations for execution.

class nipype.pipeline.plugins.base.DistributedPluginBase(plugin_args=None)

Bases: nipype.pipeline.plugins.base.PluginBase

Execute workflow with a distribution engine

Combinations of proc_done and proc_pending:

proc_done

proc_pending

outcome

True

False

Process is finished

True

True

Process is currently being run

False

False

Process is queued

False

True

INVALID COMBINATION

Attributes:
  • procs (list) – list (N) of underlying interface elements to be processed

  • proc_done (numpy.ndarray) – a boolean numpy array (N,) signifying whether a process has been submitted for execution

  • proc_pending (numpy.ndarray) – a boolean numpy array (N,) signifying whether a process is currently running.

  • depidx (numpy.matrix) – a boolean matrix (NxN) storing the dependency structure across processes. Process dependencies are derived from each column.

run(graph, config, updatehash=False)

Executes a pre-defined pipeline using distributed approaches

class nipype.pipeline.plugins.base.GraphPluginBase(plugin_args=None)

Bases: nipype.pipeline.plugins.base.PluginBase

Base class for plugins that distribute graphs to workflows

run(graph, config, updatehash=False)

Instruct the plugin to execute the workflow graph.

The core plugin member that should be implemented by all plugins.

Parameters:
  • graph – a networkx, flattened DAG to be executed

  • config (config) – a nipype.config object

  • updatehash (bool) – whether cached nodes with stale hash should be just updated.

class nipype.pipeline.plugins.base.PluginBase(plugin_args=None)

Bases: object

Base class for plugins.

run(graph, config, updatehash=False)

Instruct the plugin to execute the workflow graph.

The core plugin member that should be implemented by all plugins.

Parameters:
  • graph – a networkx, flattened DAG to be executed

  • config (config) – a nipype.config object

  • updatehash (bool) – whether cached nodes with stale hash should be just updated.

class nipype.pipeline.plugins.base.SGELikeBatchManagerBase(template, plugin_args=None)

Bases: nipype.pipeline.plugins.base.DistributedPluginBase

Execute workflow with SGE/OGE/PBS like batch system