agents.planning.rewoo.models.join_step¶
Join Step - Automatic DAG and Parallelization with Auto-detection.
Inspired by haive.core.common.structures.tree, this implements a JoinStep that automatically detects parallel branches and creates join points for DAG execution.
Similar to AutoTree’s pattern of automatically detecting BaseModel relationships, JoinStep automatically detects step dependencies and creates optimal join points for parallel execution.
Classes¶
A step that automatically creates join points for parallel execution. |
|
Strategies for joining parallel branches. |
Module Contents¶
- class agents.planning.rewoo.models.join_step.JoinStep(**data)¶
Bases:
agents.planning.rewoo.models.steps.AbstractStep
A step that automatically creates join points for parallel execution.
Like AutoTree automatically detects BaseModel relationships, JoinStep automatically detects dependency patterns and creates optimal join points.
This enables automatic DAG creation where parallel branches are automatically detected and joined at the optimal points.
Init .
- Returns:
Add return description]
- Return type:
[TODO
- classmethod analyze_dag_structure(steps)¶
Analyze entire DAG structure and suggest join optimizations.
Like AutoTree’s tree analysis, this provides DAG-wide analysis.
- Parameters:
steps (list[agents.planning.rewoo.models.steps.AbstractStep])
- Return type:
- analyze_dependency_patterns(all_steps)¶
Analyze dependency patterns across all steps to detect DAG structure.
Similar to how AutoTree analyzes type relationships, this analyzes step dependency relationships to detect optimal parallelization.
- Parameters:
all_steps (list[agents.planning.rewoo.models.steps.AbstractStep])
- Return type:
- can_execute(completed_steps)¶
Check if this join step can execute based on strategy.
- classmethod create_auto_join(description, dependencies, strategy=JoinStrategy.WAIT_ALL, **kwargs)¶
Factory method to create a JoinStep with automatic detection.
- Parameters:
description (str)
strategy (JoinStrategy)
- Return type:
- property can_optimize_parallel: bool¶
Whether this join can be optimized for parallel execution.
- Return type:
- property estimated_wait_time: float¶
Estimated wait time based on join strategy and branch count.
- Return type: