mosaic_utils

This module contains helper functions for the mosaic framework

exception mosaic_orchestrator.mosaic_utils.TaskTreeException[source]

raised if the task tree can not be constructed

mosaic_orchestrator.mosaic_utils.find_node(task_tree: TaskNode, path: Path, check_input: bool = True) Result[TaskNode][source]

Find a node identified by its path in a trask tree

Parameters:

check_input – when True the path is expected to point to a Input which is then checked to be valid.

Returns:

A result containing the TaskNode if it was found or an error if it was not found.

mosaic_orchestrator.mosaic_utils.find_task(task: Task, path: Path)[source]

Get a subtask of the given task identified by the relative path

Parameters:
  • task – the task that is used as a root

  • path – the path to the target subtask. it must be relative to the given task and include it as a root.

Returns:

the instance of the subtask.