MLFLOW EXPERIMENT TRACKING

Experiment Management

MLflow + DagsHub Integration

Centralized tracking of model metrics, parameters, and artifacts for reproducibility and comparison

# Setting up MLflow with DagsHub import mlflow import dagshub dagshub.init(repo_owner='MOHD-AFROZ-ALI', repo_name='ml-phish-detector', mlflow=True) # Tracking experiments with MLflow with mlflow.start_run(): f1_score = classificationmetric.f1_score precision_score = classificationmetric.precision_score recall_score = classificationmetric.recall_score mlflow.log_metric("f1_score", f1_score) mlflow.log_metric("precision", precision_score) mlflow.log_metric("recall_score", recall_score) mlflow.sklearn.log_model(best_model, "model")

Recent Experiment Runs

Historical tracking of model iterations and performance improvements

RUN_ID: 89f23a1c
Random Forest (n=256)
f1=0.96 precision=0.95 recall=0.97
2 hours ago
RUN_ID: 72ae45b8
Gradient Boosting
f1=0.93 precision=0.94 recall=0.92
5 hours ago
RUN_ID: 35cf91d7
Random Forest (n=128)
f1=0.94 precision=0.93 recall=0.95
1 day ago

Performance Trends & Artifacts

Model Metric Progression

Tracking performance improvements across experiment runs

Artifact Management

Centralized storage and versioning of model files and preprocessors

Model Artifacts
  • model.pkl (12.3MB)
  • preprocessor.pkl (2.8MB)
  • requirements.txt (4KB)
Registered Models
  • phish-detector-v1.0
  • phish-detector-v0.9
  • phish-detector-v0.8

Experiment Tracking Benefits

Reproducibility

Complete record of code, data, parameters, and environment for reproducing results

Explainability

Transparent documentation of all model experiments for stakeholder review and compliance

Efficiency

Rapid experimentation and comparison with organized tracking of all training runs