Preflight step: python: command not found, ##[error]…exit code 127 — but uname -m/nvidia-smi passed just above | Ubuntu ships python3 only; bare python is absent and workflows call python | sudo apt install python-is-python3. Idempotent; .path already has /usr/bin, so no restart needed. |
pip install … → error: externally-managed-environment | System python is PEP 668 marked (/usr/lib/python3.12/EXTERNALLY-MANAGED) | Do NOT --break-system-packages on a shared box. Build a dedicated venv (e.g. /opt/sophia-ocr-venv, chown to the runner user) and wire it onto the runner. |
pip install <backend> → No matching distribution found | The SUT backend is not on PyPI (source-only) | Clone the source repo (git clone --depth 1 …), record git rev-parse HEAD as the SUT version pin, install from source into the venv. The workflow's `pip install |
After installing sglang/vllm: torch.cuda.is_available() flips to False, torch.__version__ shows …+cpu; and transformers jumped to 5.x | The backend wheel hard-pulls torch==X (cpu) + transformers>=5, uninstalling your cu128 torch. pip install torch==X --index-url …/cu128 then no-ops (the +cpu build already satisfies ==X) | Force it: pip install --index-url https://download.pytorch.org/whl/cu128 --force-reinstall --no-deps torch==X torchvision==Y torchaudio==X. Re-verify cuda True + get_device_name. Match the backend's pinned torch version, just the cu128 build (ABI match for its kernels). |
Bench step: model weights re-download every run / HF_HOME unwritable | Workflow hardcodes HF_HOME=/home/runner/.cache/huggingface, a dir the runner user can't create | sudo mkdir -p /home/runner/.cache/huggingface && sudo chown -R <runner-user> /home/runner, then pre-warm snapshot_download(model, revision=<sha>) into it. |
SGLang server loads weights fine, then the scheduler dies right after Load weight end with AssertionError: FlashAttention v3 Backend requires SM>=80 and SM<=90 (log also prints SMxxx (Blackwell) detected) | The SUT / infer.py pins --attention-backend fa3; FA v3 is SM 80–90 only, but GB10 is SM 120/121 (Blackwell) — SGLang itself refuses fa3 there and mandates flashinfer. The crash is after the ~6 GB weight load, so it looks late/mysterious | Select the backend by torch.cuda.get_device_capability: flashinfer on SM>90, fa3 on SM 80–90 (flashinfer already ships in the venv). Hardware-forced, not a tuned knob. If the launch command is frozen pre-registration, amend it via PR — never inline-edit (precedent: U2 run 28671947676 → annex A1.1 Blackwell override). Complements the [Spark aarch64 vLLM JIT chain] note (Blackwell needs special kernel/attention handling). |
SGLang refuses to serve at all: ValueError: <Arch>ForCausalLM has no SGlang implementation and the Transformers implementation is not compatible with SGLang (e.g. UnlimitedOCRForCausalLM, U2 run 28683761217) | Stock PyPI sglang[all] does not register the model's architecture. A trust_remote_code SUT often ships its OWN SGLang build that registers the arch — bundled in the HF repo AND the GitHub tree (look for wheel/sglang-*.whl; the repo's infer.py/README installs exactly it, e.g. uv pip install wheel/sglang-…whl). PyPI sglang will never serve it. | Install the SUT's OWN bundled sglang wheel, not PyPI sglang. Fetch it deterministically at the pinned weights sha: huggingface_hub.hf_hub_download(model_id, "wheel/sglang-….whl", revision=<sha>) (install huggingface_hub first so the fetch can't itself whack-a-mole), then pip install <wheel>. This is STRICTLY MORE faithful to "as shipped" than PyPI — it is the SUT's own serving code — so it's a load-prerequisite, measurement-neutral, pre-run. Document it in the annex parallel to the trust_remote_code note; changes no gate value; canClaimAGI stays false. |
Whack-a-mole: each dispatch dies on the NEXT missing import — ModuleNotFoundError/ImportError for the model's custom-code deps, one per run (trust_remote_code, then matplotlib, then easydict, then addict, …). 5+ wasted cycles incl. paid (28681097651/28681856749/28682776894/28684661135) | A trust_remote_code model's custom modeling .py files import third-party libs that transformers' check_imports validates at load — NOT in its requirements.txt. Fixing one surfaces the next. The subtle trap (run 28684661135): even after LISTING all imports, the pin set ASSUMED addict was transitively present via sglang[all] — it wasn't, and the run died after a 300 s health-wait. | Two rules, both required. (1) AST-extract the COMPLETE set up front, don't eyeball: for f in list_repo_files(repo, revision=sha) if f.endswith('.py'): ast.parse(hf_hub_download(...)) → collect every ast.Import/ast.ImportFrom top-level module. (2) NEVER assume any of them is transitively present — pin EVERY non-stdlib, non-stack leaf explicitly (addict/easydict/matplotlib/requests/tqdm for Unlimited-OCR). Then add a fatal import-preflight in the pod script that importlib.import_modules each pinned dep BEFORE sglang.launch_server and sys.exit(1)s naming any miss — converts a buried post-300 s traceback into a ~10 s named failure. Keep stack-provided imports (flash_attn/einops/numpy) as a NON-fatal observed check (they may be try/except-guarded). |