Skip to content

test: stop passing device_map to build_shell_model (AWQ fold inventory red since #6473) - #6496

Merged
Qubitium merged 1 commit into
mainfrom
fix/main-red-device-map
Nov 30, 2026
Merged

Qubitium merged 1 commit into
mainfrom
fix/main-red-device-map

Conversation

@Qubitium

Copy link
Copy Markdown
Collaborator

Summary

Main is red since #6473 (Remove accelerate). That PR removed del init_kwargs["device_map"] from build_shell_model, so a device_map kwarg now reaches the model class __init__ and raises TypeError: ...__init__() got an unexpected keyword argument 'device_map'.

Production callers never pass device_map here, because the public API now rejects it (_reject_accelerate_placement_kwargs). Four test helpers still did:

  • tests/module_tree/awq_fold_inventory.py built every shell with device_map=None. As a result:

    • python tests/module_tree/awq_fold_inventory.py --check reports errors for all 210 types;
    • tests/module_tree/test_awq_fold_inventory.py errors on every node.

    This is the guard every AWQ planner refactor relies on, and it has been off on main since Remove accelerate: explicit WeightLoader for weight loading, placement and offload (#6471) #6473.

  • The three solar tests passed device_map={"": "cpu"}: tests/test_solar_open2_local_port.py::test_package_selection_ignores_checkpoint_python, and the lazy-turtle tests in tests/models/test_solar_open.py and tests/models/test_solar_open2.py.

What Changed

  • The device_map argument is dropped from those four build_shell_model calls. Shells are built on meta either way.
  • Test-only. No production code, API or behaviour change.

Tests

  • Unit tests have been executed and passed.
  • New unit test: not applicable. The existing inventory test is the regression guard and fails on main without this change.
CUDA_VISIBLE_DEVICES="" python -P -m pytest -q -n 16 tests/module_tree/test_awq_fold_inventory.py tests/test_solar_open2_local_port.py \
  "tests/models/test_solar_open.py::test_solar_open_lazy_turtle_materializes_defused_expert_weights" \
  "tests/models/test_solar_open2.py::test_solar_open2_lazy_turtle_materializes_released_expert_weights"
# main 186737ff5 (includes #6473): 5 failed, 45 passed, 759 errors
# this branch (on 99fd14d56):      809 passed

python -P tests/module_tree/awq_fold_inventory.py --check
# main: errors=['default'] for every type, "changed: [all 210]"
# this branch: changed: none

bash format/check.sh passes.

Measured Impact

Not applicable (test-only).

Model Support / Module Plan

Not applicable: no definition change.

AWQ onboarding safety

Not applicable: no AWQ grouping/search/replay/fold change. This restores the AWQ fold inventory check itself.

Logic Flow Documentation

Not applicable: no control-flow change.

Review Requirements

  • Reviewed this PR.
  • Matches existing project structure, APIs, and conventions.
  • No monkeypatching added.
  • Minimal surface: four one-line deletions.
  • No regressions: test-only.

Kernel Accuracy Requirements

Not applicable.

Notes

None.

🤖 Generated with Claude Code

…y red since #6473)

#6473 removed Accelerate and the `del init_kwargs["device_map"]` in
build_shell_model, so a `device_map` kwarg now reaches the model class
__init__ and raises TypeError. Production callers never pass it (the
public API rejects device_map), but four test helpers still did:

- tests/module_tree/awq_fold_inventory.py built every shell with
  device_map=None, so `awq_fold_inventory.py --check` errors on all 210
  types and test_awq_fold_inventory.py errors on every node; the AWQ
  refactor guard was off on main.
- three solar_open/solar_open2 tests passed device_map={"": "cpu"}.

Drop the argument; shells are built on meta either way.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@Qubitium
Qubitium marked this pull request as ready for review November 30, 2026 12:23
@Qubitium
Qubitium merged commit 93c1a6c into main Nov 30, 2026
6 checks passed
@Qubitium
Qubitium deleted the fix/main-red-device-map branch November 30, 2026 12:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant