Spaces:
Running on Zero
Running on Zero
NLag commited on
Commit ·
2d2fa4d
1
Parent(s): 6d4caef
Fix exercise router baseline artifact publishing
Browse files
.python-version
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
3.10
|
scripts/exercise_router_modal.py
CHANGED
|
@@ -31,6 +31,7 @@ RICCIO_VIDEO_COLLECTIONS = (
|
|
| 31 |
"my_test_video_1",
|
| 32 |
)
|
| 33 |
HF_ARTIFACT_FILENAMES = (
|
|
|
|
| 34 |
"router.joblib",
|
| 35 |
"router_selection.json",
|
| 36 |
"temporal.pt",
|
|
@@ -696,8 +697,8 @@ def evaluate() -> dict[str, Any]:
|
|
| 696 |
return result
|
| 697 |
|
| 698 |
selected = select_router_candidate(candidates)
|
| 699 |
-
if
|
| 700 |
-
shutil.copyfile(
|
| 701 |
selection = {
|
| 702 |
"selected_model": f"{selected['name']}.{ 'joblib' if selected['name'] == 'baseline' else 'pt' }",
|
| 703 |
"selected_artifact": selected["selected_artifact"],
|
|
|
|
| 31 |
"my_test_video_1",
|
| 32 |
)
|
| 33 |
HF_ARTIFACT_FILENAMES = (
|
| 34 |
+
"baseline.joblib",
|
| 35 |
"router.joblib",
|
| 36 |
"router_selection.json",
|
| 37 |
"temporal.pt",
|
|
|
|
| 697 |
return result
|
| 698 |
|
| 699 |
selected = select_router_candidate(candidates)
|
| 700 |
+
if baseline_path.exists():
|
| 701 |
+
shutil.copyfile(baseline_path, MODEL_ROOT / "router.joblib")
|
| 702 |
selection = {
|
| 703 |
"selected_model": f"{selected['name']}.{ 'joblib' if selected['name'] == 'baseline' else 'pt' }",
|
| 704 |
"selected_artifact": selected["selected_artifact"],
|
scripts/upload_exercise_router_to_hf.py
CHANGED
|
@@ -10,6 +10,7 @@ DEFAULT_MODEL_DIR = Path("models/exercise_router/active")
|
|
| 10 |
DEFAULT_MODEL_CARD = Path("docs/huggingface-router-model-card.md")
|
| 11 |
DEFAULT_TRAINING_REPORT = Path("docs/exercise-router-training-report.md")
|
| 12 |
ARTIFACT_FILENAMES = (
|
|
|
|
| 13 |
"router.joblib",
|
| 14 |
"router_selection.json",
|
| 15 |
"temporal.pt",
|
|
|
|
| 10 |
DEFAULT_MODEL_CARD = Path("docs/huggingface-router-model-card.md")
|
| 11 |
DEFAULT_TRAINING_REPORT = Path("docs/exercise-router-training-report.md")
|
| 12 |
ARTIFACT_FILENAMES = (
|
| 13 |
+
"baseline.joblib",
|
| 14 |
"router.joblib",
|
| 15 |
"router_selection.json",
|
| 16 |
"temporal.pt",
|