Skip to content

laboneq.workflow.result

Workflow result objects.

TaskResult(task, output, input=None, start_time=None, end_time=None, index=None)

Task execution result.

The instance holds execution information of an task.

Parameters:

Name Type Description Default
task task_

Task producing the results.

required
output object

Output of the task.

required
input dict | None

Input parameters of the task.

None
start_time datetime | None

Start time of the execution.

None
end_time datetime | None

End time of the execution.

None
index tuple[object] | None

Index of the task.

None

end_time property

Time when the task has ended regularly or failed.

func property

Underlying function.

index property

Index of the task.

input property

Input parameters of the task.

name property

Task name.

output property

Output of the task.

src property

Source code of the task.

start_time property

Time when the task has started.

task property

Task producing the result.

WorkflowResult(name, output=None, input=None, start_time=None, end_time=None, index=None)

Workflow execution result.

The instance holds execution information of an workflow.

Parameters:

Name Type Description Default
name str

Name of the workflow.

required
output Any

Output of the workflow.

None
input dict | None

Input parameters of the workflow.

None
start_time datetime | None

Start time of the execution.

None
end_time datetime | None

End time of the execution.

None
index tuple[object] | None

Index of the workflow.

None

end_time property

The time when the workflow execution has ended regularly or failed.

index property

Index of the workflow.

input property

Input of the workflow.

name property

Name of the workflow producing the results.

output property

Output of the workflow.

start_time property

The time when the workflow execution has started.

tasks property

Task entries of the workflow.

The ordering of the tasks is the order of the execution.

Tasks is a Sequence of tasks, however item lookup is modified to support the following cases:

Example
wf = my_workflow.run()
wf.tasks["run_experiment"]  # First task of name 'run_experiment'
wf.tasks["run_experiment", :]  # All tasks named 'run_experiment'
wf.tasks["run_experiment", 1:5]  # Slice tasks named 'run_experiment'
wf.tasks[0]  # First executed task
wf.tasks[0:5]  # Slicing

wf.tasks.unique()  # Unique task names