Sort conditional imports#6180
Conversation
|
The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 86faa59ccd
ℹ️ 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".
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Want higher recall? High effort reviews run extra passes and find more bugs. A team admin can switch effort levels in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit d1b9a5a. Configure here.
albertvillanova
left a comment
There was a problem hiding this comment.
Thanks!
The CI is red. Do you know why the CI has been failing today apparently in a non-deterministic way?
|
No idea! |
|
It seems like transient hub errors |

Minor consistency import sorting
Note
Low Risk
Import reordering and formatting only; no training or runtime logic changes.
Overview
Reorders optional dependency imports (
if is_*_available(): …) and tightens multi-linefrom … importlists to a single line in trainers,extras/profiling,models/activation_offloading, and related tests. The intent is a shared layout: optional blocks grouped with blank lines between them, and module-levellogger/ constants placed after those blocks where they were previously interleaved.Test-only tweaks: drops a no-op
is_peft_available()stub intest_gspo_token_trainer.py, and importsPEFTAdapterEMACallbackunconditionally intest_self_distillation_trainer_behavior.pyinstead of nesting it inside the PEFT guard.Reviewed by Cursor Bugbot for commit 4503c21. Bugbot is set up for automated code reviews on this repo. Configure here.