Skip to content

Risky loader baseline: record the TRL async GRPO import_module site (source lint red since #18070) - #18086

Merged
danielhanchen merged 1 commit into
mainfrom
ci-risky-loader-async-grpo
Nov 17, 2026
Merged

danielhanchen merged 1 commit into
mainfrom
ci-risky-loader-async-grpo

Conversation

@danielhanchen

Copy link
Copy Markdown
Member

Summary

Source lint (Python + shell + YAML + JSON + safety nets) fails on main since #18070 (seen on the staging runs for #18080 and #18082, both on 8c99caf36c):

1 risky loader call site(s) not in the baseline:

  unsloth/models/rl.py:5481  [dynamic-import] import_module

#18070 finds TRL's AsyncGRPOTrainer at its 1.18 location as well as the older experimental one, which needs a second importlib.import_module(name) call site. scripts/lint_risky_loaders.py flags every new dynamic import until someone reviews it and records it in scripts/risky_loaders_baseline.json, and that entry was not added.

Review

name comes from a fixed tuple of two literal module names, trl.trainer.async_grpo_trainer and trl.experimental.async_grpo.async_grpo_trainer, and each is checked with importlib.util.find_spec first. No user or remote input reaches it. It is the same kind of site as the other TRL import_module entries already recorded for rl.py.

Change

One entry added to scripts/risky_loaders_baseline.json, written by python scripts/lint_risky_loaders.py --update (which marks it REVIEW ME), with the reason filled in. No other entry moves.

Verification

In a clean git archive of main:

  • python scripts/lint_risky_loaders.py exits 1 on main (the site above) and exits 0 with this change (ok: 118 risky loader call site(s), all recorded).
  • tests/security/test_lint_risky_loaders.py: 46 passed.

@danielhanchen

Copy link
Copy Markdown
Member Author

@codex review

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 17, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

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

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-17T05:45:46.846014Z 8c60a8c 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. Can't wait for the next one!

Reviewed commit: 8c60a8c507

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

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