Skip to content

test_run_exit_recovery_contract_5060 [gptq-offload] fails on main: asserts pre-#6473 meta+hook disk shells #6517

Done

Description

@Qubitium

Summary

On main (c649fcb) two nodes fail deterministically (CPU, any host):

FAILED tests/test_run_exit_recovery_contract_5060.py::test_mid_run_fault_recovers_and_preserves_the_original_error[gptq-offload]
  _assert_disk_shells_retain_backing: assert offloaded  ->  assert []
FAILED tests/test_run_exit_recovery_contract_5060.py::test_successful_run_control[gptq-offload]
  AssertionError: a successful run must restore the disk-offloaded layers
  assert not has_disk_offloaded_modules(model.model)

Cause: stale test, product is correct

Since #6473/#6494, offload_to_disk=True rebinds finalized modules as file-backed CPU tensors (views of <run root>/<module>/filebacked.safetensors), with no meta placeholders and no _hf_hook offload hooks. docs/in-session-model-after-offload.md documents that the run directory is kept while file-backed modules map it, and has_disk_offloaded_modules deliberately reports file-backed modules as true (#4807) so the run root outlives them.

The test still expects the old Accelerate design:

  • _assert_disk_shells_retain_backing / _assert_completed_layer_usable look for modules that are meta and carry _hf_hook, with a module.safetensors bundle; none exist any more.
  • test_successful_run_control requires has_disk_offloaded_modules(...) == False after success; file-backed modules legitimately remain.

The model is in the documented state: no meta tensors, all CPU, grad forward works (_assert_grad_forward passes once the stale assertions are replaced).

Fix

Assert the file-backed invariant instead: no meta leaves; every file-backed module's backing file exists under the run root; the gptq-offload control really produced file-backed modules. PR to follow.

Activity

  1. added a commit that references this issue on Dec 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions