Files
club-3090/scripts/tests/test-compose-registry-disk.sh
T
noonghunnaandClaude Opus 4.8 af1e909b04 Wire DiffusionGemma into the catalog via stock-nightly sideload
Make `vllm/diffusiongemma-dual` usable through setup/pull/switch/launch, and
pivot the engine delivery from a baked local image to a SIDELOADED overlay on a
stock, pullable nightly (so non-rig users can actually run it).

Delivery (no baked image):
- Engine `vllm-diffusion-gemma` pins a STOCK `vllm/vllm-openai:nightly-2c9c07c8…`
  and sideloads the vendored overlay at boot via install_script (entrypoint).
- `models/diffusiongemma-26b-a4b/vllm/patches/dgemma-overlay/` is the vendored
  payload: the FULL stock-vs-`dgemma`-branch `vllm/` delta (123 .py) — a lean
  PR-#45163-only overlay version-skews (`build_attn_metadata() got an unexpected
  keyword argument 'causal'`: load-bearing dgemma changes live outside the PR
  diff) — plus Codex's 3 fixes (marlin K-pad ×2 + diffusion_gemma TP-vocab/dtype).
  install.sh cp's it over the installed vllm pkg, fail-loud arch assert.
- base.yml rewired: stock image + overlay mount + install_script entrypoint;
  drops the 3 standalone marlin-k-pad mounts (folded into the overlay) and the
  baked-image dependency. The dgemma-pr45163 Dockerfile is now the overlay-
  regeneration helper, not the runtime engine.

Catalog wiring:
- Model profile `diffusiongemma-26b-a4b` (gemma4-swa-moe backbone + block
  diffusion; text; valid_tp [1,2]; kv_calc_supported=false → kvcalc_key SKIP).
- Engine profile `vllm-diffusion-gemma` (stock install + vendored_overlays).
- compose_registry `vllm/diffusiongemma-dual` (port 8042, status upstream-gated).
  NO DEFAULTS row — upstream-gated is non-functional, reachable only by slug.
- patches.yml `dgemma-vllm45163-sideload` (install_script + drift_guard) and the
  diagnose_profile_cli overlay-path hint.
- docs/UPSTREAM.md row for vllm#45163 (re-pin + drop triggers).

Output-length fix carried in base.yml: lift the model's 256-tok max_new_tokens
default to 16384 via --override-generation-config (keeps the diffusion denoising
params; fixes OWUI truncation + next-turn echo).

Tests: bump the count fixtures for +1 model / +1 engine / +1 compose / +1 registry
entry (test-profiles-compat 6→7 models, 11→12 engines; test-compose-registry-disk
44→45 registry, 45→46 disk). Full gate green except test-compose-registry-disk
local-only redness from untracked nex-n2-mini WIP in the shared tree (CI-clean
validated green: tracked-only disk=46, registry=45, disk-only set all-allowed).

Validated live on 2x RTX 3090: stock nightly + sideloaded overlay boots, serves
coherent output, 262K, via `docker compose -f base.yml up` (the switch/launch path).
Upstream-gated until #45163 merges into a pinnable engine.

Co-Authored-By: Claude Opus 4.8 <[email protected]>
2026-06-11 04:00:30 +00:00

80 lines
3.2 KiB
Bash
Executable File

#!/usr/bin/env bash
set -euo pipefail
ROOT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")/../.." && pwd)"
cd "$ROOT_DIR"
export PYTHONPATH="$ROOT_DIR${PYTHONPATH:+:$PYTHONPATH}"
python3 - <<'PY'
from pathlib import Path
from scripts.lib.profiles.compat import load_profiles
from scripts.lib.profiles.compose_registry import COMPOSE_REGISTRY, DEFAULTS
root = Path.cwd()
profiles = load_profiles()
registry_paths = {Path(entry["compose_path"]) for entry in COMPOSE_REGISTRY.values()}
disk_paths = set(Path("models").glob("*/*/compose/*/*/*.yml"))
failures = []
def check(cond, msg):
if cond:
print(f"PASS: {msg}")
else:
print(f"FAIL: {msg}")
failures.append(msg)
check(len(COMPOSE_REGISTRY) == 45, f"registry has 45 entries (got {len(COMPOSE_REGISTRY)})")
check(len(disk_paths) == 46, f"disk has 46 compose files (got {len(disk_paths)})")
check(registry_paths <= disk_paths, "all registry compose_path values exist on disk")
parked_disk_only = disk_paths - registry_paths
# Disk-only (non-registry) composes allowed: parked SGLang archives, plus the experimental
# vLLM-Omni Qwen3-Omni compose (intentionally NOT registry-wired — custom-engine, direct
# `docker compose`-only deploy; see models/qwen3-omni-30b-a3b/vllm-omni/README.md).
def _allowed_disk_only(path):
return (
"/sglang/compose/" in f"/{path.as_posix()}"
or path == Path("models/qwen3-omni-30b-a3b/vllm-omni/compose/dual/autoround-int4/omni.yml")
)
check(
all(_allowed_disk_only(path) for path in parked_disk_only),
"only parked SGLang archives + the non-registry vLLM-Omni compose are disk-only",
)
if parked_disk_only:
print("INFO: disk-only parked composes: " + ", ".join(str(p) for p in sorted(parked_disk_only)))
for name, entry in sorted(COMPOSE_REGISTRY.items()):
path = Path(entry["compose_path"])
parts = path.parts
check(path.exists(), f"{name}: compose_path exists")
check(path.name not in {"docker-compose.yml", "default.yml"}, f"{name}: filename is descriptive")
try:
idx = parts.index("compose")
topology, quant_slug, filename = parts[idx + 1:idx + 4]
except (ValueError, IndexError):
check(False, f"{name}: path follows compose/<topology>/<quant>/<file>.yml")
continue
check(topology in {"single", "dual", "multi4"}, f"{name}: topology segment valid")
check(filename.endswith(".yml"), f"{name}: compose filename is .yml")
check(quant_slug == entry["weights_variant"], f"{name}: quant slug matches weights_variant")
model = profiles.models[entry["model"]]
check(entry["weights_variant"] in model.weights, f"{name}: weights_variant exists in ModelProfile")
for key, name in sorted(DEFAULTS.items()):
model, _engine, topology = key
entry = COMPOSE_REGISTRY.get(name)
check(entry is not None, f"DEFAULTS{key}: target exists")
if entry is None:
continue
path_parts = Path(entry["compose_path"]).parts
idx = path_parts.index("compose")
check(entry["model"] == model, f"DEFAULTS{key}: model matches target")
check(path_parts[idx + 1] == topology, f"DEFAULTS{key}: topology matches target path")
if failures:
raise SystemExit(f"{len(failures)} registry/disk checks failed")
PY
echo "test-compose-registry-disk: ok"