Skip to content

Chunked mask test: drop the now-unused _swap_function_references import - #13257

Merged
danielhanchen merged 1 commit into
mainfrom
ci-chunked-mask-unused-import
Oct 10, 2026
Merged

danielhanchen merged 1 commit into
mainfrom
ci-chunked-mask-unused-import

Conversation

@danielhanchen

Copy link
Copy Markdown
Member

Problem

Source lint failed on #13248 after it merged, at the PR-diff import-hoist guard:

[BLOCKER] tests/test_chunked_mask_block_sequence_ids.py: HOISTED-IMPORT-UNUSED '_swap_function_references'
  (['from:unsloth.import_fixes:_swap_function_references']) was used before, now unused
OVERALL: FAIL (blockers found)

#13248 rewrote the unpatched fixture to go through monkeypatch and stopped calling _swap_function_references, but left the import in place. The guard only checks files a PR changes, so main itself is not red. Any later PR that touches this test would fail Source lint on a line it did not write.

Fix

Drop the unused import. The comment that names the helper stays, because it explains which places the fixture mirrors.

Verification

Check main this PR
verify_import_hoist.py --before b15cda912a --after <rev> on this file FAIL (blockers found) PASS (no blockers)
ruff check pass pass
test_chunked_mask_block_sequence_ids.py (transformers 5.17 + peft + zoo main) 3 passed, 1 skipped 3 passed, 1 skipped

#13248 moved the fixture to monkeypatch and stopped calling _swap_function_references, but kept the import. The PR-diff import-hoist guard (scripts/verify_import_hoist.py) flags an import that was used before and no longer is, so the next PR touching this file would fail Source lint.
@danielhanchen

Copy link
Copy Markdown
Member Author

@codex review

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 10, 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-10T22:24:02.140928Z 2b4265f 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. You're on a roll.

Reviewed commit: 2b4265fb60

ℹ️ 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".

@unslothai unslothai deleted a comment from chatgpt-codex-connector Bot Oct 10, 2026
@danielhanchen
danielhanchen merged commit 151974c into main Oct 10, 2026
@danielhanchen
danielhanchen deleted the ci-chunked-mask-unused-import branch October 10, 2026 22:29
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