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 lab fails with latest plum version v2.5.6 #23

Open
davidwilby opened this issue Jan 15, 2025 · 1 comment
Open

Importing lab fails with latest plum version v2.5.6 #23

davidwilby opened this issue Jan 15, 2025 · 1 comment

Comments

@davidwilby
Copy link

Importing lab results in an error raised in plum from version 2.5.6 (2.5.5) seems to be fine.

Error log from pytest collection:

    import lab as B
./python3.11/site-packages/lab/__init__.py:9: in <module>
    from .generic import *
./python3.11/site-packages/lab/generic.py:11: in <module>
    from .types import (
./python3.11/site-packages/lab/types.py:129: in <module>
    add_promotion_rule(NPNumeric, TFNumeric, TFNumeric)
./plum/plum/function.py:342: in _handle_not_found_lookup_error
    raise ex from None
./plum/plum/resolver.py:377: in resolve
    raise NotFoundLookupError(self.function_name, target, self.methods)
E   plum.resolver.NotFoundLookupError: `add_promotion_rule(<class 'numpy.ndarray'>, 
E   typing.Union[plum.type.ModuleType[tensorflow.Tensor], 
E   plum.type.ModuleType[tensorflow.Variable], 
E   plum.type.ModuleType[tensorflow.IndexedSlices], 
E   plum.type.ModuleType[keras.KerasTensor]], 
E   typing.Union[plum.type.ModuleType[tensorflow.Tensor], 
E   plum.type.ModuleType[tensorflow.Variable], 
E   plum.type.ModuleType[tensorflow.IndexedSlices], 
E   plum.type.ModuleType[keras.KerasTensor]])` could not be resolved.
E   
E   Closest candidates are the following:
E       add_promotion_rule(type1: object, type2: object, type_to: type) ->          
E       NoneType                                                                    
E           <function add_promotion_rule at 0x763607967380> @                       
E       ~/./plum/plum/promotion.py:137
@vabor112
Copy link

+1, same problem in https://github.com/geometric-kernels/GeometricKernels

vabor112 added a commit to geometric-kernels/GeometricKernels that referenced this issue Jan 16, 2025
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