-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use transformers
utilities when possible
#2064
Conversation
@qgallouedec if we are using the helpers from transformers we might need to update the minimal transformer version to something newer? see here https://github.com/huggingface/trl/blob/main/setup.py#L80 |
Good point. In 4.39, we miss:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the QoL improvement! I wonder if putting a lower bound on transformers
leads to downstream issues in users who have a pinned, lower version of the lib? Otherwise LGTM
pip will probably outputs something like:
|
What does this PR do?
A lot of utilities are redefined when we can just rely on
transformers
. I've removed most on them.Most of https://github.com/huggingface/trl/blob/5c195eb51347ac4df7427eff4f1d636e860d13bf/tests/testing_utils.py
is_bitsandbytes_available
is_liger_available
is_peft_available
is_pil_available
is_wandb_available
is_xpu_available
require_peft
require_bitsandbytes
require_diffusers
requires_pil
require_wandb
require_torch_multi_gpu
require_torch_gpu
require_torch_multi_xpu
require_liger_kernel
require_non_cpu
require_multi_accelerator
Before submitting
Pull Request section?
to it if that's the case.
documentation guidelines.
Who can review?
Anyone in the community is free to review the PR once the tests have passed. Feel free to tag
members/contributors who may be interested in your PR.