woom.workflow.Workflow#
- class woom.workflow.Workflow(cfgfile, taskmanager)[source]#
- __init__(cfgfile, taskmanager)[source]#
Initialize a workflow
- Parameters:
cfgfile (str or configobj.ConfigObj) – Path to workflow configuration file or configuration object
taskmanager (TaskManager) – Task manager instance
Attributes
Workflow
ConfigObjconfiguration instanceContext to be used for rendering
List of
CycleCurrent
HostinstanceCurrent
jobmanager instanceList of
MemberNumber of ensemble members
dictof standard paths that must be prependedGenerator of submission directories computed from the task tree
Current
TaskTreeCurrent
TaskManagerinstanceWhere we are running the workflow
Methods
clean([submission_dirs, log_files, ...])Remove working files and directories
clean_task(task_name[, cycle, member])Remove job specific files for this task
Fill template file of a task in a context
get_app_path([sep])Typically app/conf/exp or ''
get_artifacts([task_name, cycle, member])Get artifacts as a
pandas.DataFrameget_context([task_name, cycle, member, ...])Get an instance of
woom.context.Contexttask renderingget_cycle(cycle)get_member(member)Get a valid
Memberinstance from its :attr:`~woom.iters.Member.label ` string .Get the run directories as
pandas.DataFrameget_status([running, colorize])Get the workflow task status as a
pandas.DataFrameGet the submission directories as
pandas.DataFrameget_task(task_name)Shortcut to
self.taskmanager.get_task(task_name)get_task_artifact_paths(artifact_name, task_name)Get the paths of an artifact of a given task across cycles and members
get_task_artifacts(task_name[, cycle, ...])Get the paths of all artifacts of a given task across cycles and members
get_task_cycle(task_name, cycle)Like
get_cycle()but check that it is compatible with a given taskget_task_items(getter, task_name[, cycle, ...])Loop on cycles and members to retreive task items
get_task_member(task_name, member)Like
get_member()but check that it is compatible with a given taskget_task_members(task_name)Get the list of members if applicable or None
get_task_path(task_name[, cycle, member, sep])Concatenate the
app_path, the cycle and, task_name and the member labelget_task_run_dir(task_name[, cycle, member, ...])Get where the command lines are executed in the script
get_task_status(task_name[, cycle, member])Get the job status of a task
get_task_submission_dir(task_name[, cycle, ...])Where the batch script is created and submitted
is_task_blocking(task_name)Is this task blocking?
is_task_skipped(task_name)Is this task skipped?
kill([jobid, task_name, cycle, member])Kill all running jobs specific to this workflow
run([dry, force, skip])Run the workflow by submiting all tasks
set_context([task_name, cycle, member, ...])Get and set the context used for rendering
show_artifacts([tablefmt])Show the status of all the tasks of the wokflow
Display an overview of the workflow, like its task tree and cycles
show_run_dirs([tablefmt])Show the run directory of all the tasks of the wokflow
show_status([running, tablefmt, colorize])Show the status of all the tasks of the wokflow
show_submission_dirs([tablefmt])Show the submission directory of all the tasks of the wokflow
Submit a sentinel job that regularly checks the status of all task jobs
submit_task([depend, blocking])Submit a task
submit_task_fake([depend, blocking])Don't submit a task, just display it
Terminate blocking jobs