Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
58 changes: 58 additions & 0 deletions conformance/fas-diac-base-vectors.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
{
"model": "fas-diac-base-1.0",
"index_version": 12,
"decode": {
"mode": "single-row-greedy"
},
"source": "first 12 rows of the 9288-row docs split (sha256 67513aa1)",
"vectors": [
{
"src": "کلیدهای پرکینزمانند، به کاربران امکان نوشتن می‌دهند",
"out": "کِلِیدِهای پِرِکَینزمانند، بِه کَاربران امَکِان نِوشتن مِی‌دهند"
},
{
"src": "مبلغ پرداختی برای تعمیرات خانه زیاد شد.",
"out": "مِبلغ پَرِداختی بَرِای تِعَمِیرات خَانه زِیاد شُد."
},
{
"src": "کسی تو مهمونی ما نمیاد",
"out": "کِسی تُو مِهُمِونی مَا نِمِیاد"
},
{
"src": "هر بار که به یاد عشق جوانی‌اش می‌افتد، می‌گریاند.",
"out": "هر بَار کِه بِه یاد عِشِق جَوانی‌اش مِی‌افتد، مِی‌گَریاند."
},
{
"src": "دانشگاه نرفتم",
"out": "دَانَشِگاه نُرفتم"
},
{
"src": "در این میان، بچه‌هایی که پدر و مادر آسیب‌دیده دارند، به مراتب، با چالش‌های بیشتری مواجه هستند. به نظر من، برای این‌که بتوانیم با مشکلات فرزند نوجوان‌مان",
"out": "در این مِیان، بِچَهِ‌هایی کِه پِدر و مَادر آسِیبِ‌دیده دَارند، بِه مَرِاتب، بَا چَالَشِ‌های بِیشتری مُواجه هستند. بِه نِظر من، بَرِای این‌�"
},
{
"src": "تو مگه برده او هستی ک فرمانبرداری میکنی",
"out": "تُو مِگه بِرِده او هِستی کِ فَرُمَانبرداری مِیکِنی"
},
{
"src": "پنجره اتاقم به سمت بر حیاط باز می‌شود.",
"out": "پِنِجره اتَاقم بِه سِمت بُر حَیاط بَاز مِی‌شود."
},
{
"src": "نفس کشیدن در هوای تازه صبحگاهی لذت‌بخش است.",
"out": "نفس کِشِیدن در هَوای تَازِه صُبَحِگاهی لِذت‌بخش است."
},
{
"src": "این قسم از مسیر همیشه ترافیک دارد.",
"out": "این قِسم از مِسیر هِمِیشه تِرَافیک دَارد."
},
{
"src": "رسانهها میتوانند بازتاب افکار عمومی باشند.",
"out": "رَسِانهها مِیتوانند بَازِتاب افِکار عُمُومی بَاشند."
},
{
"src": "او ایده‌های نوآورانه‌ای برای کسب و کار پرورد.",
"out": "او ایدَهِ‌های نُوآورِانه‌ای بَرِای کسب و کَار پرورد."
}
]
}
58 changes: 58 additions & 0 deletions conformance/urd-g2p-base-vectors.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
{
"model": "urd-g2p-base-1.0",
"index_version": 12,
"decode": {
"mode": "single-row-greedy"
},
"source": "first 12 rows of urd-g2p-dict",
"vectors": [
{
"src": "چَشمگاہ",
"out": "t͡ʃəʃmˈɡaːh"
},
{
"src": "سرد کرنے",
"out": "sərd̪.kərˈneː"
},
{
"src": "المعدہ",
"out": "alˈmaːd̪a"
},
{
"src": "غَیر فنکارہ",
"out": "ɣɛːr.fənˈkaːraː"
},
{
"src": "دَندانوں کا سَیٹ",
"out": "d̪ənˈdaːnoːn.kaː.sɛːʈ"
},
{
"src": "ہَستِیْاں",
"out": "həs.t̪iː.jãː"
},
{
"src": "کفشوں",
"out": "kəfˈʃoː̃"
},
{
"src": "پَہُنچنے والی",
"out": "pəˈɦʊnt͡ʃneː ʋaːˈliː"
},
{
"src": "دَیر سے",
"out": "d̪ɛːr.seː"
},
{
"src": "جشنِیَہ",
"out": "d͡ʒaʃ.niː.jaː"
},
{
"src": "سنارنیں",
"out": "sɪˈnaːrnĩː"
},
{
"src": "بلند ترين",
"out": "bʊˈlənd̪ t̪əˈriːn"
}
]
}
2 changes: 1 addition & 1 deletion runtime/src/interscript_ml/registry.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
import yaml

