Components Reference
Workflow Analyzer
WorkflowAnalyzer()
The WorkflowAnalyzer
class provides tools to analyze and optimize workflows built using the Workflow
class. It offers insights into critical paths, parallel execution opportunities, and dependency visualizations, enabling you to fine-tune workflows for efficiency.
Parameters
workflow
(Workflow object): The workflow to be analyzed. This must be an instance of theWorkflow
class.size
(float): (Optional) The width of the component in a row. Defaults to1.0
(full row). See the Layout Guide for details.
Methods
analyzer.get_critical_path()
Identifies the critical path in the workflow. The critical path represents the sequence of dependent atoms that determines the total execution time.
Returns:
critical_path
(list): A list of atom names in the critical path, highlighting the workflow bottleneck.
analyzer.get_parallel_groups()
Identifies groups of atoms that can be computed in parallel, helping you optimize execution.
Returns:
parallel_groups
(list of lists): Each sublist contains atom names that can be computed simultaneously.
analyzer.visualize(highlight_path=None, title="Workflow Dependency Graph")
Generates a DAG (Directed Acyclic Graph) visualization of the workflow.
Parameters:
highlight_path
(list, optional): A list of atom names to highlight in the visualization (e.g., the critical path). If not provided, the entire DAG is displayed.title
(str, optional): The title of the visualization. Defaults to"Workflow Dependency Graph"
.
Returns:
- Plotly Chart: An interactive visualization of the workflow’s dependencies.
Usage Example
Key Features
-
Critical Path Analysis:
- Identify workflow bottlenecks.
- Optimize the sequence of computations.
-
Parallel Execution Groups:
- Highlight opportunities for parallel processing.
- Improve efficiency in workflows with independent atoms.
-
Interactive DAG Visualization:
- Explore dependencies visually.
- Highlight specific paths for focused analysis.
Why Use WorkflowAnalyzer
?
- Optimize Performance: Identify critical paths and parallelizable tasks.
- Visualize Complex Workflows: Clearly understand dependencies and bottlenecks.
- Fine-Tune Workflows: Gain actionable insights for optimization.
Elevate your workflow analysis and optimization with WorkflowAnalyzer
! 🔬
Was this page helpful?