-
Notifications
You must be signed in to change notification settings - Fork 339
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
Bug with load_adapter: ValueError: Found multiple possible adapters matching 'en/wiki@ukp'. #163
Comments
Changing line 230 in transformers\adapters\utils.py to |
Thanks for the detailed bug report.
I think this solution should work. Would you mind opening a PR for it? |
It's open |
…#164) Co-authored-by: Geigle <gregortheodor.geigle@stud.tu-darmstadt.de>
Environment info
adapter-transformers
version: 2.0.0Information
Model I am using: bert-base-multilingual-cased
Relevant adapters:
en/wiki@ukp
wikiann/en@ukp
Any other language adapter with another adapter of the form $task/$language_code@ukp works.
To reproduce
Steps to reproduce the behavior:
Try loading one of the language adapters with m-bert.
Expected behavior
The adapter is loaded normally.
Why this happens
Line 252 in transformers\adapters\utils.py calls _dict_extract() (in the same utils.py).
The problematic adapter wikiann/en@ukp matches due to the 'en' in the else-part (line 230) and is yielded which then results in two possible adapters matching 'en/wiki@ukp'.
The else-part should (as far as I can see) not be used if both primary_key and secondary_key is given and should only be evaluated if only a primary_key is given to allow for e.g.
mode.load_adapter("cs")
instead ofmode.load_adapter("cs/wiki@ukp")
.The text was updated successfully, but these errors were encountered: