Repository navigation
Declare direct dependencies we currently get transitively - #7666
Closed
RerankerGuo wants to merge 1 commit into
Closed
RerankerGuo wants to merge 1 commit into
RerankerGuo wants to merge 1 commit into
Conversation
Adds numpy, pandas, pyarrow, huggingface_hub, pyyaml, and psutil to the direct dependencies list. Each is imported by name in trl/* sources but only reaches the package via accelerate, datasets, or transformers. If any of those upstream packages drops or makes one of these optional, 'import trl' breaks. torch is left to huggingface#7642, which adds the version pin (>=2.6.0). Fixes huggingface#7653.
Member
|
Thanks but I'll let @albertvillanova handling it, it has more context on the demand |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this PR do?
Fixes #7653.
Adds the packages TRL imports by name but currently only gets transitively (via accelerate, datasets, or transformers) to the direct dependency list:
huggingface_hub(trl/trainer/base_trainer.py,trl/trainer/grpo_trainer.py,trl/trainer/utils.py)numpy(trl/data_utils.py,trl/trainer/grpo_trainer.py)pandas(trl/trainer/callbacks.py,trl/trainer/grpo_trainer.py)psutil(trl/models/activation_offloading.py)pyarrow(trl/data_utils.py)pyyaml(trl/scripts/_hf_argparser.py)If one of those upstream packages drops or makes one of them optional,
import trlbreaks.torchis left to #7642, which adds the version pin (>=2.6.0); no version floors are introduced here, matching the existingjinja2line.Before submitting
AI writing disclosure
Note
Low Risk
Metadata-only change to declared install requirements; no runtime or API behavior changes.
Overview
Packaging fix: six libraries TRL imports directly are now listed in
pyproject.tomlas first-class dependencies instead of relying on them coming in transitively throughaccelerate,datasets, ortransformers.Added:
huggingface_hub,numpy,pandas,psutil,pyarrow, andpyyaml(with inline comments pointing at the importing modules). No version floors were added, consistent with existing entries likejinja2.torchis intentionally left for a separate PR.This prevents
import trlfrom breaking if an upstream package drops or optionalizes one of these deps.Reviewed by Cursor Bugbot for commit 3daeac7. Bugbot is set up for automated code reviews on this repo. Configure here.