DEFAULT_INDEX_URL = (
"https://github.com/interscript/interscript-ml/releases/download/index-v6/models-index.yaml"
"https://github.com/interscript/interscript-models/releases/download/index-v12/models-index.yaml"
)
ENV_INDEX = "SECRYST_INDEX"
ENV_CACHE = "SECRYST_CACHE"
Expand Down
4 changes: 2 additions & 2 deletions runtime/tests/test_registry.py
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ def test_default_index_url_pins_current_release() -> None:
from interscript_ml.registry import DEFAULT_INDEX_URL

assert DEFAULT_INDEX_URL == (
"https://github.com/interscript/interscript-ml"
"/releases/download/index-v6/models-index.yaml"
"https://github.com/interscript/interscript-models"
"/releases/download/index-v12/models-index.yaml"
)
assert "raw.githubusercontent" not in DEFAULT_INDEX_URL
8 changes: 8 additions & 0 deletions src/gpu/modal_distill.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,18 @@

from __future__ import annotations

import warnings
from pathlib import Path

import modal

warnings.warn(
'Modal is retired; this entrypoint is frozen for '
'provenance — launch via the pipeline runner (HF Jobs)',
DeprecationWarning,
stacklevel=2,
)

REPO_ROOT = Path(__file__).resolve().parent.parent.parent

