How karthik-valmiki/ml_project works
Pyanm is a network-flow and bot-intrusion detection platform. The user-facing workflow selects a holdout traffic scenario, submits its features for inference, and displays the classification, probabilities, and latency. The API also supports batch inference, health/navigation information, and dataset and model-review reports. The README describes the offline lifecycle from UNSW-NB15 preprocessing through validation and model selection; those notebook stages are documented capabilities, while their internal implementation was not sampled.
Main entry points: model_service.py Model service · predict.py Prediction endpoints · main.py FastAPI application · app.js Dashboard interactions
Components 15
Dashboard
- Web dashboard
frontend/index.html - Dashboard interactions
frontend/js/app.js
API
- FastAPI application
app/main.py - System endpoints
app/api/system.py - Review reports
app/api/reports.py - Prediction endpoints
app/api/predict.py - Prediction schemas
app/schemas/prediction.py - Runtime settings
app/core/config.py
Inference
- Model service
app/services/model_service.py
Data and Models
- Trained models and scenarios
models - Cleaned data and summaries
Cleaned_DS
ML Lifecycle
- Data engineering
EDA.ipynb - Baseline validation
Model_Validation.ipynb - PCA and ensembles
Dimentionality_Reduction.ipynb
Other components
- Dashboard user
Connections 21
- Dashboard user → Web dashboard: uses
README.md - Web dashboard → Dashboard interactions: loads
- Dashboard interactions → Prediction endpoints: submits flow
frontend/js/app.js - Dashboard interactions → Prediction endpoints: fetches scenarios
frontend/js/app.js - Dashboard interactions → Web dashboard: renders results
frontend/js/app.js - FastAPI application → System endpoints: registers router
app/main.py - FastAPI application → Review reports: registers router
app/main.py - FastAPI application → Prediction endpoints: registers router
app/main.py - FastAPI application → Web dashboard: serves dashboard
app/main.py - Prediction endpoints → Prediction schemas: validates requests
app/api/predict.py - Prediction endpoints → Model service: requests inference
app/api/predict.py - Review reports → Model service: reads summaries
app/api/reports.py - Review reports → Cleaned data and summaries: reads overview metadata
app/api/reports.py - System endpoints → Model service: reports model status
app/api/system.py - System endpoints → Runtime settings: reads application settings
app/api/system.py - Model service → Runtime settings: gets artifact directories
app/services/model_service.py - Model service → Trained models and scenarios: loads models and scenarios
app/services/model_service.py - Model service → Cleaned data and summaries: loads review summaries
app/services/model_service.py - Data engineering → Cleaned data and summaries: exports standardized features
README.md - Baseline validation → Cleaned data and summaries: reports baseline metrics
README.md - PCA and ensembles → Trained models and scenarios: produces champion model
README.md