Closed ruochiz closed 2 months ago
But if umap is imported and runned first, then import ray and init, it won't.
@ruochiz Seems you have a workaround to unblock youself, is it right?
Not really.. Um, this is a temporary fix that if I know the size of the matrix that pynndescent will use. But pynndescent seems to have different route of computation graph depending on the size of the matrices, so sometimes the same error would happen again.
Root caused here: https://github.com/ray-project/ray/issues/45538
tldr: you can set this env var RAY_TQDM_PATCH_PRINT=0
to workaround
I'll give it a try, thank you for looking into this!
I confirm that the workaround solution works for me! 🙌 Thanks Ruiyang!
What happened + What you expected to happen
when ray is imported and init before running umap, it triggers the numba error:
But if umap is imported and runned first, then import ray and init, it won't. Looks like it's due to compiling numba jit functions after ray initialization.
This bug is reproducible on ray versions >= 2.5.0, but ray <= 2.4.0 it's fine.
Versions / Dependencies
Ray >= 2.5.0 numba any version >= 0.57 pynndescent/umap latest
Reproduction script
import ray ray.init() from umap import UMAP import numpy as np xx = np.random.random(10000*100).reshape((10000, 100)) vec = UMAP(metric='cosine', low_memory=False).fit_transform(np.array(xx).astype('float32'))
Issue Severity
High: It blocks me from completing my task.