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

TypingError on fit_transform #13

Closed
y27choi opened this issue Apr 4, 2022 · 4 comments
Closed

TypingError on fit_transform #13

y27choi opened this issue Apr 4, 2022 · 4 comments

Comments

@y27choi
Copy link

y27choi commented Apr 4, 2022

I'm getting this error when I'm running fit_transform. Could I please get some help here?

The input size is (213136, 1024) with float16.

TypingError: Failed in nopython mode pipeline (step: nopython frontend)
No implementation of function Function(<built-in function arange>) found for signature:
 
 >>> arange(int64)
 
During: resolving callee type: Function(<built-in function arange>)
During: typing of call at ~/anaconda3/envs/torch111-cuda113/lib/python3.9/site-packages/pynndescent/rp_trees.py (764)


File "../../../../anaconda3/envs/torch111-cuda113/lib/python3.9/site-packages/pynndescent/rp_trees.py", line 764:
def make_dense_tree(data, rng_state, leaf_size=30, angular=False):
    indices = np.arange(data.shape[0]).astype(np.int32)
@koulakis
Copy link
Owner

koulakis commented Apr 4, 2022

Hi @y27choi. I tried to reproduce your error by projecting a random numpy array of the size and data type you describe, but unfortunately without success. Could you please share some more info about the library versions you are using? For example, you could send me the output of pip list or conda list.

@y27choi
Copy link
Author

y27choi commented Apr 4, 2022

Thanks for the quick reply. Here are the output from pip list and conda list.
requirements.txt
conda_list.txt

@koulakis
Copy link
Owner

koulakis commented Apr 4, 2022

Thanks for sharing the files. I reproduced the error. The issue is an incompatibility between numba and numpy. Namely, numba supports numpy 1.21 or less. Unfortunately, you had a relatively old version of numba which didn't raise any error for this dependency constraint, thus it was hard to spot it.

For this and a couple of other reasons, we have currently fixed the version of numpy to 1.20 in hnne. It is a temporary solution till we do some broader tests and weaken the constraint on this dependency.

I would suggest as a workaround to change the versions of numba to 0.55.1 and of numpy to 1.20. You could also try setting numpy to 1.21, it is not tested, but might work as well. Let me know if it works for you!

@y27choi
Copy link
Author

y27choi commented Apr 4, 2022

Just verified the workaround. Thank you so much for your quick response!

@y27choi y27choi closed this as completed Apr 4, 2022
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