-
Notifications
You must be signed in to change notification settings - Fork 72
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
fix(peft): adapt to latest internal API #757
Conversation
ba502e6
to
ef70c31
Compare
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. |
ef70c31
to
c5c5c6a
Compare
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!
def is_peft_available(min_version: Optional[str] = MIN_PEFT_VERSION) -> bool: | ||
_peft_available = importlib.util.find_spec("peft") is not None | ||
if min_version is not None: | ||
if _peft_available: | ||
import peft | ||
|
||
_peft_version = peft.__version__ | ||
return version.parse(_peft_version) >= version.parse(min_version) | ||
else: | ||
return False | ||
return _peft_available |
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!
What does this PR do?
There has been an evolution in the PEFT internal API that is used by
optimum-neuron
when subclassing the PEFT Trainer.This pull-request:
optimum-neuron
prerequisites,