[GH-ISSUE #5193] [Other] setup.py aborts with "… is outside … container mounts" on a re-run against an existing config — after model, pack and MTP are already complete #3089

Open
opened 2026-11-07 14:37:59 +07:00 by bsakaguchi · 0 comments
Owner

Originally created by @Maddy55555 on GitHub (Nov 4, 2026).
Original GitHub issue: https://github.com/Niko1221/Strata/issues/5193

Summary

Running setup.py --backend sycl --family unsloth --model UD-IQ4_XS a second time (to resume an interrupted download) finishes all the real work — model shards, pack, vision encoder, MTP draft layer all print [ok] — and then aborts in Step 7 with:

[X]  /work/Strata-data/packs/unsloth-ud-iq4_xs is outside /home/maddy/sandbox, which the SYCL engine's container mounts
Setup stopped. Fix the item above and run it again - everything already done is kept and skipped.

Exit code 1. Nothing is actually wrong: the server starts fine against the produced files and serves correct output. The failure is a double translation: sycl_path() is applied to arguments that are already container paths, because the setup carries args over from the previous run's config.

Environment

GPU 2× Intel Arc Pro B70 32 GB, xe driver, layer split auto
Host Ubuntu 26.04.1 LTS, kernel 7.0.0-42-generic, 94 GB RAM
Runtime oneAPI 2026.1, AOT bmg-g31, engine container strata-sycl-dev
Strata v0.2.10 (ffa80d73)
Engine 0.1.56
Model Unsloth UD-IQ4_XS (3 shards, 93.6 GB), context 262144, --kv int8, --kv-resident 32768, --stream-experts, --spec 2, MTP on

Steps to reproduce

  1. Complete one setup run so that strata-unsloth-ud-iq4_xs.json exists with /work/... container paths in its args (this is the normal end state of a first run).
  2. Re-run the same command — e.g. because the first run was interrupted during the model download:
    python setup.py --backend sycl --family unsloth --model UD-IQ4_XS --yes --no-start --no-browser
    
  3. Setup resumes, finishes the download, builds the pack, validates the MTP layer, then aborts in Step 7.

What the setup prints before the abort

=== Step 6: preparing the model for Strata ===
  [ok] model prepared: /home/maddy/sandbox/Strata-data/packs/unsloth-ud-iq4_xs
  [ok] MTP draft layer: /home/maddy/sandbox/Strata-data/mtp/rt

=== Step 7: writing the start script ===
  [ok] the model is on a rotational disk (dm-0): its 29 GB n-gram table is kept in RAM (--ple-io ram) ...
  [ok] KV streaming on: the context's KV cache lives in RAM (1.8 GB), more experts fit in VRAM
  [ok] kept from your earlier strata-unsloth-ud-iq4_xs.json: sycl_root, idle_unload_s, env ONEAPI_DEVICE_SELECTOR,
       args --pack, args --native, args --expert-profile, args --stream-experts, args --vram-reserve-mib, args --prefill
  the earlier run config is kept as strata-unsloth-ud-iq4_xs.json.bak

  [X]  /work/Strata-data/packs/unsloth-ud-iq4_xs is outside /home/maddy/sandbox, which the SYCL engine's container mounts

Note the irony: the run explicitly keeps args --pack … from the earlier config, and then rejects those very arguments one step later.

Root cause

sycl/setup_intel.py:312-316 translates every path-valued argument through sycl_path():

for f in ("--pack", "--native", "--ple-gguf", "--expert-profile", "--mtp", "--control-vector-scaled"):
    if f in args:
        v = args[args.index(f) + 1]
        path, _, scale = v.rpartition(":") if f == "--control-vector-scaled" else (v, "", "")
        args[args.index(f) + 1] = sycl_path(path) + (f":{scale}" if scale else "")

and sycl_path() (line 108) is not idempotent — it requires the path to be under MOUNT (the host-side Strata root) and fails otherwise:

def sycl_path(path) -> str:
    p, root = Path(path).resolve(), MOUNT.resolve()
    try:
        return "/work/" + p.relative_to(root).as_posix()
    except ValueError:
        S.fail(f"{p} is outside {root}, which the SYCL engine's container mounts", ...)

When args comes from an existing config, its values are already /work/Strata-data/packs/…. Resolving that against the host root raises ValueError → S.fail(). A container path is being checked against the host filesystem.

This is the same class of bug as the drafting check in #5138 ("/work paths are checked outside the engine container"), but in the setup path rather than the launch path — so a fresh install never hits it and every re-run with an existing config does.

Impact

  • Setup reports failure although the model, pack, vision encoder and MTP layer are complete and usable. Automation that checks the exit code treats a successful setup as broken.
  • The message sends the user looking for a directory problem (--models-dir/--data-dir) that does not exist. Here the hint is actively misleading: the files are exactly where they belong, under the mount root.
  • Re-runs are common after an interrupted download — exactly the case where the user is already under time pressure.

Suggested fix

Make sycl_path() idempotent — pass container paths through unchanged:

def sycl_path(path) -> str:
    p = Path(path)
    container = Path("/work")
    if p.is_absolute() and (p == container or container in p.parents):
        return p.as_posix()          # already a container path, nothing to translate
    p, root = p.resolve(), MOUNT.resolve()
    try:
        return "/work/" + p.relative_to(root).as_posix()
    except ValueError:
        S.fail(...)

Two independent improvements on top of that:

  1. Validate before building, or at least report the state. The check sits in Step 7, after the ~94 GB download and the pack build. A failure there costs the user a full re-run even though everything is on disk. Validating the paths first, or wording the message as "the model is ready; only the start script could not be written", removes the false failure.
  2. The .bak handling is fine — the config was byte-identical to its backup after this run, so nothing was lost.
Originally created by @Maddy55555 on GitHub (Nov 4, 2026). Original GitHub issue: https://github.com/Niko1221/Strata/issues/5193 ## Summary Running `setup.py --backend sycl --family unsloth --model UD-IQ4_XS` a second time (to resume an interrupted download) finishes all the real work — model shards, pack, vision encoder, MTP draft layer all print `[ok]` — and then aborts in Step 7 with: ``` [X] /work/Strata-data/packs/unsloth-ud-iq4_xs is outside /home/maddy/sandbox, which the SYCL engine's container mounts Setup stopped. Fix the item above and run it again - everything already done is kept and skipped. ``` Exit code 1. Nothing is actually wrong: the server starts fine against the produced files and serves correct output. The failure is a **double translation**: `sycl_path()` is applied to arguments that are already container paths, because the setup carries `args` over from the previous run's config. ## Environment | | | |---|---| | GPU | 2× Intel Arc Pro B70 32 GB, `xe` driver, layer split auto | | Host | Ubuntu 26.04.1 LTS, kernel 7.0.0-42-generic, 94 GB RAM | | Runtime | oneAPI 2026.1, AOT `bmg-g31`, engine container `strata-sycl-dev` | | Strata | `v0.2.10` (`ffa80d73`) | | Engine | 0.1.56 | | Model | Unsloth `UD-IQ4_XS` (3 shards, 93.6 GB), context 262144, `--kv int8`, `--kv-resident 32768`, `--stream-experts`, `--spec 2`, MTP on | ## Steps to reproduce 1. Complete one setup run so that `strata-unsloth-ud-iq4_xs.json` exists with `/work/...` container paths in its `args` (this is the normal end state of a first run). 2. Re-run the same command — e.g. because the first run was interrupted during the model download: ```bash python setup.py --backend sycl --family unsloth --model UD-IQ4_XS --yes --no-start --no-browser ``` 3. Setup resumes, finishes the download, builds the pack, validates the MTP layer, then aborts in Step 7. ## What the setup prints before the abort ``` === Step 6: preparing the model for Strata === [ok] model prepared: /home/maddy/sandbox/Strata-data/packs/unsloth-ud-iq4_xs [ok] MTP draft layer: /home/maddy/sandbox/Strata-data/mtp/rt === Step 7: writing the start script === [ok] the model is on a rotational disk (dm-0): its 29 GB n-gram table is kept in RAM (--ple-io ram) ... [ok] KV streaming on: the context's KV cache lives in RAM (1.8 GB), more experts fit in VRAM [ok] kept from your earlier strata-unsloth-ud-iq4_xs.json: sycl_root, idle_unload_s, env ONEAPI_DEVICE_SELECTOR, args --pack, args --native, args --expert-profile, args --stream-experts, args --vram-reserve-mib, args --prefill the earlier run config is kept as strata-unsloth-ud-iq4_xs.json.bak [X] /work/Strata-data/packs/unsloth-ud-iq4_xs is outside /home/maddy/sandbox, which the SYCL engine's container mounts ``` Note the irony: the run **explicitly keeps** `args --pack …` from the earlier config, and then rejects those very arguments one step later. ## Root cause `sycl/setup_intel.py:312-316` translates every path-valued argument through `sycl_path()`: ```python for f in ("--pack", "--native", "--ple-gguf", "--expert-profile", "--mtp", "--control-vector-scaled"): if f in args: v = args[args.index(f) + 1] path, _, scale = v.rpartition(":") if f == "--control-vector-scaled" else (v, "", "") args[args.index(f) + 1] = sycl_path(path) + (f":{scale}" if scale else "") ``` and `sycl_path()` (line 108) is not idempotent — it requires the path to be **under** `MOUNT` (the host-side Strata root) and fails otherwise: ```python def sycl_path(path) -> str: p, root = Path(path).resolve(), MOUNT.resolve() try: return "/work/" + p.relative_to(root).as_posix() except ValueError: S.fail(f"{p} is outside {root}, which the SYCL engine's container mounts", ...) ``` When `args` comes from an existing config, its values are already `/work/Strata-data/packs/…`. Resolving that against the host root raises `ValueError` → `S.fail()`. A container path is being checked against the host filesystem. This is the same class of bug as the drafting check in #5138 ("`/work` paths are checked outside the engine container"), but in the **setup** path rather than the launch path — so a fresh install never hits it and every re-run with an existing config does. ## Impact - Setup reports failure although the model, pack, vision encoder and MTP layer are complete and usable. Automation that checks the exit code treats a successful setup as broken. - The message sends the user looking for a directory problem (`--models-dir`/`--data-dir`) that does not exist. Here the hint is actively misleading: the files are exactly where they belong, under the mount root. - Re-runs are common after an interrupted download — exactly the case where the user is already under time pressure. ## Suggested fix Make `sycl_path()` idempotent — pass container paths through unchanged: ```python def sycl_path(path) -> str: p = Path(path) container = Path("/work") if p.is_absolute() and (p == container or container in p.parents): return p.as_posix() # already a container path, nothing to translate p, root = p.resolve(), MOUNT.resolve() try: return "/work/" + p.relative_to(root).as_posix() except ValueError: S.fail(...) ``` Two independent improvements on top of that: 1. **Validate before building, or at least report the state.** The check sits in Step 7, after the ~94 GB download and the pack build. A failure there costs the user a full re-run even though everything is on disk. Validating the paths first, or wording the message as "the model is ready; only the start script could not be written", removes the false failure. 2. The `.bak` handling is fine — the config was byte-identical to its backup after this run, so nothing was lost.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Niko1221/Strata#3089
No description provided.