hoops_ai.flowmanager.flow
Quick Overview
Classes
Flow(name, specifications[, tasks])Class to manage and orchestrate the execution of multiple Tasks.
FlowOutput(flow_spec, task_instances, ...)Class to encapsulate the results, errors, and logs from the Flow execution.
Functions
setup_logger(name, log_directory)Sets up and returns a logger, placing the log file in the given directory.
- class hoops_ai.flowmanager.flow.Flow(name, specifications, tasks=None)
Bases:
objectClass to manage and orchestrate the execution of multiple Tasks.
- log_flow_summary()
Logs a summary of the flow execution, detailing each task’s inputs and outputs.
- print_flow_task_registry()
Prints information about tasks specifically assigned to this flow. This shows only the tasks that will be executed in this flow instance.
- process(inputs)
Executes the flow by running tasks in sequence based on their dependencies.
- class hoops_ai.flowmanager.flow.FlowOutput(flow_spec, task_instances, flow_name, time_to_process)
Bases:
objectClass to encapsulate the results, errors, and logs from the Flow execution.
- Parameters:
- generate_flow_summary(file_path)
Generates a JSON summary of the flow execution and saves it to a file.
- Parameters:
file_path (str) – The path to the file where the JSON summary will be saved.
- summary()
Generates a summary of the flow execution.
- Returns:
A formatted string summarizing the execution results.
- Return type:
- task_instances: List[ParallelTask]
- hoops_ai.flowmanager.flow.setup_logger(name, log_directory)
Sets up and returns a logger, placing the log file in the given directory.