-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy path24_intelligent_analysis.py
More file actions
53 lines (43 loc) · 1.56 KB
/
Copy path24_intelligent_analysis.py
File metadata and controls
53 lines (43 loc) · 1.56 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
#!/usr/bin/env python3
"""
Step 24: Intelligent Pipeline Analysis
This step performs an intelligent analysis of the pipeline execution using
the available LLM infrastructure. It reads the pipeline summary and logs,
analyzes failures or performance bottlenecks, and generates an executive report.
This script uses the intelligent_analysis module for all processing logic.
"""
import sys
from pathlib import Path
from typing import cast
# Add src to path for imports
sys.path.insert(0, str(Path(__file__).parent))
from intelligent_analysis import process_intelligent_analysis
from utils.pipeline_template import create_standardized_pipeline_script
# Create the runnable script using the standardized template
run_script = create_standardized_pipeline_script(
"24_intelligent_analysis.py",
process_intelligent_analysis,
"Intelligent analysis of pipeline execution logs",
additional_arguments={
"analysis_model": {
"type": str,
"help": "LLM model tag (default: OLLAMA_MODEL env or repository default in llm.defaults)",
"default": None,
},
"skip_llm": {
"type": bool,
"help": "Skip LLM-powered analysis (use only rule-based)",
"default": False,
},
"bottleneck_threshold": {
"type": float,
"help": "Duration threshold (seconds) for bottleneck detection",
"default": 60.0,
},
},
)
def main() -> int:
"""Main entry point."""
return cast("int", run_script())
if __name__ == "__main__":
raise SystemExit(main())