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

Importing model_resolver #1363

Closed
3 tasks done
Demirrr opened this issue Jan 31, 2024 · 2 comments · Fixed by #1370
Closed
3 tasks done

Importing model_resolver #1363

Demirrr opened this issue Jan 31, 2024 · 2 comments · Fixed by #1370
Labels
bug Something isn't working

Comments

@Demirrr
Copy link

Demirrr commented Jan 31, 2024

Describe the bug

Hello all,

I would like to inform you about the RegistrationNameConflict error.
importing model_resolver throws RegistrationNameConflict.

How to reproduce

from pykeen.models import model_resolver

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/upb/users/c/cdemir/profiles/unix/cs/anaconda3/envs/dice/lib/python3.10/site-packages/pykeen/models/__init__.py", line 52, in <module>
    from .base import Model
  File "/upb/users/c/cdemir/profiles/unix/cs/anaconda3/envs/dice/lib/python3.10/site-packages/pykeen/models/base.py", line 20, in <module>
    from ..losses import Loss, MarginRankingLoss, loss_resolver
  File "/upb/users/c/cdemir/profiles/unix/cs/anaconda3/envs/dice/lib/python3.10/site-packages/pykeen/losses.py", line 172, in <module>
    from class_resolver.contrib.torch import margin_activation_resolver
  File "/upb/users/c/cdemir/profiles/unix/cs/anaconda3/envs/dice/lib/python3.10/site-packages/class_resolver/contrib/torch.py", line 213, in <module>
    lr_scheduler_resolver.register(ReduceLROnPlateau)
  File "/upb/users/c/cdemir/profiles/unix/cs/anaconda3/envs/dice/lib/python3.10/site-packages/class_resolver/base.py", line 170, in register
    raise RegistrationNameConflict(self, key, element, label="name")
class_resolver.base.RegistrationNameConflict: Conflict on registration of name reducelronplateau:
Existing: <class 'torch.optim.lr_scheduler.ReduceLROnPlateau'>
Proposed: <class 'torch.optim.lr_scheduler.ReduceLROnPlateau'>

Environment

python 3.10.13
pykeen 1.10.1
torch 2.2.0+cu121
lightning '2.1.3

Additional information

No response

Issue Template Checks

  • This is not a feature request (use a different issue template if it is)
  • This is not a question (use the discussions forum instead)
  • I've read the text explaining why including environment information is important and understand if I omit this information that my issue will be dismissed
@Demirrr Demirrr added the bug Something isn't working label Jan 31, 2024
@Martin1007Wang
Copy link

Same here.
Environment
python 3.9.*
pykeen 1.10.1
torch 1.13.0+cu116

@mberr
Copy link
Member

mberr commented Feb 19, 2024

Hi, this should be solved now. Until our next release, please install from source: https://github.com/pykeen/pykeen?tab=readme-ov-file#installation--

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants