mirror of
https://github.com/msitarzewski/agency-agents.git
synced 2026-10-19 09:34:56 +00:00
fix(workflows): preserve comparisons with zero cost baselines
Signed-off-by: Rudy Celekli <rudy@gradiahq.com>
This commit is contained in:
@@ -246,7 +246,7 @@ class WorkflowOptimizer:
|
||||
|
||||
def calculate_improvement_impact(self, current_metrics: WorkflowMetrics,
|
||||
optimized_metrics: WorkflowMetrics) -> Dict:
|
||||
"""Calculate quantified improvement impact"""
|
||||
"""Calculate impact; a zero cost baseline has no defined percentage."""
|
||||
improvements = {
|
||||
"cycle_time_reduction": {
|
||||
"absolute": current_metrics.total_cycle_time - optimized_metrics.total_cycle_time,
|
||||
@@ -255,8 +255,11 @@ class WorkflowOptimizer:
|
||||
},
|
||||
"cost_reduction": {
|
||||
"absolute": current_metrics.cost_per_execution - optimized_metrics.cost_per_execution,
|
||||
"percentage": ((current_metrics.cost_per_execution - optimized_metrics.cost_per_execution)
|
||||
/ current_metrics.cost_per_execution) * 100
|
||||
"percentage": (
|
||||
((current_metrics.cost_per_execution - optimized_metrics.cost_per_execution)
|
||||
/ current_metrics.cost_per_execution) * 100
|
||||
if current_metrics.cost_per_execution != 0 else None
|
||||
)
|
||||
},
|
||||
"quality_improvement": {
|
||||
"absolute": current_metrics.error_rate - optimized_metrics.error_rate,
|
||||
@@ -457,4 +460,4 @@ You're successful when:
|
||||
|
||||
---
|
||||
|
||||
**Instructions Reference**: Your comprehensive workflow optimization methodology is in your core training - refer to detailed process improvement techniques, automation strategies, and change management frameworks for complete guidance.
|
||||
**Instructions Reference**: Your comprehensive workflow optimization methodology is in your core training - refer to detailed process improvement techniques, automation strategies, and change management frameworks for complete guidance.
|
||||
|
||||
Reference in New Issue
Block a user