bbp_workflow.task#
Collection of base tasks for the Workflow engine.
Classes
|
Standard set of environment configuration parameters. |
|
Allocate ipyparallel cluster and run |
|
|
|
Knowledge Graph configuration parameters. |
|
Base class for Knowledge Graph enabled tasks. |
|
Base class for Knowledge Graph lookup tasks. |
|
Creates a folder on the host file system. |
|
Creates a python virtual environment on the host file system. |
|
Common configuration for tasks producing output at the specified file system location. |
|
Add |
|
Sbatch task. |
|
Standard set of Slurm configuration parameters. |
|
Srun task. |
- class bbp_workflow.task.EnvCfg(*args, **kwargs)#
Bases:
ConfigStandard set of environment configuration parameters.
- enable_internet#
- env#
- module_archive#
- module_path#
- modules#
- virtual_env#
- class bbp_workflow.task.IPyParallel(*args, **kwargs)#
Bases:
_JobPathMixin,TaskAllocate ipyparallel cluster and run
remote_script.Inherits
SlurmCfg,EnvCfgparameters, enabling customization of this task.- args#
- modules#
- ntasks#
- class bbp_workflow.task.IPyParallelExclusive(*args, **kwargs)#
Bases:
IPyParallelIPyParallelwhich uses exclusive nodes with engine(task) per cpus.- cpus_per_task#
- exclusive#
- mem#
- class bbp_workflow.task.KgCfg(*args, **kwargs)#
Bases:
ConfigKnowledge Graph configuration parameters.
- kg_base#
- kg_org#
- kg_proj#
- class bbp_workflow.task.KgTask(*args, **kwargs)#
-
Base class for Knowledge Graph enabled tasks.
- done(msg, entity)#
Mark output as done and print entity URL.
- from_file(*args, **kwargs)#
Delegate to DataDownload
from_filemethod using kg params from the task.
- from_id(entity_cls, resource_id, on_no_result=None)#
Delegate to entity
from_idmethod using kg params from the task.
- from_json_str(*args, **kwargs)#
Delegate to DataDownload
from_json_strmethod using kg params from the task.
- make_web_link(resource_id)#
Make link to nexus web from the
resource_id.
- name#
- output()#
- publish(entity, **kwargs)#
Delegate to entity
publishmethod using kg params from the task.
- class bbp_workflow.task.LookupKgEntity(*args, **kwargs)#
Bases:
KgCfg,ExternalTaskBase class for Knowledge Graph lookup tasks.
- url#
- class bbp_workflow.task.MakeRemoteFolder(*args, **kwargs)#
Bases:
TaskCreates a folder on the host file system.
- output()#
RemoteTarget(path=self.path).
- path#
- class bbp_workflow.task.MakeVirtualEnv(*args, **kwargs)#
Bases:
TaskCreates a python virtual environment on the host file system.
Usage:
bbp-workflow launch --follow bbp_workflow.task MakeVirtualEnv \ virtual-env=/gpfs/bbp.cscs.ch/home/${USER}/tmp/venv \ modules=py-bbp-workflow \ packages='bmtk'
- install_luigi#
- module_archive#
- modules#
- output()#
RemoteTarget(self.host,self.virtual_env).
- packages#
- requirements#
- virtual_env#
- class bbp_workflow.task.OutputCfg(*args, **kwargs)#
Bases:
ConfigCommon configuration for tasks producing output at the specified file system location.
- path_prefix#
- class bbp_workflow.task.RemoteHostCfg(*args, **kwargs)#
Bases:
ConfigAdd
hostparameter to your task using this mixin.- host#
- class bbp_workflow.task.SbatchTask(*args, **kwargs)#
Bases:
_JobPathMixin,TaskSbatch task.
Inherits
SlurmCfg,EnvCfg,RemoteHostCfgparameters, enabling customization of this task.- args#
- command#
- class bbp_workflow.task.SlurmCfg(*args, **kwargs)#
Bases:
ConfigStandard set of Slurm configuration parameters.
Slurm based tasks will extend this class, so they can be parametrized the same way.
- account#
- chdir#
- constraint#
- cpus_per_task#
- exclusive#
- job_name#
- job_output#
- mem#
- mem_per_cpu#
- mpi#
- nodes#
- ntasks#
- ntasks_per_node#
- partition#
- qos#
- time#
- class bbp_workflow.task.SrunTask(*args, **kwargs)#
Bases:
TaskSrun task.
Inherits
SlurmCfg,EnvCfg,RemoteHostCfgparameters, enabling customization of this task.- args#
- command#
- return_result#
- run()#
Will run
self.commandon theself.hostusing SLURM allocation.If the task which extends
SrunTaskimplementsself.remote_script, the source of theself.remote_scriptmethod will be stored in a tmp file. This tmp file will be submitted as the first argument to theself.commandandself.argswill follow.