pydra.engine.task module
Implement processing nodes.
Notes:
Environment specs
neurodocker json
singularity file+hash
docker hash
conda env
niceman config
environment variables
Monitors/Audit
internal monitor
external monitor
callbacks
Resuming
internal tracking
external tracking (DMTCP)
Provenance
Local fragments
Remote server
Isolation
Working directory
File (copy to local on write)
read only file system
- class pydra.engine.task.FunctionTask(func: Callable, audit_flags: AuditFlag = AuditFlag.NONE, cache_dir=None, cache_locations=None, input_spec: SpecInfo | BaseSpec | None = None, cont_dim=None, messenger_args=None, messengers=None, name=None, output_spec: SpecInfo | BaseSpec | None = None, rerun=False, **kwargs)
Bases:
TaskBase
Wrap a Python callable as a task element.
- class pydra.engine.task.ShellCommandTask(audit_flags: ~pydra.utils.messenger.AuditFlag = AuditFlag.NONE, cache_dir=None, input_spec: ~pydra.engine.specs.SpecInfo | None = None, cont_dim=None, messenger_args=None, messengers=None, name=None, output_spec: ~pydra.engine.specs.SpecInfo | None = None, rerun=False, strip=False, environment=<pydra.engine.environments.Native object>, **kwargs)
Bases:
TaskBase
Wrap a shell command as a task element.
- DEFAULT_COPY_COLLATION = 2
- property cmdline
Get the actual command line that will be submitted Returns a list if the task has a state.
- command_args(root=None)
Get command line arguments
- get_bindings(root: str | None = None) dict[str, tuple[str, str]]
Return bindings necessary to run task in an alternative root.
This is primarily intended for contexts when a task is going to be run in a container with mounted volumes.
- Parameters:
root (str)
- Returns:
bindings – Mapping from paths in the host environment to the target environment
- Return type:
- input_spec = None
- output_spec = None