zziang commited on
Commit
4167b5c
·
verified ·
1 Parent(s): b985556

radio demo: 4000-step student + end-to-end script

Browse files
Files changed (1) hide show
  1. kaggle/notebook_radio.py +25 -0
kaggle/notebook_radio.py ADDED
@@ -0,0 +1,25 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ """Kaggle notebook body: end-to-end radio segment (LLM script -> Ming speech)."""
2
+ import os
3
+ import subprocess
4
+ import sys
5
+
6
+ from notebook_eval import BUNDLE, MODEL, ROOT, WEIGHTS, pull, stage_deps, stage_repo
7
+
8
+ BUNDLE_REPO = "idefinity/webfm-eval"
9
+
10
+
11
+ def main() -> None:
12
+ stage_repo()
13
+ stage_deps()
14
+ pull(WEIGHTS, MODEL)
15
+ pull(BUNDLE_REPO, BUNDLE, repo_type="dataset")
16
+ if not (BUNDLE / "student4_rc.pt").exists():
17
+ raise SystemExit("student4_rc.pt missing from the bundle")
18
+ env = dict(os.environ, WORK_ROOT=str(ROOT), CUDA_VISIBLE_DEVICES="0")
19
+ rc = subprocess.run([sys.executable, str(BUNDLE / "kaggle/radio_demo.py")],
20
+ env=env).returncode
21
+ print("radio rc", rc)
22
+
23
+
24
+ if __name__ == "__main__":
25
+ main()