-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Clean dependencies #2298
Clean dependencies #2298
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. |
@@ -21,7 +21,6 @@ | |||
import numpy as np | |||
from accelerate import Accelerator | |||
from huggingface_hub import InferenceClient | |||
from scipy.special import softmax |
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.
remove this dep
@@ -95,7 +98,7 @@ def test_create_peft_model_from_config(self): | |||
nb_trainable_params = sum(p.numel() for p in trl_model.parameters() if p.requires_grad) | |||
assert nb_trainable_params == 10273 | |||
|
|||
@require_bitsandbytes | |||
@require_torch_gpu_if_bnb_not_multi_backend_enabled |
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.
it requires cuda
Failing test are expected and will be solved later (in #2288 for example) |
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.
LGTM with a small tweak to the softmax
cache: "pip" | ||
cache-dependency-path: | | ||
setup.py | ||
requirements.txt |
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.
If we find the dependencies are a hassle to maintain, we might want to switch to the transformers
approach, which uses a look-up table to give fine-grained control: https://github.com/huggingface/transformers/blob/main/setup.py
What does this PR do?
This PR cleans up TRL dependencies by better dividing and following best practice.
It updates the test workflow accordingly.
deepspeed
andliger-kernel
are only supported for linux. This PR ensure that they are not part of optional dependencies with windows.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.