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: datetime | None property

Time when the task has ended regularly or failed.

func: Callable property

Underlying function.

index: tuple[object] | None property

Index of the task.

input: dict property

Input parameters of the task.

name: str property

Task name.

output: object property

Output of the task.

src: str property

Source code of the task.

start_time: datetime | None property

Time when the task has started.

task: 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: datetime | None property

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

index: tuple[object] | None property

Index of the workflow.

input: dict property

Input of the workflow.

name: str property

Name of the workflow producing the results.

output: Any property

Output of the workflow.

start_time: datetime | None property

The time when the workflow execution has started.

tasks: TaskView 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