director: Qwen3.5-0.8B probe against the TTS contract
Browse files- kaggle/notebook_director.py +35 -0
kaggle/notebook_director.py
ADDED
|
@@ -0,0 +1,35 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
"""Kaggle notebook body: the director stage, isolated from Ming's transformers.
|
| 2 |
+
|
| 3 |
+
Ming pins transformers 4.46.3; Qwen3.5 needs 5.x. They cannot share a process,
|
| 4 |
+
so the director runs here and leaves a validated script behind. The radio stage
|
| 5 |
+
reads that file instead of calling an LLM itself.
|
| 6 |
+
"""
|
| 7 |
+
import subprocess
|
| 8 |
+
|
| 9 |
+
|
| 10 |
+
def sh(cmd: str) -> None:
|
| 11 |
+
print(f"$ {cmd}", flush=True)
|
| 12 |
+
rc = subprocess.run(cmd, shell=True).returncode
|
| 13 |
+
if rc != 0:
|
| 14 |
+
raise SystemExit(f"failed: {cmd}")
|
| 15 |
+
|
| 16 |
+
|
| 17 |
+
def main() -> None:
|
| 18 |
+
sh("pip install -q huggingface_hub")
|
| 19 |
+
sh("pip install -q --upgrade 'transformers>=5' accelerate")
|
| 20 |
+
|
| 21 |
+
import transformers
|
| 22 |
+
print("transformers", transformers.__version__, flush=True)
|
| 23 |
+
|
| 24 |
+
from huggingface_hub import snapshot_download
|
| 25 |
+
|
| 26 |
+
bundle = "/kaggle/working/webfm-eval"
|
| 27 |
+
snapshot_download("idefinity/webfm-eval", repo_type="dataset", local_dir=bundle)
|
| 28 |
+
|
| 29 |
+
target = bundle + "/kaggle/director_probe.py"
|
| 30 |
+
exec(compile(open(target).read(), "director_probe.py", "exec"),
|
| 31 |
+
{"__name__": "__main__", "__file__": target})
|
| 32 |
+
|
| 33 |
+
|
| 34 |
+
if __name__ == "__main__":
|
| 35 |
+
main()
|