Skip to content

Risky loader baseline: record the CPU backend dataprep loader from #15501 - #15549

Merged
danielhanchen merged 1 commit into
mainfrom
ci-risky-loader-cpu-dataprep
Oct 27, 2026
Merged

danielhanchen merged 1 commit into
mainfrom
ci-risky-loader-cpu-dataprep

Conversation

@danielhanchen

@danielhanchen danielhanchen commented Oct 27, 2026 •

Copy link
Copy Markdown
Member

Source lint and workflow-trigger lint (tests/security/test_lint_risky_loaders.py::test_the_tree_matches_the_baseline) fail on main since #15501 merged, and so on every PR based after it (e.g. #15536, job 122152574837):

1 risky loader call site(s) not in the baseline:
  unsloth/_cpu_init.py:205  [dynamic-import] spec_from_file_location

#15501 added _load_dataprep to the CPU backend init, which loads unsloth/dataprep/raw_text.py and ebooks.py by file (so it skips dataprep/__init__, which needs a GPU device type). The call is safe, but the baseline entry was not recorded before it merged.

Review

  • The path is Path(__file__).resolve().parent / "dataprep" / f"{name}.py", inside the installed package.
  • The only callers pass the constants "raw_text" and "ebooks", and _load_dataprep is deleted right after, so nothing else can reach it.
  • This is the same shape as the existing unsloth/__init__.py entry that loads dataprep/ebooks.py by file on MLX.

Change

One entry from python scripts/lint_risky_loaders.py --update, with the reason filled in. Nothing else in the baseline moves.

Verification

  • python scripts/lint_risky_loaders.py: main reports the site above and exits 1; this branch prints ok: 111 risky loader call site(s), all recorded.
  • tests/security/test_lint_risky_loaders.py: main 1 failed, 45 passed; this branch 46 passed.
  • The entry is digest-pinned to the call: changing its path argument to os.environ["X_DATAPREP"] reopens the site and the lint exits 1 again.

@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-27T12:16:27.431442Z 8f11df7 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. Swish!

Reviewed commit: 8f11df7986

ℹ️ 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 0e21bbf into main Oct 27, 2026
0 of 13 checks passed
@danielhanchen
danielhanchen deleted the ci-risky-loader-cpu-dataprep branch October 27, 2026 12:21
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