mirror of
https://github.com/huggingface/transformers.git
synced 2025-07-31 02:02:21 +06:00
[peft
] Given that self.active_adapter
is deprecated, avoid using it (#34804)
* Given that self.active_adapter is deprecated, avoid using it * Remove misleading comment - `self.active_adapter` is not used (and deprecated)
This commit is contained in:
parent
74db22f905
commit
11cc2295c7
@ -381,7 +381,7 @@ class PeftAdapterMixin:
|
||||
If you are not familiar with adapters and PEFT methods, we invite you to read more about them on the PEFT
|
||||
official documentation: https://huggingface.co/docs/peft
|
||||
|
||||
Enable adapters that are attached to the model. The model will use `self.active_adapter()`
|
||||
Enable adapters that are attached to the model.
|
||||
"""
|
||||
check_peft_version(min_version=MIN_PEFT_VERSION)
|
||||
|
||||
@ -457,7 +457,7 @@ class PeftAdapterMixin:
|
||||
from peft import get_peft_model_state_dict
|
||||
|
||||
if adapter_name is None:
|
||||
adapter_name = self.active_adapter()
|
||||
adapter_name = self.active_adapters()[0]
|
||||
|
||||
adapter_state_dict = get_peft_model_state_dict(self, adapter_name=adapter_name)
|
||||
return adapter_state_dict
|
||||
|
Loading…
Reference in New Issue
Block a user