Skip to content

Precision conflict test: lift every loader.py helper from_pretrained reaches - #15515

Merged
danielhanchen merged 1 commit into
mainfrom
ci-precision-harness-closure
Oct 27, 2026
Merged

danielhanchen merged 1 commit into
mainfrom
ci-precision-harness-closure

Conversation

@danielhanchen

Copy link
Copy Markdown
Member

tests/test_optimized_precision_conflicts.py fails 19 of 19 on main (Repo tests (CPU, rest), e.g. job 122034866725 on #15505):

NameError: name '_agree_fast_inference_across_ranks' is not defined

The fixture compiles FastLanguageModel.from_pretrained out of loader.py together with a fixed list of three module helpers. #15390 added a call from from_pretrained to a new module helper, _agree_fast_inference_across_ranks, which was not on that list, so every case now stops on the NameError before reaching the precision checks this file is about. The product code is fine (the helper returns early when fast_inference was not requested); the harness list was stale.

Instead of adding one more name, the fixture now lifts every loader.py top-level function (and literal constant such as _VLLM_ENGINE_KWARGS) that from_pretrained reaches by name, transitively, skipping anything the fixture already stubs in its namespace. A future helper is picked up automatically, and the stubs keep precedence.

Verification (local, CPU):

  • main: 19 failed; this branch: 19 passed.
  • Sabotage: making _agree_fast_inference_across_ranks raise fails all 19, so the real helper runs on every case.
  • Stub precedence: redefining a stubbed name (_raise_if_modeling_ignores_config) in loader.py to raise still passes 19, so the lift never overrides a stub.

@danielhanchen

Copy link
Copy Markdown
Member Author

@codex review

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 27, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-27T07:29:58.569988Z 42871ce Manual request
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Nice work!

Reviewed commit: 42871ce3a8

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@danielhanchen
danielhanchen merged commit 8df1aaf into main Oct 27, 2026
0 of 15 checks passed
@danielhanchen
danielhanchen deleted the ci-precision-harness-closure branch October 27, 2026 07:35
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