Spaces:
Sleeping
Sleeping
Commit Β·
6cd2d76
1
Parent(s): 9f28e8f
Update 2026-03-25 16:44:28
Browse files- mlops/datasets.py +4 -1
- pipelines/pipeline_defs.py +1 -1
- static/css/style.css +20 -0
- templates/dashboard.html +73 -3
mlops/datasets.py
CHANGED
|
@@ -74,8 +74,11 @@ def load_dataset(name: str, test_size: float = 0.2, random_state: int = 42):
|
|
| 74 |
list(data.target_names) if hasattr(data, "target_names") else None
|
| 75 |
)
|
| 76 |
|
|
|
|
|
|
|
|
|
|
| 77 |
X_train, X_test, y_train, y_test = train_test_split(
|
| 78 |
-
X, y, test_size=test_size, random_state=random_state
|
| 79 |
)
|
| 80 |
|
| 81 |
metadata = {
|
|
|
|
| 74 |
list(data.target_names) if hasattr(data, "target_names") else None
|
| 75 |
)
|
| 76 |
|
| 77 |
+
# Stratify classification splits so each class is proportionally
|
| 78 |
+
# represented in the test set β avoids overly easy / hard partitions.
|
| 79 |
+
stratify = y if cfg["task"] == "classification" else None
|
| 80 |
X_train, X_test, y_train, y_test = train_test_split(
|
| 81 |
+
X, y, test_size=test_size, random_state=random_state, stratify=stratify
|
| 82 |
)
|
| 83 |
|
| 84 |
metadata = {
|
pipelines/pipeline_defs.py
CHANGED
|
@@ -31,7 +31,7 @@ def _train_model(ctx, results):
|
|
| 31 |
import mlflow, mlflow.sklearn
|
| 32 |
|
| 33 |
ds = ctx.get("dataset", "Iris Flowers")
|
| 34 |
-
cat = ctx.get("category", "
|
| 35 |
alg = ctx.get("algorithm", "Random Forest")
|
| 36 |
task = ctx.get("task_type", "classification")
|
| 37 |
|
|
|
|
| 31 |
import mlflow, mlflow.sklearn
|
| 32 |
|
| 33 |
ds = ctx.get("dataset", "Iris Flowers")
|
| 34 |
+
cat = ctx.get("category", "Tree-Based")
|
| 35 |
alg = ctx.get("algorithm", "Random Forest")
|
| 36 |
task = ctx.get("task_type", "classification")
|
| 37 |
|
static/css/style.css
CHANGED
|
@@ -485,6 +485,26 @@ tr:hover td { background: var(--bg-hover); }
|
|
| 485 |
.empty-state-icon { font-size: 3rem; margin-bottom: 12px; }
|
| 486 |
.empty-state-title { font-size: 1rem; font-weight: 600; color: var(--text-secondary); margin-bottom: 6px; }
|
| 487 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 488 |
/* ββ Light theme ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ */
|
| 489 |
[data-theme="light"] {
|
| 490 |
--bg-primary: #f6f8fa;
|
|
|
|
| 485 |
.empty-state-icon { font-size: 3rem; margin-bottom: 12px; }
|
| 486 |
.empty-state-title { font-size: 1rem; font-weight: 600; color: var(--text-secondary); margin-bottom: 6px; }
|
| 487 |
|
| 488 |
+
/* ββ Workflow banner ββββββββββββββββββββββββββββββββββββββββββββββββββββββββ */
|
| 489 |
+
.workflow-step {
|
| 490 |
+
display: flex; flex-direction: column; align-items: center; gap: 5px;
|
| 491 |
+
font-size: .75rem; font-weight: 500; color: var(--text-secondary);
|
| 492 |
+
padding: 8px 14px;
|
| 493 |
+
background: var(--bg-secondary);
|
| 494 |
+
border: 1px solid var(--border-color);
|
| 495 |
+
border-radius: var(--radius-sm);
|
| 496 |
+
min-width: 80px; text-align: center;
|
| 497 |
+
}
|
| 498 |
+
.workflow-step i { font-size: 1.1rem; }
|
| 499 |
+
.workflow-arrow {
|
| 500 |
+
color: var(--text-muted); font-size: .8rem;
|
| 501 |
+
padding: 0 6px;
|
| 502 |
+
}
|
| 503 |
+
@media (max-width: 768px) {
|
| 504 |
+
.workflow-arrow { display: none; }
|
| 505 |
+
.workflow-step { min-width: 60px; padding: 6px 8px; font-size: .7rem; }
|
| 506 |
+
}
|
| 507 |
+
|
| 508 |
/* ββ Light theme ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ */
|
| 509 |
[data-theme="light"] {
|
| 510 |
--bg-primary: #f6f8fa;
|
templates/dashboard.html
CHANGED
|
@@ -11,8 +11,78 @@
|
|
| 11 |
{% endblock %}
|
| 12 |
|
| 13 |
{% block content %}
|
| 14 |
-
<div class="page-title">Overview</div>
|
| 15 |
-
<div class="page-sub">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 16 |
|
| 17 |
<!-- Stat cards -->
|
| 18 |
<div class="stat-grid">
|
|
@@ -57,7 +127,7 @@
|
|
| 57 |
<!-- Recent runs -->
|
| 58 |
<div class="card">
|
| 59 |
<div class="card-header">
|
| 60 |
-
<div class="card-title"><i class="fa-solid fa-clock-rotate-left" style="color:var(--warning)"></i> Recent Runs</div>
|
| 61 |
<a href="/experiments" class="btn btn-ghost btn-sm">View all <i class="fa-solid fa-arrow-right"></i></a>
|
| 62 |
</div>
|
| 63 |
<div class="table-wrap">
|
|
|
|
| 11 |
{% endblock %}
|
| 12 |
|
| 13 |
{% block content %}
|
| 14 |
+
<div class="page-title">Platform Overview</div>
|
| 15 |
+
<div class="page-sub">AutoML experiment sweeps + Airflow-style pipeline orchestration, tracked end-to-end with MLflow</div>
|
| 16 |
+
|
| 17 |
+
<!-- ββ Tech stack explanation βββββββββββββββββββββββββββββββββββββββββββ -->
|
| 18 |
+
<div class="grid-2 mb-20">
|
| 19 |
+
|
| 20 |
+
<div class="card tech-card" style="border-top:3px solid var(--accent)">
|
| 21 |
+
<div class="card-header" style="margin-bottom:10px">
|
| 22 |
+
<div class="card-title">
|
| 23 |
+
<i class="fa-solid fa-wand-magic-sparkles" style="color:var(--accent)"></i>
|
| 24 |
+
AutoML Engine
|
| 25 |
+
</div>
|
| 26 |
+
<span class="badge badge-purple">scikit-learn Β· XGBoost Β· LightGBM</span>
|
| 27 |
+
</div>
|
| 28 |
+
<p style="font-size:.84rem;color:var(--text-secondary);line-height:1.6;margin-bottom:12px">
|
| 29 |
+
Sweeps <strong>50+ algorithms</strong> across Linear, Tree-Based, Ensemble, SVM, KNN and Neural Network families.
|
| 30 |
+
Every trial is logged to MLflow β metrics, params, and serialised model artefacts.
|
| 31 |
+
Use the <a href="/automl">AutoML</a> page to rank algorithms on any dataset in one click.
|
| 32 |
+
</p>
|
| 33 |
+
<div style="display:flex;gap:8px;flex-wrap:wrap">
|
| 34 |
+
<span class="badge badge-muted"><i class="fa-solid fa-robot" style="color:var(--accent)"></i> 50+ Algorithms</span>
|
| 35 |
+
<span class="badge badge-muted"><i class="fa-solid fa-chart-line" style="color:var(--accent-blue)"></i> MLflow Tracking</span>
|
| 36 |
+
<span class="badge badge-muted"><i class="fa-solid fa-trophy" style="color:var(--warning)"></i> Auto-Ranking</span>
|
| 37 |
+
<span class="badge badge-muted"><i class="fa-solid fa-code-branch" style="color:var(--success)"></i> Model Registry</span>
|
| 38 |
+
</div>
|
| 39 |
+
</div>
|
| 40 |
+
|
| 41 |
+
<div class="card tech-card" style="border-top:3px solid var(--accent-blue)">
|
| 42 |
+
<div class="card-header" style="margin-bottom:10px">
|
| 43 |
+
<div class="card-title">
|
| 44 |
+
<i class="fa-solid fa-diagram-project" style="color:var(--accent-blue)"></i>
|
| 45 |
+
Pipeline Orchestration
|
| 46 |
+
</div>
|
| 47 |
+
<span class="badge badge-info">Airflow-inspired DAG engine</span>
|
| 48 |
+
</div>
|
| 49 |
+
<p style="font-size:.84rem;color:var(--text-secondary);line-height:1.6;margin-bottom:12px">
|
| 50 |
+
Runs ML workflows as <strong>Directed Acyclic Graphs</strong> β the same paradigm used by Apache Airflow.
|
| 51 |
+
Three built-in pipelines: <em>Training</em> (ingest β train β register β deploy),
|
| 52 |
+
<em>Retraining</em> (drift detection β retrain β A/B test β promote), and
|
| 53 |
+
<em>Data Processing</em> (clean β encode β scale β feature store).
|
| 54 |
+
</p>
|
| 55 |
+
<div style="display:flex;gap:8px;flex-wrap:wrap">
|
| 56 |
+
<span class="badge badge-muted"><i class="fa-solid fa-network-wired" style="color:var(--accent-blue)"></i> DAG Execution</span>
|
| 57 |
+
<span class="badge badge-muted"><i class="fa-solid fa-wave-square" style="color:var(--danger)"></i> Drift Detection</span>
|
| 58 |
+
<span class="badge badge-muted"><i class="fa-solid fa-rotate" style="color:var(--success)"></i> Auto-Retraining</span>
|
| 59 |
+
<span class="badge badge-muted"><i class="fa-solid fa-rocket" style="color:var(--warning)"></i> Staging Deploy</span>
|
| 60 |
+
</div>
|
| 61 |
+
</div>
|
| 62 |
+
|
| 63 |
+
</div>
|
| 64 |
+
|
| 65 |
+
<!-- ββ Workflow banner ββββββββββββββββββββββββββββββββββββββββββββββββββ -->
|
| 66 |
+
<div class="card mb-20" style="background:linear-gradient(135deg,#8b5cf608,#3b82f608);border-color:var(--border-color);padding:16px 22px">
|
| 67 |
+
<div style="display:flex;align-items:center;gap:0;flex-wrap:wrap;justify-content:center">
|
| 68 |
+
<div class="workflow-step"><i class="fa-solid fa-database" style="color:var(--accent-blue)"></i><span>Load Dataset</span></div>
|
| 69 |
+
<div class="workflow-arrow"><i class="fa-solid fa-arrow-right"></i></div>
|
| 70 |
+
<div class="workflow-step"><i class="fa-solid fa-wand-magic-sparkles" style="color:var(--accent)"></i><span>AutoML Sweep</span></div>
|
| 71 |
+
<div class="workflow-arrow"><i class="fa-solid fa-arrow-right"></i></div>
|
| 72 |
+
<div class="workflow-step"><i class="fa-solid fa-flask" style="color:var(--success)"></i><span>MLflow Tracking</span></div>
|
| 73 |
+
<div class="workflow-arrow"><i class="fa-solid fa-arrow-right"></i></div>
|
| 74 |
+
<div class="workflow-step"><i class="fa-solid fa-diagram-project" style="color:var(--accent-blue)"></i><span>Pipeline DAG</span></div>
|
| 75 |
+
<div class="workflow-arrow"><i class="fa-solid fa-arrow-right"></i></div>
|
| 76 |
+
<div class="workflow-step"><i class="fa-solid fa-box-archive" style="color:var(--warning)"></i><span>Model Registry</span></div>
|
| 77 |
+
<div class="workflow-arrow"><i class="fa-solid fa-arrow-right"></i></div>
|
| 78 |
+
<div class="workflow-step"><i class="fa-solid fa-rocket" style="color:var(--danger)"></i><span>Deploy</span></div>
|
| 79 |
+
</div>
|
| 80 |
+
</div>
|
| 81 |
+
|
| 82 |
+
<!-- ββ Live metrics ββββββββββββββββοΏ½οΏ½οΏ½ββββββββββββββββββββββββββββββββββββ -->
|
| 83 |
+
<div class="page-sub" style="margin-top:4px;margin-bottom:12px">
|
| 84 |
+
<i class="fa-solid fa-chart-bar" style="color:var(--accent)"></i> Live Experiment Metrics
|
| 85 |
+
</div>
|
| 86 |
|
| 87 |
<!-- Stat cards -->
|
| 88 |
<div class="stat-grid">
|
|
|
|
| 127 |
<!-- Recent runs -->
|
| 128 |
<div class="card">
|
| 129 |
<div class="card-header">
|
| 130 |
+
<div class="card-title"><i class="fa-solid fa-clock-rotate-left" style="color:var(--warning)"></i> Recent Training Runs <span style="font-size:.75rem;font-weight:400;color:var(--text-muted);margin-left:6px">β each row is one MLflow-tracked experiment</span></div>
|
| 131 |
<a href="/experiments" class="btn btn-ghost btn-sm">View all <i class="fa-solid fa-arrow-right"></i></a>
|
| 132 |
</div>
|
| 133 |
<div class="table-wrap">
|