Spaces:
Runtime error
Runtime error
Commit History
-
feat: add support for lowercase Hugging Face Space secrets
63726b6 -
feat(kaggle): add clean_launch.py + shrink budget to 20/25/30 = 75 eps
Made-with: Cursorcd923aa
-
feat(kaggle): default to fixed-budget curriculum 20/30/50 episodes
Made-with: Cursor69f89ec -
fix(grpo): skip reference model when kl_beta=0 to save 5GB VRAM on T4
Made-with: Cursor0566783 -
fix(kaggle): align pip-managed numpy with kernel's loaded numpy
Symptom: Cell 5 (post-restart verify) blew up with RuntimeError: numpy was upgraded mid-session (loaded: 2.4.4, installed: 2.4.3) because Kaggle ships numpy 2.4.4 at /usr/lib/python3/dist-packages while pip writes to /usr/local/lib/python3.12/dist-packages — and torch's cu128 install pulled numpy 2.4.3 as a transitive dep into the latter. unsloth_zoo's startup does a strict string-equality check between `numpy.__version__` (loaded via Python's import path priority) and importlib.metadata.version("numpy") (reads pip records) and bails on any mismatch, even patch-level. Fix in REPAIR cell: * Detect the kernel's actual loaded numpy version up front and append `numpy=={detected}` to the pip constraints file, so unsloth/trl/bnb cannot resolve a different one. * Add a 5b realign step that does pip install --force-reinstall --no-deps numpy=={detected} to overwrite whatever pip put in /usr/local/lib with the version the kernel actually loads. After this, importlib.met…27cf9cd -
fix(kaggle): pin torch via constraints file in REPAIR cell
Step [3/6] (`pip install --force-reinstall bitsandbytes`) and step [4/6] (`unsloth unsloth_zoo trl`) were re-resolving torch from default PyPI, which is currently torch 2.11.0. That clobbered the cu128 torch 2.10.0 installed in step [2/6], producing: torchvision 0.25.0+cu128 requires torch==2.10.0, but you have torch 2.11.0 which is incompatible. Fix: * Write `/tmp/ermap_constraints.txt` immediately after step 2 pinning `torch==2.10.0 / torchvision==0.25.0`. * Step 3 (bnb) now uses `--no-deps` (bnb dlopens torch at runtime, so install-time deps are unnecessary). * Steps 4 + 5 pass `-c /tmp/ermap_constraints.txt` so pip can never upgrade torch out from under us, regardless of what unsloth or trl declare in their requirement lists. Made-with: Cursor112679c -
fix(kaggle): escape backslash-n in REPAIR cell separator print
Cell 3 of the rebuilt notebook contained `print("\n" + "=" * 72)` whose `\n` was interpreted by Python's triple-quoted string at build time, so the resulting notebook source was split across two lines: 118 | print(" 119 | " + "=" * 72) which Kaggle rejected with `SyntaxError: unterminated string literal`. Use `\\n` to keep the escape literal in the generated cell source, matching the other four print statements that already do this. AST-validates all 15 code cells after regeneration. Made-with: Cursor04688c1 -
chore(kaggle): rebuild notebook v3 + clean dev-scratch files
* New `kaggle/build_notebook.py` - single source of truth that regenerates the Kaggle notebook + KAGGLE_QUICKSTART.md from scratch (run once whenever the layout drifts). * New `kaggle/KAGGLE_QUICKSTART.md` - concise step-by-step run order with troubleshooting table for every dependency-hell symptom we hit. * `kaggle/train_ermap_grpo_kaggle.ipynb` rebuilt as a clean 20-cell layout: - new constant per-phase reward thresholds (P1=+1.2 / P2=+1.1 / P3=+1.0) - idempotent REPAIR cell (pins torch 2.10 cu128 + bnb + unsloth/zoo + trl, verifies in a subprocess so the kernel never gets poisoned mid-install) - pre-flight Groq routing + PING smoke test using router._models / _clients - explicit dry-run + HF-push hook + per-phase dashboards + final push. * `train_grpo.py`: add optional `phase_episode_budgets` (fixed-budget curriculum mode) alongside the existing reward-threshold early-stop. Fully backward compatible (default behaviour unchanged); CLI flags --phase{1,2,3}-budg…2df5c63