Spaces:
Sleeping
Sleeping
LorenzoBioinfo
commited on
Commit
·
0a71c40
1
Parent(s):
46a01d1
Additional data subcolumns
Browse files- src/monitoring.py +4 -0
- tests/integration/test_app.py +0 -1
src/monitoring.py
CHANGED
|
@@ -41,6 +41,10 @@ def evaluate_model(model, dataset, dataset_name, sample_size=300):
|
|
| 41 |
def retrain_on_youtube_sample():
|
| 42 |
youtube_data = load_from_disk(YT_PATH)["train"]
|
| 43 |
youtube_sample = youtube_data.shuffle(seed=42).select(range(500))
|
|
|
|
|
|
|
|
|
|
|
|
|
| 44 |
train_model(additional_data=youtube_sample, output_dir=MODEL_PATH)
|
| 45 |
|
| 46 |
|
|
|
|
| 41 |
def retrain_on_youtube_sample():
|
| 42 |
youtube_data = load_from_disk(YT_PATH)["train"]
|
| 43 |
youtube_sample = youtube_data.shuffle(seed=42).select(range(500))
|
| 44 |
+
youtube_sample = youtube_sample.remove_columns(
|
| 45 |
+
[col for col in youtube_sample.column_names if col not in ["text", "label"]]
|
| 46 |
+
)
|
| 47 |
+
|
| 48 |
train_model(additional_data=youtube_sample, output_dir=MODEL_PATH)
|
| 49 |
|
| 50 |
|
tests/integration/test_app.py
CHANGED
|
@@ -1,4 +1,3 @@
|
|
| 1 |
-
import pytest
|
| 2 |
from fastapi.testclient import TestClient
|
| 3 |
from src.app import app
|
| 4 |
import os
|
|
|
|
|
|
|
| 1 |
from fastapi.testclient import TestClient
|
| 2 |
from src.app import app
|
| 3 |
import os
|