IMAGE = (
Expand Down
8 changes: 8 additions & 0 deletions src/gpu/modal_export.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,18 @@
from __future__ import annotations

import re
import warnings
from pathlib import Path

import modal

warnings.warn(
'Modal is retired; this entrypoint is frozen for '
'provenance — launch via the pipeline runner (HF Jobs)',
DeprecationWarning,
stacklevel=2,
)

REPO_ROOT = Path(__file__).resolve().parent.parent.parent

IMAGE = (
Expand Down
8 changes: 8 additions & 0 deletions src/gpu/modal_golden_matrix.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,18 @@

from __future__ import annotations

import warnings
from pathlib import Path

import modal

warnings.warn(
'Modal is retired; this entrypoint is frozen for '
'provenance — launch via the pipeline runner (HF Jobs)',
DeprecationWarning,
stacklevel=2,
)

REPO_ROOT = Path(__file__).resolve().parent.parent.parent

IMAGE = (
Expand Down
8 changes: 8 additions & 0 deletions src/gpu/modal_score_artifact.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,18 @@

from __future__ import annotations

import warnings
from pathlib import Path

import modal

warnings.warn(
'Modal is retired; this entrypoint is frozen for '
'provenance — launch via the pipeline runner (HF Jobs)',
DeprecationWarning,
stacklevel=2,
)

REPO_ROOT = Path(__file__).resolve().parent.parent.parent

IMAGE = (
Expand Down
8 changes: 8 additions & 0 deletions src/gpu/modal_teacher_sadeed.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,18 @@

from __future__ import annotations

import warnings
from pathlib import Path

import modal

warnings.warn(
'Modal is retired; this entrypoint is frozen for '
'provenance — launch via the pipeline runner (HF Jobs)',
DeprecationWarning,
stacklevel=2,
)

REPO_ROOT = Path(__file__).resolve().parent.parent.parent

IMAGE = (
Expand Down
8 changes: 8 additions & 0 deletions src/gpu/modal_teacher_thai.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,18 @@

from __future__ import annotations

import warnings
from pathlib import Path

import modal

warnings.warn(
'Modal is retired; this entrypoint is frozen for '
'provenance — launch via the pipeline runner (HF Jobs)',
DeprecationWarning,
stacklevel=2,
)

REPO_ROOT = Path(__file__).resolve().parent.parent.parent

IMAGE = (
Expand Down
8 changes: 8 additions & 0 deletions src/gpu/modal_train.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,16 @@
from __future__ import annotations

import sys
import warnings
from pathlib import Path

warnings.warn(
'Modal is retired; this entrypoint is frozen for '
'provenance — launch via the pipeline runner (HF Jobs)',
DeprecationWarning,
stacklevel=2,
)

try:
import modal # type: ignore
_MODAL_AVAILABLE = True
Expand Down
80 changes: 80 additions & 0 deletions src/pipeline/housekeeper.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
"""WO56 — the housekeeper: bucket inventory + checkpoint hygiene.

KLF's law, adopted: storage hygiene runs with a DRY-RUN DEFAULT and
never deletes without an explicit allowlist. This module only ever
CLASSIFIES; pruning is a separate, explicitly-authorized step that
takes the inventory as input.

Classification (per run directory on the training bucket):
- terminal marker present (RELABEL_DONE / TRAIN_DONE / GATE_DONE /
VERIFY_DONE / verdict.json) → complete
- candidate epochs: epoch-N / oepoch-N dirs and best/ dirs
- stray: large files outside a recognized run shape
"""

from __future__ import annotations

from dataclasses import dataclass, field
from typing import Any

TERMINAL_MARKERS = {
"RELABEL_DONE", "TRAIN_DONE", "GATE_DONE", "VERIFY_DONE", "EXPORT_DONE",
"ANATOMY_DONE", "verdict.json", "relabel_stats.json",
}
EPOCH_DIR_PREFIXES = ("epoch-", "oepoch-")


@dataclass
class RunInventory:
name: str
complete: bool
markers: list[str] = field(default_factory=list)
epoch_dirs: list[str] = field(default_factory=list)
best_dirs: list[str] = field(default_factory=list)
files: int = 0
bytes: int = 0
notes: list[str] = field(default_factory=list)


def classify_run(name: str, listing: list[dict[str, Any]]) -> RunInventory:
"""listing = HfFileSystem.ls() entries for one run dir (name/size)."""
inv = RunInventory(name=name, complete=False)
for entry in listing:
n = entry["name"].rsplit("/", 1)[-1]
size = entry.get("size", 0) or 0
inv.files += 1
inv.bytes += size
if n in TERMINAL_MARKERS:
inv.complete = True
inv.markers.append(n)
elif any(n.startswith(p) for p in EPOCH_DIR_PREFIXES):
inv.epoch_dirs.append(n)
elif n == "best":
inv.best_dirs.append(n)
if not inv.complete:
inv.notes.append("no terminal marker — possibly still running")
if inv.epoch_dirs and inv.complete:
inv.notes.append(
f"{len(inv.epoch_dirs)} epoch dirs are prune candidates "
"(keep best/ unless the recipe says otherwise)"
)
return inv


def inventory(runs: dict[str, list[dict[str, Any]]]) -> list[RunInventory]:
return [classify_run(name, listing) for name, listing in sorted(runs.items())]


def prune_plan(inv: list[RunInventory], keep_best: bool = True) -> list[str]:
"""The explicit, reviewable prune list. Dry-run output only —
executing it is a separate, owner-authorized step."""
plan: list[str] = []
for run in inv:
if run.complete and run.epoch_dirs:
for d in run.epoch_dirs:
plan.append(f"{run.name}/{d}")
if keep_best and not run.best_dirs:
plan.append(
f"{run.name} (WARNING: no best/ — keep epoch-final)"
)
return plan
Loading
Loading