Skip to content

Standardize TrainerCallback import to the public top-level path#6249

Merged
qgallouedec merged 6 commits into
mainfrom
standardize-trainercallback-import
Jul 3, 2026
Merged

Standardize TrainerCallback import to the public top-level path#6249
qgallouedec merged 6 commits into
mainfrom
standardize-trainercallback-import

Conversation

@qgallouedec

@qgallouedec qgallouedec commented Jul 2, 2026

Copy link
Copy Markdown
Member

Standardize every TrainerCallback import across the repo to the public API form from transformers import TrainerCallback.

No behavior change.


Note

Low Risk
Import path only; no runtime or training logic changes.

Overview
TrainerCallback is now imported from the public transformers package (from transformers import …, TrainerCallback) instead of the internal transformers.trainer_callback path in tpo_trainer.py, dpo_trainer.py, and sft_trainer.py.

This is an import-only cleanup; trainer behavior and callback typing are unchanged.

Reviewed by Cursor Bugbot for commit eaf5212. Bugbot is set up for automated code reviews on this repo. Configure here.

@bot-ci-comment

bot-ci-comment Bot commented Jul 2, 2026

Copy link
Copy Markdown

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.

@qgallouedec qgallouedec merged commit 05cf734 into main Jul 3, 2026
7 of 15 checks passed
@qgallouedec qgallouedec deleted the standardize-trainercallback-import branch July 3, 2026 19:04
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