Buckets:

rhtse's picture
download
raw
2.2 kB
"""WO87 phase 2 — document every model's output target convention.
For each index id: load through the reference loader (sha256-verified),
decode a per-language probe, and record the raw output. The recorded
samples are the EVIDENCE for target-accurate renames (the audit found
zero entries documenting their target — renaming before this job would
fabricate).
Usage (a100-large or large-disk flavor, isx-training mounted rw):
python /ckpt/run-087-target-docs/document_targets.py
"""
from __future__ import annotations
import json
import os
from pathlib import Path
OUT = Path("/ckpt") / "run-087-target-docs"
# one canonical probe per language prefix in the zoo
PROBES = {
"ara": "السلام عليكم",
"urd": "استقبال",
"fas": "سلام",
"heb": "שלום",
"tha": "สวัสดี",
"khm": "សួស្តី",
}
def probe_for(model_id: str) -> str:
return PROBES.get(model_id.split("-")[0], "abc")
def main() -> None:
import sys
sys.path.insert(0, "/im/runtime/src")
from interscript_ml import Model
import yaml
OUT.mkdir(parents=True, exist_ok=True)
# resolve ids straight from the shipped index yaml
import urllib.request
index_url = ("https://github.com/interscript/interscript-models/"
"releases/download/index-v12/models-index.yaml")
with urllib.request.urlopen(index_url) as r:
idx = yaml.safe_load(r)
ids = sorted((idx.get("models") or {}).keys())
print(f"[doc] {len(ids)} ids", flush=True)
doc = {}
for mid in ids:
try:
m = Model.load(mid)
probe = probe_for(mid)
out = m.translate(probe)
doc[mid] = {"probe": probe, "output": out,
"chars": sorted(set(out))}
print(f"[doc] {mid}: {probe!r} -> {out!r}", flush=True)
except Exception as e:
doc[mid] = {"error": repr(e)[:200]}
print(f"[doc] {mid}: ERROR {e!r}"[:160], flush=True)
(OUT / "target-documentation.json").write_text(
json.dumps(doc, ensure_ascii=False, indent=2), encoding="utf-8")
print("[done]", flush=True)
if __name__ == "__main__":
main()

Xet Storage Details

Size:
2.2 kB
·
Xet hash:
4ecb6bc2e0f9d7056810f26b9c5dbe9b015bc88d5e8f58ca80a7df0039f063ca

Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.