-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy path8_visualization.py
More file actions
55 lines (43 loc) · 1.88 KB
/
8_visualization.py
File metadata and controls
55 lines (43 loc) · 1.88 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
54
55
#!/usr/bin/env python3
"""
Step 8: Visualization Processing (Thin Orchestrator)
This step handles visualization processing for GNN files with comprehensive
safe-to-fail patterns and robust output management.
Architectural Role:
This is a "thin orchestrator" - a minimal script that delegates core functionality
to the corresponding module (src/visualization/). It handles argument parsing, logging
setup, and calls the actual processing functions from the visualization module.
Pipeline Flow:
main.py → 8_visualization.py (this script) → visualization/ (modular implementation)
How to run:
python src/8_visualization.py --target-dir input/gnn_files --output-dir output --verbose
python src/main.py # (runs as part of the pipeline)
Expected outputs:
- Visualization results in the specified output directory
- Matrix visualizations, network graphs, and combined analysis plots
- Comprehensive visualization reports and summaries
- Actionable error messages if dependencies or paths are missing
- Clear logging of all resolved arguments and paths
If you encounter errors:
- Check that visualization dependencies are installed
- Check that src/visualization/ contains visualization modules
- Check that the output directory is writable
- Verify visualization configuration and requirements
"""
import sys
from pathlib import Path
# Add src to path for imports
sys.path.insert(0, str(Path(__file__).parent))
from utils.pipeline_template import create_standardized_pipeline_script
from visualization import process_visualization
# Create the standardized pipeline script
run_script = create_standardized_pipeline_script(
"8_visualization.py",
process_visualization,
"Matrix and network visualization processing"
)
def main() -> int:
"""Main entry point for the visualization step."""
return run_script()
if __name__ == "__main__":
raise SystemExit(main())