Skip to content
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

__init__() got an unexpected keyword argument 'adapter_kwargs' #256

Closed
bocchris-aws opened this issue Oct 11, 2023 · 2 comments
Closed

__init__() got an unexpected keyword argument 'adapter_kwargs' #256

bocchris-aws opened this issue Oct 11, 2023 · 2 comments

Comments

@bocchris-aws
Copy link
Contributor

When I try to run run_summarization.py from the main branch, I run into the following error:

Traceback (most recent call last):                                                                                                                                                                                                                                                                                │··
    return func(*args, **kwargs)                                                                                                                                                                                                                                                                                  │··
  File "/home/ubuntu/optimum-neuron/optimum/neuron/distributed/utils.py", line 552, in from_pretrained_for_tp                                                                                                                                                                                                     │··
  File "run_summarization.py", line 757, in <module>                                                                                                                                                                                                                                                              │··
    model = cls(config, *model_args, **model_kwargs)                                                                                                                                                                                                                                                              │··
TypeError: __init__() got an unexpected keyword argument 'adapter_kwargs'                                                                                                                                                                                                                                         │··
    main()                                                                                                                                                                                                                                                                                                        │··
  File "run_summarization.py", line 433, in main                                                                                                                                                                                                                                                                  │··
    model = AutoModelForSeq2SeqLM.from_pretrained(                                                                                                                                                                                                                                                                │··
  File "/opt/aws_neuron_venv_pytorch/lib/python3.8/site-packages/transformers/models/auto/auto_factory.py", line 565, in from_pretrained                                                                                                                                                                          │··
    return model_class.from_pretrained(                                                                                                                                                                                                                                                                           │··
  File "/home/ubuntu/optimum-neuron/optimum/neuron/utils/require_utils.py", line 44, in wrapper                                                                                                                                                                                                                   │··
    return func(*args, **kwargs)                                                                                                                                                                                                                                                                                  │··
  File "/home/ubuntu/optimum-neuron/optimum/neuron/distributed/utils.py", line 552, in from_pretrained_for_tp                                                                                                                                                                                                     │··
    model = cls(config, *model_args, **model_kwargs)                                                                                                                                                                                                                                                              │··
TypeError: __init__() got an unexpected keyword argument 'adapter_kwargs'

Transformers is at 4.34.0 and was installed as dependency during installation of optimum-neuron.

@bocchris-aws
Copy link
Contributor Author

Code works with transformers==4.33.1.

@michaelbenayoun
Copy link
Member

Fixed by #259 .
Please re-open if the issue persists.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants