Upload backend/core/migrations/0003_mlmetrics.py with huggingface_hub
Browse files
backend/core/migrations/0003_mlmetrics.py
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
from django.db import migrations, models
|
| 2 |
+
|
| 3 |
+
|
| 4 |
+
class Migration(migrations.Migration):
|
| 5 |
+
dependencies = [
|
| 6 |
+
("core", "0002_auditlog_metrics"),
|
| 7 |
+
]
|
| 8 |
+
|
| 9 |
+
operations = [
|
| 10 |
+
migrations.CreateModel(
|
| 11 |
+
name="MLMetrics",
|
| 12 |
+
fields=[
|
| 13 |
+
("id", models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name="ID")),
|
| 14 |
+
("date", models.DateField(unique=True)),
|
| 15 |
+
("total_requests", models.IntegerField(default=0)),
|
| 16 |
+
("intent_accuracy", models.FloatField(blank=True, null=True)),
|
| 17 |
+
("average_latency_ms", models.FloatField(blank=True, null=True)),
|
| 18 |
+
("error_rate", models.FloatField(blank=True, null=True)),
|
| 19 |
+
("intent_breakdown", models.JSONField(blank=True, default=dict)),
|
| 20 |
+
("generated_at", models.DateTimeField(auto_now_add=True)),
|
| 21 |
+
],
|
| 22 |
+
),
|
| 23 |
+
]
|