source/modelling/dashboard/app.py
source-code dashboard streamlit analytics
File Path: src/modelling/dashboard/app.py
Purpose: Entry point for the Streamlit Analytics Dashboard. Manage layout, state, and view navigation.
Overview
Initializes the Streamlit application, handles sidebar inputs (checkpoints, splits), manages session state for caching inference results, and renders different tabs based on user selection.
Functions
main()
Purpose: Main execution function for the dashboard.
Logic:
- Sidebar:
- Loads cached checkpoints via load_cached_checkpoints.
- Selects Data Split using
SplitType. - Button “Run Evaluation” triggers inference.
- State Management:
- Initializes
results,inspector_rnd_key, etc.
- Initializes
- Routing:
- if
resultsexist: Shows Global Metrics, Error Analysis. - Always shows: Sample Inspector, Augmentation Lab.
- if
- Rendering:
- Calls view functions from views.py.
Calls:
- loader.load_cached_checkpoints()
- loader.load_cached_model()
- loader.run_inference()
- views.render_metrics_view()
- views.render_error_view()
- views.render_inspector_view()
Related Documentation
- Training Process
- views.py - UI Components
- loader.py - Data Access
File Location: src/modelling/dashboard/app.py