Masonmason 080eb5b887 Add intelligent pipeline topology analysis and comprehensive UI framework
Major Features:
• Advanced topological sorting algorithm with cycle detection and resolution
• Intelligent pipeline optimization with parallelization analysis
• Critical path analysis and performance metrics calculation
• Comprehensive .mflow file converter for seamless UI-to-API integration
• Complete modular UI framework with node-based pipeline editor
• Enhanced model node properties (scpu_fw_path, ncpu_fw_path)
• Professional output formatting without emoji decorations

Technical Improvements:
• Graph theory algorithms (DFS, BFS, topological sort)
• Automatic dependency resolution and conflict prevention
• Multi-criteria pipeline optimization
• Real-time stage count calculation and validation
• Comprehensive configuration validation and error handling
• Modular architecture with clean separation of concerns

New Components:
• MFlow converter with topology analysis (core/functions/mflow_converter.py)
• Complete node system with exact property matching
• Pipeline editor with visual node connections
• Performance estimation and dongle management panels
• Comprehensive test suite and demonstration scripts

🤖 Generated with Claude Code (https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-10 12:58:47 +08:00

82 lines
2.2 KiB
Python

"""
Main application entry point for the Cluster4NPU UI application.
This module initializes the PyQt5 application, applies the theme, and launches
the main dashboard window. It serves as the primary entry point for the
modularized UI application.
Main Components:
- Application initialization and configuration
- Theme application and font setup
- Main window instantiation and display
- Application event loop management
Usage:
python -m cluster4npu_ui.main
# Or directly:
from cluster4npu_ui.main import main
main()
"""
import sys
import os
from PyQt5.QtWidgets import QApplication
from PyQt5.QtGui import QFont
from PyQt5.QtCore import Qt
# Add the parent directory to the path for imports
sys.path.insert(0, os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
from cluster4npu_ui.config.theme import apply_theme
from cluster4npu_ui.ui.windows.login import DashboardLogin
def setup_application():
"""Initialize and configure the QApplication."""
# Enable high DPI support BEFORE creating QApplication
QApplication.setAttribute(Qt.AA_EnableHighDpiScaling, True)
QApplication.setAttribute(Qt.AA_UseHighDpiPixmaps, True)
# Create QApplication if it doesn't exist
if not QApplication.instance():
app = QApplication(sys.argv)
else:
app = QApplication.instance()
# Set application properties
app.setApplicationName("Cluster4NPU")
app.setApplicationVersion("1.0.0")
app.setOrganizationName("Cluster4NPU Team")
# Set application font
app.setFont(QFont("Arial", 9))
# Apply the harmonious theme
apply_theme(app)
return app
def main():
"""Main application entry point."""
try:
# Setup the application
app = setup_application()
# Create and show the main dashboard login window
dashboard = DashboardLogin()
dashboard.show()
# Start the application event loop
sys.exit(app.exec_())
except Exception as e:
print(f"Error starting application: {e}")
import traceback
traceback.print_exc()
sys.exit(1)
if __name__ == '__main__':
main()