Skip to content

Commit

Permalink
Noqa raise OSError() in auto.py
Browse files Browse the repository at this point in the history
  • Loading branch information
akx committed Feb 7, 2024
1 parent dff8288 commit 6eea4d7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/peft/auto.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ class _BaseAutoPeftModel:

def __init__(self, *args, **kwargs):
# For consistency with transformers: https://github.com/huggingface/transformers/blob/91d7df58b6537d385e90578dac40204cb550f706/src/transformers/models/auto/auto_factory.py#L400
raise OSError(
raise EnvironmentError( # noqa: UP024
f"{self.__class__.__name__} is designed to be instantiated "
f"using the `{self.__class__.__name__}.from_pretrained(pretrained_model_name_or_path)` or "
f"`{self.__class__.__name__}.from_config(config)` methods."
Expand Down

0 comments on commit 6eea4d7

Please sign in to comment.