Skip to content

[Test] Fix OOT DFlash hook test resolving the draft config over the network - #40427

Merged
hnyls2002 merged 2 commits into
mainfrom
lsyin/fix-oot-dflash-test
Sep 20, 2026
Merged

hnyls2002 merged 2 commits into
mainfrom
lsyin/fix-oot-dflash-test

Conversation

@hnyls2002

@hnyls2002 hnyls2002 commented Sep 20, 2026 •

Copy link
Copy Markdown
Collaborator

test/registered/unit/spec/test_oot_dflash_hooks.py has been red on base-a-test-cpu since it landed in #38740, for two independent reasons.

  • It drove the whole handle_speculative_decoding hook to test one decision. That hook also resolves the speculative algorithm alias, which calls get_config(speculative_draft_model_path) -- and the fixture passes the placeholder "draft", so the CPU lane tries to reach HuggingFace and fails with OSError: draft is not a local folder. The test mocks current_platform and attention_backends_of but not this path.
  • It read the result back as args.speculative_draft_attention_backend. declare_resolution records into the declaration stash and never writes the field, so that read returns the input. Three of the assertions would still fail once the network error was gone; the two that passed did so because input and expectation happened to match.

Call _resolve_dflash_draft_attention_backend directly (the same pattern test_uno_tree_config.py uses for _handle_uno) and read the outcome through resolution_result. The resolver has no HF lookup on the paths these cases take -- trtllm_mha is rejected by is_supported_backend before the branch that would load a config -- so the fixture needs no new mock, and a future step added to the hook no longer breaks this test.


CI States

Latest PR Test (Base): 🚫 Run #35498097514
Latest PR Test (Extra): ❌ Run #35498097446
Latest PR Test (AMD ROCm 10): 🚫 Run #35498097545

@hnyls2002

Copy link
Copy Markdown
Collaborator Author

/tag-and-rerun-ci

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

run-ci CI: run the baseline test suite on this PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant