gradia 1.0.0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,304 @@
1
+ <!DOCTYPE html>
2
+ <html lang="en">
3
+
4
+ <head>
5
+ <meta charset="UTF-8">
6
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
7
+ <title>gradia | Configure Experiment</title>
8
+ <link rel="stylesheet" href="/static/css/style.css">
9
+ <link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;600;700&display=swap" rel="stylesheet">
10
+ </head>
11
+
12
+ <body>
13
+ <div class="layout">
14
+ <aside class="sidebar">
15
+ <img src="/assets/logo.png" alt="gradia" class="brand-logo">
16
+
17
+ <div class="sidebar-section">
18
+ <div class="sidebar-label">Setup Context</div>
19
+ <div style="font-size: 0.9rem;">{{ scenario.target_column }}</div>
20
+ <div style="font-size: 0.8rem; color: #8e8ea0">{{ scenario.task_type }}</div>
21
+ </div>
22
+
23
+ <div class="sidebar-section">
24
+ <div class="sidebar-label">Features</div>
25
+ <div style="font-size: 0.8rem; color: #c5c5d2; line-height: 1.5;">
26
+ Found {{ features|length }} features available for training.
27
+ </div>
28
+ </div>
29
+
30
+ <div style="flex-grow:1"></div>
31
+
32
+ <div class="sidebar-section" style="font-size: 0.75rem; color: #565869;">
33
+ v1.3.0
34
+ </div>
35
+ </aside>
36
+
37
+ <main class="main" style="display: flex; align-items: center; justify-content: center;">
38
+ <div class="card"
39
+ style="width: 100%; max-width: 600px; padding: 40px; border: 1px solid rgba(255,255,255,0.1);">
40
+ <h2 style="margin-top: 0; border-bottom: none; font-size: 1.5rem; margin-bottom: 10px;">Configure
41
+ Experiment</h2>
42
+ <p style="color: var(--text-secondary); margin-bottom: 30px; margin-top:0;">Customize model parameters
43
+ and training duration.</p>
44
+
45
+ <!-- Analysis Animation -->
46
+ <div id="scan-container" style="text-align: center; padding: 40px; color: var(--accent);">
47
+ <span id="scan-text">Initializing scanner...</span>
48
+ </div>
49
+
50
+ <!-- Configuration Form -->
51
+ <form id="configForm" style="display: none; opacity: 0; transition: opacity 1s">
52
+ <div class="form-group">
53
+ <label>Project Name <small class="description">Identifier for this experiment.</small></label>
54
+ <input type="text" id="projectName" value="my-experiment-1"
55
+ style="width: 100%; padding: 12px; background: #0d1117; border: 1px solid #30363d; border-radius: 6px; color: #f0f6fc; font-family: inherit; font-size: 1rem; outline: none;">
56
+ </div>
57
+
58
+ <div class="form-group" style="display: flex; align-items: center; gap: 10px; margin-bottom: 25px;">
59
+ <input type="checkbox" id="saveModel" checked
60
+ style="width: 20px; height: 20px; accent-color: var(--success); cursor: pointer;">
61
+ <label for="saveModel" style="margin-bottom: 0; cursor: pointer;">Save Best Model
62
+ Checkpoint</label>
63
+ </div>
64
+
65
+ <div class="form-group">
66
+ <label>Model Architecture
67
+ <small class="description">Select the algorithm to train on your data.</small>
68
+ </label>
69
+ <div class="select-wrapper">
70
+ <select id="modelType" onchange="toggleFields()">
71
+ <optgroup label="Deep Learning">
72
+ <option value="cnn" {{ 'selected' if default_config.model.type=='cnn' else '' }}>CNN
73
+ (Image)</option>
74
+ <option value="mlp" {{ 'selected' if default_config.model.type=='mlp' else '' }}>MLP
75
+ (Neural Net)</option>
76
+ </optgroup>
77
+ <optgroup label="Linear Models">
78
+ <option value="sgd" {{ 'selected' if default_config.model.type=='sgd' else '' }}>SGD
79
+ (Iterative)</option>
80
+ <option value="logistic" {{ 'selected' if default_config.model.type=='logistic'
81
+ else '' }}>Logistic Regression</option>
82
+ <option value="linear" {{ 'selected' if default_config.model.type=='linear' else ''
83
+ }}>Linear Regression (Simple)</option>
84
+ </optgroup>
85
+ <optgroup label="Trees & Ensembles">
86
+ <option value="decision_tree" {{ 'selected' if
87
+ default_config.model.type=='decision_tree' else '' }}>Decision Tree (Visual)
88
+ </option>
89
+ <option value="random_forest" {{ 'selected' if
90
+ default_config.model.type=='random_forest' else '' }}>Random Forest</option>
91
+ <option value="adaboost" {{ 'selected' if default_config.model.type=='adaboost'
92
+ else '' }}>AdaBoost</option>
93
+ </optgroup>
94
+ <optgroup label="Support Vector & Neighbors">
95
+ <option value="svm" {{ 'selected' if default_config.model.type=='svm' else '' }}>
96
+ Support Vector Machine (SVM)</option>
97
+ <option value="knn" {{ 'selected' if default_config.model.type=='knn' else '' }}>
98
+ K-Nearest Neighbors (KNN)</option>
99
+ <option value="naive_bayes" {{ 'selected' if
100
+ default_config.model.type=='naive_bayes' else '' }}>Naive Bayes (Fast)</option>
101
+ </optgroup>
102
+ </select>
103
+ </div>
104
+ </div>
105
+
106
+ <!-- SGD / Linear Fields -->
107
+ <div id="sgdFields" class="model-params">
108
+ <div class="form-group">
109
+ <label>Learning Rate (eta0)</label>
110
+ <div class="dual-input">
111
+ <input type="range" id="lr" min="0.0001" max="0.1" step="0.0001" value="0.01"
112
+ oninput="syncVal('lr', 'lrInput')">
113
+ <input type="number" id="lrInput" min="0.0001" max="0.1" step="0.0001" value="0.01"
114
+ oninput="syncVal('lrInput', 'lr')">
115
+ </div>
116
+ </div>
117
+ <div class="form-group">
118
+ <label>Optimizer (Penalty)</label>
119
+ <div class="select-wrapper">
120
+ <select id="optimizer">
121
+ <option value="l2">L2 (Ridge)</option>
122
+ <option value="l1">L1 (Lasso)</option>
123
+ <option value="elasticnet">Elastic Net</option>
124
+ </select>
125
+ </div>
126
+ </div>
127
+ </div>
128
+
129
+ <!-- KNN Fields -->
130
+ <div id="knnFields" class="model-params" style="display:none">
131
+ <div class="form-group">
132
+ <label>Neighbors (K)</label>
133
+ <div class="dual-input">
134
+ <input type="range" id="n_neighbors" min="1" max="20" step="1" value="5"
135
+ oninput="syncVal('n_neighbors', 'n_neighborsInput')">
136
+ <input type="number" id="n_neighborsInput" min="1" max="20" step="1" value="5"
137
+ oninput="syncVal('n_neighborsInput', 'n_neighbors')">
138
+ </div>
139
+ </div>
140
+ </div>
141
+
142
+ <!-- SVM Fields -->
143
+ <div id="svmFields" class="model-params" style="display:none">
144
+ <div class="form-group">
145
+ <label>Kernel</label>
146
+ <div class="select-wrapper">
147
+ <select id="kernel">
148
+ <option value="rbf">RBF (Radial Basis)</option>
149
+ <option value="linear">Linear</option>
150
+ <option value="poly">Polynomial</option>
151
+ </select>
152
+ </div>
153
+ </div>
154
+ <div class="form-group">
155
+ <label>C (Regularization)</label>
156
+ <div class="dual-input">
157
+ <input type="range" id="C" min="0.1" max="10" step="0.1" value="1.0"
158
+ oninput="syncVal('C', 'CInput')">
159
+ <input type="number" id="CInput" min="0.1" max="10" step="0.1" value="1.0"
160
+ oninput="syncVal('CInput', 'C')">
161
+ </div>
162
+ </div>
163
+ </div>
164
+
165
+ <!-- Tree Fields -->
166
+ <div id="treeFields" class="model-params" style="display:none">
167
+ <div class="form-group">
168
+ <label>Max Depth <small class="description">None = Unlimited</small></label>
169
+ <div class="dual-input">
170
+ <input type="range" id="max_depth" min="1" max="50" step="1" value="10"
171
+ oninput="syncVal('max_depth', 'max_depthInput')">
172
+ <input type="number" id="max_depthInput" min="1" max="50" step="1" value="10"
173
+ oninput="syncVal('max_depthInput', 'max_depth')">
174
+ </div>
175
+ </div>
176
+ </div>
177
+
178
+ <div class="form-group">
179
+ <label>Training Duration
180
+ <small class="description" id="epochDesc">Total passes over data.</small>
181
+ </label>
182
+ <div class="sub-label" id="epochLabel">Epochs</div>
183
+ <div class="dual-input">
184
+ <input type="range" id="epochs" min="1" max="100" value="20"
185
+ oninput="syncVal('epochs', 'epochInput')">
186
+ <input type="number" id="epochInput" min="1" max="100" value="20"
187
+ oninput="syncVal('epochInput', 'epochs')">
188
+ </div>
189
+ </div>
190
+
191
+ <button type="submit" class="btn-primary" style="margin-top: 20px;">Start Training 🚀</button>
192
+ </form>
193
+ </div>
194
+ </main>
195
+ </div>
196
+
197
+ <script>
198
+ function syncVal(srcId, destId) {
199
+ document.getElementById(destId).value = document.getElementById(srcId).value;
200
+ }
201
+
202
+ // Typing Animation Logic
203
+ const msgs = [
204
+ "Scanning directory...",
205
+ "Found {{ features|length }} features...",
206
+ "Inferring data types...",
207
+ "Analyzing target distribution...",
208
+ "Analysis Complete."
209
+ ];
210
+
211
+ async function runScan() {
212
+ const textEl = document.getElementById('scan-text');
213
+ const container = document.getElementById('scan-container');
214
+
215
+ for (const msg of msgs) {
216
+ textEl.innerText = msg;
217
+ await new Promise(r => setTimeout(r, 600));
218
+ }
219
+
220
+ // Fade out scanner, Fade in real info
221
+ container.style.display = 'none';
222
+ // document.getElementById('real-scenario').style.display = 'block'; // Removed, side bar has info
223
+ const form = document.getElementById('configForm');
224
+ form.style.display = 'block';
225
+
226
+ // Small delay for fade in
227
+ setTimeout(() => {
228
+ form.style.opacity = '1';
229
+ }, 50);
230
+ }
231
+
232
+ // Start animation on load
233
+ runScan();
234
+
235
+ function toggleFields() {
236
+ const type = document.getElementById('modelType').value;
237
+ const params = document.querySelectorAll('.model-params');
238
+ params.forEach(p => p.style.display = 'none');
239
+
240
+ if (type === 'sgd') {
241
+ document.getElementById('sgdFields').style.display = 'block';
242
+ } else if (type === 'knn') {
243
+ document.getElementById('knnFields').style.display = 'block';
244
+ } else if (type === 'svm') {
245
+ document.getElementById('svmFields').style.display = 'block';
246
+ } else if (['decision_tree', 'random_forest', 'adaboost'].includes(type)) {
247
+ document.getElementById('treeFields').style.display = 'block';
248
+ }
249
+ }
250
+
251
+ document.getElementById('configForm').addEventListener('submit', async (e) => {
252
+ e.preventDefault();
253
+
254
+ const modelType = document.getElementById('modelType').value;
255
+ const epochs = parseInt(document.getElementById('epochs').value);
256
+
257
+ let modelParams = {};
258
+
259
+ if (modelType === 'sgd') {
260
+ modelParams = {
261
+ loss: "{{ 'log_loss' if scenario.task_type == 'classification' else 'squared_error' }}",
262
+ learning_rate: "constant",
263
+ eta0: parseFloat(document.getElementById('lr').value),
264
+ penalty: document.getElementById('optimizer').value,
265
+ };
266
+ } else if (modelType === 'knn') {
267
+ modelParams = { n_neighbors: parseInt(document.getElementById('n_neighbors').value) };
268
+ } else if (modelType === 'svm') {
269
+ modelParams = {
270
+ kernel: document.getElementById('kernel').value,
271
+ C: parseFloat(document.getElementById('C').value)
272
+ };
273
+ } else if (['decision_tree', 'random_forest'].includes(modelType)) {
274
+ modelParams = { max_depth: parseInt(document.getElementById('max_depth').value) };
275
+ }
276
+
277
+ const payload = {
278
+ model: { type: modelType, params: modelParams },
279
+ training: { epochs: epochs },
280
+ project_name: document.getElementById('projectName').value,
281
+ save_model: document.getElementById('saveModel').checked
282
+ };
283
+
284
+ const btn = document.querySelector('.btn-primary');
285
+ btn.innerText = "Initializing...";
286
+ btn.disabled = true;
287
+
288
+ const res = await fetch('/api/start', {
289
+ method: 'POST',
290
+ headers: { 'Content-Type': 'application/json' },
291
+ body: JSON.stringify(payload)
292
+ });
293
+
294
+ if (res.ok) {
295
+ window.location.href = "/";
296
+ } else {
297
+ alert("Failed to start");
298
+ btn.disabled = false;
299
+ }
300
+ });
301
+ </script>
302
+ </body>
303
+
304
+ </html>
@@ -0,0 +1,147 @@
1
+ <!DOCTYPE html>
2
+ <html lang="en">
3
+
4
+ <head>
5
+ <meta charset="UTF-8">
6
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
7
+ <title>gradia | Training Observer</title>
8
+ <link rel="stylesheet" href="/static/css/style.css">
9
+ <!-- Using CDN for MVP. In production, vendor this. -->
10
+ <script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
11
+ <link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;600;700&display=swap" rel="stylesheet">
12
+ </head>
13
+
14
+ <body>
15
+ <div class="layout">
16
+ <aside class="sidebar">
17
+ <img src="/assets/logo.png" alt="gradia" class="brand-logo">
18
+
19
+ <div class="sidebar-section">
20
+ <div class="sidebar-label">Experiment Context</div>
21
+ <div style="font-size: 0.9rem;">{{ scenario.target_column }}</div>
22
+ <div style="font-size: 0.8rem; color: #8e8ea0">{{ scenario.task_type }}</div>
23
+ </div>
24
+
25
+ <div class="sidebar-section">
26
+ <div class="sidebar-label">Training Status</div>
27
+ <div id="status-text" style="color: var(--accent); font-weight: 600;">Initializing...</div>
28
+ </div>
29
+
30
+ <div class="sidebar-label">Actions</div>
31
+ <div style="display: flex; flex-direction: column; gap: 10px;">
32
+ <button class="btn-primary" onclick="window.location.href='/configure'"
33
+ style="background:var(--bg-card); border:1px solid var(--border); font-size: 0.8rem; padding: 10px;">New
34
+ Experiment</button>
35
+
36
+ <button class="btn-primary" onclick="downloadReport('json')"
37
+ style="background:var(--bg-card); border:1px solid var(--border); font-size: 0.8rem; padding: 10px;">Download
38
+ JSON</button>
39
+ <button class="btn-primary" onclick="downloadReport('pdf')"
40
+ style="background:var(--bg-card); border:1px solid var(--border); font-size: 0.8rem; padding: 10px;">Download
41
+ PDF</button>
42
+
43
+ <button class="btn-primary" onclick="runEvaluation()"
44
+ style="background:var(--bg-card); border:1px solid var(--accent); color:var(--accent); font-size: 0.8rem; padding: 10px;">Run
45
+ Evaluation</button>
46
+ </div>
47
+
48
+
49
+ <div style="flex-grow:1"></div>
50
+
51
+ <div class="sidebar-section" style="font-size: 0.75rem; color: #565869;">
52
+ v1.3.0
53
+ </div>
54
+ </aside>
55
+
56
+ <main class="main">
57
+ <!-- Progress Bar -->
58
+ <div class="card"
59
+ style="margin-bottom: 20px; padding: 20px; background: #202123; border: 1px solid #565869;">
60
+ <div style="display:flex; justify-content:space-between; margin-bottom:10px;">
61
+ <span style="color:var(--text-secondary); font-size:0.9rem">Epoch Progress</span>
62
+ <span id="progress-text" style="color:#fff; font-weight:600">0 / 0</span>
63
+ </div>
64
+ <div class="progress-track"
65
+ style="width:100%; height:6px; background:#40414f; border-radius:3px; overflow:hidden">
66
+ <div id="progress-fill"
67
+ style="width:0%; height:100%; background:var(--accent); transition: width 0.3s ease"></div>
68
+ </div>
69
+ </div>
70
+
71
+ <div class="grid">
72
+ <!-- Training Dynamics -->
73
+ <div class="card col-full">
74
+ <h3>Training Dynamics (Loss / Accuracy)</h3>
75
+ <div class="chart-container">
76
+ <canvas id="metricChart"></canvas>
77
+ </div>
78
+ </div>
79
+
80
+ <!-- System Usage -->
81
+ <div class="card">
82
+ <h3>System Resources</h3>
83
+ <div class="chart-container">
84
+ <canvas id="systemChart"></canvas>
85
+ </div>
86
+ </div>
87
+
88
+ <!-- Feature Importance -->
89
+ <div class="card">
90
+ <h3>Feature Importance</h3>
91
+ <div class="chart-container">
92
+ <canvas id="fiChart"></canvas>
93
+ </div>
94
+ </div>
95
+
96
+ <!-- Detailed Metrics -->
97
+ <div class="card col-full">
98
+ <h3>Detailed Metrics</h3>
99
+ <div id="metrics-table"
100
+ style="display: grid; grid-template-columns: 1fr 1fr; gap: 30px; font-size: 0.9rem;">
101
+ <span style="color: #8e8ea0;">Waiting for first epoch...</span>
102
+ </div>
103
+ </div>
104
+
105
+ <!-- Evaluation Results -->
106
+ <div class="card col-full" id="eval-card" style="display: none;">
107
+ <h3>Evaluation Results</h3>
108
+ <div id="eval-content" style="text-align: center;">
109
+ <div id="cm-container" style="overflow-x: auto; display: flex; justify-content: center;"></div>
110
+ </div>
111
+ </div>
112
+ </div>
113
+
114
+ <footer class="footer">
115
+ <div class="footer-text">
116
+ Made with <span style="color:#ef4146">♥</span> by <strong>STiFLeR</strong> for ML Aspirants
117
+ </div>
118
+ <div class="social-links">
119
+ <!-- Instagram -->
120
+ <a href="https://instagram.com" target="_blank" title="Instagram">
121
+ <svg class="social-icon" viewBox="0 0 24 24">
122
+ <path
123
+ d="M12 2.163c3.204 0 3.584.012 4.85.07 3.252.148 4.771 1.691 4.919 4.919.058 1.265.069 1.645.069 4.849 0 3.205-.012 3.584-.069 4.849-.149 3.225-1.664 4.771-4.919 4.919-1.266.058-1.644.07-4.85.07-3.204 0-3.584-.012-4.849-.07-3.26-.149-4.771-1.699-4.919-4.92-.058-1.265-.07-1.644-.07-4.849 0-3.204.013-3.583.07-4.849.149-3.227 1.664-4.771 4.919-4.919 1.266-.057 1.645-.069 4.849-.069zm0-2.163c-3.259 0-3.667.014-4.947.072-4.358.2-6.78 2.618-6.98 6.98-.059 1.281-.073 1.689-.073 4.948 0 3.259.014 3.668.072 4.948.2 4.358 2.618 6.78 6.98 6.98 1.281.058 1.689.072 4.948.072 3.259 0 3.668-.014 4.948-.072 4.354-.2 6.782-2.618 6.979-6.98.059-1.28.073-1.689.073-4.948 0-3.259-.014-3.667-.072-4.947-.196-4.354-2.617-6.78-6.979-6.98-1.281-.059-1.69-.073-4.949-.073zm0 5.838c-3.403 0-6.162 2.759-6.162 6.162s2.759 6.163 6.162 6.163 6.162-2.759 6.162-6.163c0-3.403-2.759-6.162-6.162-6.162zm0 10.162c-2.209 0-4-1.79-4-4 0-2.209 1.791-4 4-4s4 1.791 4 4c0 2.21-1.791 4-4 4zm6.406-11.845c-.796 0-1.441.645-1.441 1.44s.645 1.44 1.441 1.44c.795 0 1.439-.645 1.439-1.44s-.644-1.44-1.439-1.44z" />
124
+ </svg>
125
+ </a>
126
+ <!-- HF (Placeholder Circle) -->
127
+ <a href="https://huggingface.co" target="_blank" title="Hugging Face">
128
+ <svg class="social-icon" viewBox="0 0 24 24">
129
+ <path
130
+ d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm-1 17.93c-3.95-.49-7-3.85-7-7.93 0-.62.08-1.21.21-1.79L9 15v1c0 1.1.9 2 2 2v1.93zm6.9-2.54c-.26-.81-1-1.39-1.9-1.39h-1v-3c0-.55-.45-1-1-1H8v-2h2c.55 0 1-.45 1-1V7h2c1.1 0 2-.9 2-2v-.41c2.93 1.19 5 4.06 5 7.41 0 2.08-.8 3.97-2.1 5.39z" />
131
+ </svg>
132
+ </a>
133
+ <!-- PyPI -->
134
+ <a href="https://pypi.org" target="_blank" title="PyPI">
135
+ <svg class="social-icon" viewBox="0 0 24 24">
136
+ <path
137
+ d="M12.8 1.6C12.8 1.05 12.35 0.6 11.8 0.6H3.2C2.65 0.6 2.2 1.05 2.2 1.6V10.2C2.2 10.75 2.65 11.2 3.2 11.2H4.8V12.8H3.2C2.1 12.8 1.2 13.7 1.2 14.8V21.8C1.2 22.9 2.1 23.8 3.2 23.8H10.2C11.3 23.8 12.2 22.9 12.2 21.8V20.2H12.8C13.9 20.2 14.8 19.3 14.8 18.2V11.2H11.2V10.2H11.8C12.35 10.2 12.8 9.75 12.8 9.2V1.6ZM10.2 21.8H3.2V14.8H10.2V21.8ZM20.8 11.2H13.8V18.2H14.8V19.2C14.8 19.75 15.25 20.2 15.8 20.2H21.2C22.3 20.2 23.2 19.3 23.2 18.2V11.2C23.2 10.1 22.3 9.2 21.2 9.2H20.8V11.2ZM19.2 16.2H16.2V13.2H19.2V16.2Z" />
138
+ </svg>
139
+ </a>
140
+ </div>
141
+ </footer>
142
+ </main>
143
+ </div>
144
+ <script src="/static/js/app.js"></script>
145
+ </body>
146
+
147
+ </html>
@@ -0,0 +1,143 @@
1
+ Metadata-Version: 2.4
2
+ Name: gradia
3
+ Version: 1.0.0
4
+ Summary: Local-first ML training visualization and tracking dashboard.
5
+ Author-email: STiFLeR <stifler@example.com>
6
+ License: MIT License
7
+
8
+ Copyright (c) 2025 STiFLeR
9
+
10
+ Permission is hereby granted, free of charge, to any person obtaining a copy
11
+ of this software and associated documentation files (the "Software"), to deal
12
+ in the Software without restriction, including without limitation the rights
13
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
14
+ copies of the Software, and to permit persons to whom the Software is
15
+ furnished to do so, subject to the following conditions:
16
+
17
+ The above copyright notice and this permission notice shall be included in all
18
+ copies or substantial portions of the Software.
19
+
20
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
21
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
22
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
23
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
24
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
25
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
26
+ SOFTWARE.
27
+
28
+ Project-URL: Homepage, https://github.com/STiFLeR7/gradia
29
+ Project-URL: Bug Tracker, https://github.com/STiFLeR7/gradia/issues
30
+ Keywords: machine-learning,dashboard,visualization,tracking,mlops
31
+ Classifier: Programming Language :: Python :: 3
32
+ Classifier: License :: OSI Approved :: MIT License
33
+ Classifier: Operating System :: OS Independent
34
+ Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
35
+ Classifier: Topic :: System :: Monitoring
36
+ Requires-Python: >=3.9
37
+ Description-Content-Type: text/markdown
38
+ License-File: LICENSE
39
+ Requires-Dist: scikit-learn
40
+ Requires-Dist: pandas
41
+ Requires-Dist: numpy
42
+ Requires-Dist: fastapi
43
+ Requires-Dist: uvicorn
44
+ Requires-Dist: typer
45
+ Requires-Dist: jinja2
46
+ Requires-Dist: watchdog
47
+ Requires-Dist: rich
48
+ Requires-Dist: psutil
49
+ Requires-Dist: tqdm
50
+ Dynamic: license-file
51
+
52
+ <div align="center">
53
+
54
+ # G R A D I A
55
+
56
+ **Next-Generation Local-First MLOps Platform**
57
+
58
+ [![PyPI Version](https://img.shields.io/pypi/v/gradia?style=for-the-badge&color=blue)](https://pypi.org/project/gradia/)
59
+ [![Python Version](https://img.shields.io/badge/Python-3.9%2B-blue?style=for-the-badge&logo=python&logoColor=white)](https://python.org)
60
+ [![License](https://img.shields.io/badge/License-MIT-green?style=for-the-badge)](LICENSE)
61
+ [![Build Status](https://img.shields.io/github/actions/workflow/status/STiFLeR7/gradia/ci-update.yaml?style=for-the-badge)](https://github.com/STiFLeR7/gradia/actions)
62
+
63
+ <p align="center">
64
+ <img src="https://github.com/STiFLeR7/gradia/blob/master/docs/dashboard.png" alt="Gradia Dashboard" width="100%" />
65
+ </p>
66
+
67
+ </div>
68
+
69
+ ---
70
+
71
+ ## 🚀 Overview
72
+
73
+ **Gradia** is a high-performance, asynchronous monitoring solution designed for local machine learning workflows. Unlike cloud-native behemoths, Gradia focuses on **zero-latency**, **privacy-first** tracking that runs directly alongside your training loop.
74
+
75
+ Built on **FastAPI**, **WebSockets** (simulated via high-frequency polling), and **Reactive UI**, Gradia provides granular visibility into your model's training dynamics, system resource consumption, and feature importance without the overhead of external servers.
76
+
77
+ ## ⚡ Key Capabilities
78
+
79
+ | Feature | Description |
80
+ | :--- | :--- |
81
+ | **Real-Time Telemetry** | Nanosecond-precision tracking of Loss, Accuracy, and custom metrics via async event dispatching. |
82
+ | **Intelligent Auto-Discovery** | Heuristic analysis of tabular datasets to automatically infer task types (Regression vs Classification) and suggest optimal architectures (CNNs, RFCs). |
83
+ | **System Profiling** | Integrated `psutil` hooks for monitoring CPU/GPU* and RAM saturation during training epochs. |
84
+ | **Artifact Management** | Automated checkpointing (`best-ckpt`) and structured logging (`events.jsonl`) with thread-safe IO. |
85
+ | **Comprehensive Reporting** | One-click generation of audit-ready PDF/JSON reports containing full training history and confusion matrices. |
86
+ | **Interactive Evaluation** | Post-training validation suite featuring dynamic Heatmap visualization for Confusion Matrices. |
87
+
88
+ ## 🛠️ Architecture
89
+
90
+ Gradia employs a **Producer-Consumer** architecture:
91
+
92
+ 1. **Trainer Thread (Producer)**: Executes the Scikit-Learn training loop, emitting atomic events to a thread-locked `EventLogger`.
93
+ 2. **System Thread**: Asynchronously samples hardware metrics.
94
+ 3. **Visualization Server (Consumer)**: A lightweight FastAPI instance that aggregates logs and serves a reactive Single Page Application (SPA).
95
+
96
+ This decoupling ensures that monitoring never bottlenecks your training throughput.
97
+
98
+ ## 📦 Installation
99
+
100
+ ```bash
101
+ pip install gradia --upgrade
102
+ ```
103
+
104
+ ## 💻 Usage
105
+
106
+ ### Quick Start
107
+ Initialize the environment and start the observer in one command. Gradia will auto-detect any CSV files in the directory.
108
+
109
+ ```bash
110
+ gradia run .
111
+ ```
112
+
113
+ ### Advanced CLI
114
+ Override default heuristics and bind to specific interfaces.
115
+
116
+ ```bash
117
+ gradia run . \
118
+ --target "churn_label" \
119
+ --port 8080 \
120
+ --workers 4
121
+ ```
122
+
123
+ ## 📊 Dashboard
124
+
125
+ Access the dashboard at `http://localhost:8000`.
126
+
127
+ - **Configure**: Select your model (Random Forest, MLP, etc.) and hyperparameters.
128
+ - **Observe**: Watch metrics stream in real-time.
129
+ - **Analyze**: Use the built-in Feature Importance charts to debug model bias.
130
+
131
+ ## 🤝 Contributing
132
+
133
+ We welcome contributions! Please see `CONTRIBUTING.md` for details on submitting logical PRs.
134
+
135
+ ## 📄 License
136
+
137
+ Distributed under the MIT License. See `LICENSE` for more information.
138
+
139
+ ---
140
+
141
+ <div align="center">
142
+ <sub>Built with ❤️ by STiFLeR for the ML Community.</sub>
143
+ </div>
@@ -0,0 +1,22 @@
1
+ gradia/__init__.py,sha256=ZhzQKWZ8RFrTIkj7z87B144DI95e8LMfA5w8NDWQDtg,23
2
+ gradia/cli/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
3
+ gradia/cli/main.py,sha256=5BSkhMXnsVYS_Vk9sHFVIIdTI-XNyz9DadZ1RmnB7-o,3164
4
+ gradia/core/config.py,sha256=FfvMwaM48AJO2Cz7mwS01Zm-Bv6lt3-tWCyNWKwFo9w,1857
5
+ gradia/core/inspector.py,sha256=43thaKr7cIdzL5uNgYwdwa6APJiXmsLTjqMOMoJCdzQ,1287
6
+ gradia/core/scenario.py,sha256=iu5e6jbRXvRZa2yp_A2-8xZmxrwDpM0BsaJlHWEKoJA,4699
7
+ gradia/models/base.py,sha256=rLR1Ag4TMBrHsYb_PQM3zIWDnPpNDQ51uId7A8jF-QE,1133
8
+ gradia/models/sklearn_wrappers.py,sha256=8AQdYjh3JzfKbwMpPg5Jidi65uV36MzBGVjN4hb2xrk,4812
9
+ gradia/trainer/callbacks.py,sha256=WbRI_ycXTqGRge9Z7uVBEsed711I-03pqUhKPZHZ3Sg,1616
10
+ gradia/trainer/engine.py,sha256=I5zAR590QOuWDUztxrAOcZZAv0dmBMDZJAkNZN0BMTw,8765
11
+ gradia/viz/server.py,sha256=y0hDgbzq9ltHKAodoPP8p-4-BSdYHGFwZv4FDS61KmU,7698
12
+ gradia/viz/assets/logo.png,sha256=RtL3cAfyxBpW0KP093DsIxBN0HR5GU4yqUBUmOnCiBs,2586995
13
+ gradia/viz/static/css/style.css,sha256=2wxnTjHhByowIYZC8PuGx0ST2HITaC2iUe5BJfC4hJ0,5936
14
+ gradia/viz/static/js/app.js,sha256=40v0PLy9dAo2EJoIInkl8GEX_1XPZANR-sQgg2kbFYo,11563
15
+ gradia/viz/templates/configure.html,sha256=H0Bxa8TGyd6FUK15XwzeydQmjRshkmjTODJM_sV01i0,15926
16
+ gradia/viz/templates/index.html,sha256=5L3YGuVddlPpvnRPlDslbXsgLqIxsa1bcSHZoUbKcN8,8536
17
+ gradia-1.0.0.dist-info/licenses/LICENSE,sha256=dWrK9IOpDyV8CQfYXziujM1lyQLdYEMJUlbW0dJb65Y,1085
18
+ gradia-1.0.0.dist-info/METADATA,sha256=q-q0-7NxT_crSMsvLqI6wi7ZgNTiulOwDX-DEIZoyWQ,6067
19
+ gradia-1.0.0.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
20
+ gradia-1.0.0.dist-info/entry_points.txt,sha256=8H8vZjYVuQ7_Txjo9GROW2NqX7HtRP9UbRkrE3YX474,47
21
+ gradia-1.0.0.dist-info/top_level.txt,sha256=SMGgb9bTxc8fH4HdGl8gvs_kVGFpebYFA8tCNfg52GA,7
22
+ gradia-1.0.0.dist-info/RECORD,,
@@ -0,0 +1,5 @@
1
+ Wheel-Version: 1.0
2
+ Generator: setuptools (80.9.0)
3
+ Root-Is-Purelib: true
4
+ Tag: py3-none-any
5
+
@@ -0,0 +1,2 @@
1
+ [console_scripts]
2
+ gradia = gradia.cli.main:app
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2025 STiFLeR
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1 @@
1
+ gradia