lmcinnes / umap

Uniform Manifold Approximation and Projection
BSD 3-Clause "New" or "Revised" License
7.46k stars 809 forks source link

Not able to work with old embedder object created using python 3.8 #1079

Open parth-akridata opened 11 months ago

parth-akridata commented 11 months ago

Traceback (most recent call last): akri-ds-access-celery-worker-1 | File "/home/quart/app/celery_api/common/log_decorator.py", line 24, in wrapper akri-ds-access-celery-worker-1 | return func(*args, kwargs) akri-ds-access-celery-worker-1 | File "/home/quart/app/celery_api/tasks/ds_request/train_coreset/tasks.py", line 29, in train_coreset_task akri-ds-access-celery-worker-1 | asyncio.run( akri-ds-access-celery-worker-1 | File "/usr/lib/python3.10/asyncio/runners.py", line 44, in run akri-ds-access-celery-worker-1 | return loop.run_until_complete(main) akri-ds-access-celery-worker-1 | File "/usr/lib/python3.10/asyncio/base_events.py", line 649, in run_until_complete akri-ds-access-celery-worker-1 | return future.result() akri-ds-access-celery-worker-1 | File "/home/quart/app/celery_api/tasks/ds_request/train_coreset/train_coreset.py", line 71, in train_coreset akri-ds-access-celery-worker-1 | await coreset_trainer.execute() akri-ds-access-celery-worker-1 | File "/home/quart/app/celery_api/tasks/ds_request/train_coreset/train_coreset.py", line 269, in execute akri-ds-access-celery-worker-1 | self._train_embedder() akri-ds-access-celery-worker-1 | File "/home/quart/app/celery_api/tasks/ds_request/train_coreset/train_coreset.py", line 279, in _train_embedder akri-ds-access-celery-worker-1 | ) = PrepAccess.first_embed( akri-ds-access-celery-worker-1 | File "/usr/local/lib/python3.10/dist-packages/statsum/prepaccess.py", line 704, in first_embed akri-ds-access-celery-worker-1 | embedder.extend(pf_sampledelta) akri-ds-access-celery-worker-1 | File "/usr/local/lib/python3.10/dist-packages/statsum/embed.py", line 956, in extend akri-ds-access-celery-worker-1 | = self.extend_transform(args, kwargs) akri-ds-access-celery-worker-1 | File "/usr/local/lib/python3.10/dist-packages/statsum/embed.py", line 899, in extend_transform akri-ds-access-celery-worker-1 | embedding_extend = self._model.transform(Xextend) akri-ds-access-celery-worker-1 | File "/usr/local/lib/python3.10/dist-packages/umap/umap.py", line 2988, in transform akri-ds-access-celery-worker-1 | dmat = pairwise_distances( akri-ds-access-celery-worker-1 | File "/usr/local/lib/python3.10/dist-packages/sklearn/metrics/pairwise.py", line 2196, in pairwise_distances akri-ds-access-celery-worker-1 | return _parallel_pairwise(X, Y, func, n_jobs, kwds) akri-ds-access-celery-worker-1 | File "/usr/local/lib/python3.10/dist-packages/sklearn/metrics/pairwise.py", line 1766, in _parallel_pairwise akri-ds-access-celery-worker-1 | return func(X, Y, kwds) akri-ds-access-celery-worker-1 | File "/usr/local/lib/python3.10/dist-packages/sklearn/metrics/pairwise.py", line 1810, in _pairwise_callable akri-ds-access-celery-worker-1 | out[i, j] = metric(X[i], Y[j], kwds) akri-ds-access-celery-worker-1 | File "/usr/local/lib/python3.10/dist-packages/numba/core/dispatcher.py", line 487, in _compile_for_args akri-ds-access-celery-worker-1 | raise e akri-ds-access-celery-worker-1 | File "/usr/local/lib/python3.10/dist-packages/numba/core/dispatcher.py", line 420, in _compile_for_args akri-ds-access-celery-worker-1 | return_val = self.compile(tuple(argtypes)) akri-ds-access-celery-worker-1 | File "/usr/local/lib/python3.10/dist-packages/numba/core/dispatcher.py", line 965, in compile akri-ds-access-celery-worker-1 | cres = self._compiler.compile(args, return_type) akri-ds-access-celery-worker-1 | File "/usr/local/lib/python3.10/dist-packages/numba/core/dispatcher.py", line 125, in compile akri-ds-access-celery-worker-1 | status, retval = self._compile_cached(args, return_type) akri-ds-access-celery-worker-1 | File "/usr/local/lib/python3.10/dist-packages/numba/core/dispatcher.py", line 139, in _compile_cached akri-ds-access-celery-worker-1 | retval = self._compile_core(args, return_type) akri-ds-access-celery-worker-1 | File "/usr/local/lib/python3.10/dist-packages/numba/core/dispatcher.py", line 152, in _compile_core akri-ds-access-celery-worker-1 | cres = compiler.compile_extra(self.targetdescr.typing_context, akri-ds-access-celery-worker-1 | File "/usr/local/lib/python3.10/dist-packages/numba/core/compiler.py", line 770, in compile_extra akri-ds-access-celery-worker-1 | return pipeline.compile_extra(func) akri-ds-access-celery-worker-1 | File "/usr/local/lib/python3.10/dist-packages/numba/core/compiler.py", line 461, in compile_extra akri-ds-access-celery-worker-1 | return self._compile_bytecode() akri-ds-access-celery-worker-1 | File "/usr/local/lib/python3.10/dist-packages/numba/core/compiler.py", line 529, in _compile_bytecode akri-ds-access-celery-worker-1 | return self._compile_core() akri-ds-access-celery-worker-1 | File "/usr/local/lib/python3.10/dist-packages/numba/core/compiler.py", line 508, in _compile_core akri-ds-access-celery-worker-1 | raise e akri-ds-access-celery-worker-1 | File "/usr/local/lib/python3.10/dist-packages/numba/core/compiler.py", line 495, in _compile_core akri-ds-access-celery-worker-1 | pm.run(self.state) akri-ds-access-celery-worker-1 | File "/usr/local/lib/python3.10/dist-packages/numba/core/compiler_machinery.py", line 368, in run akri-ds-access-celery-worker-1 | raise patched_exception akri-ds-access-celery-worker-1 | File "/usr/local/lib/python3.10/dist-packages/numba/core/compiler_machinery.py", line 356, in run akri-ds-access-celery-worker-1 | self._runPass(idx, pass_inst, state) akri-ds-access-celery-worker-1 | File "/usr/local/lib/python3.10/dist-packages/numba/core/compiler_lock.py", line 35, in _acquire_compile_lock akri-ds-access-celery-worker-1 | return func(args, kwargs) akri-ds-access-celery-worker-1 | File "/usr/local/lib/python3.10/dist-packages/numba/core/compiler_machinery.py", line 311, in _runPass akri-ds-access-celery-worker-1 | mutated |= check(pss.run_pass, internal_state) akri-ds-access-celery-worker-1 | File "/usr/local/lib/python3.10/dist-packages/numba/core/compiler_machinery.py", line 273, in check akri-ds-access-celery-worker-1 | mangled = func(compiler_state) akri-ds-access-celery-worker-1 | File "/usr/local/lib/python3.10/dist-packages/numba/core/untyped_passes.py", line 86, in run_pass akri-ds-access-celery-worker-1 | func_ir = interp.interpret(bc) akri-ds-access-celery-worker-1 | File "/usr/local/lib/python3.10/dist-packages/numba/core/interpreter.py", line 1363, in interpret akri-ds-access-celery-worker-1 | flow.run() akri-ds-access-celery-worker-1 | File "/usr/local/lib/python3.10/dist-packages/numba/core/byteflow.py", line 110, in run akri-ds-access-celery-worker-1 | runner.dispatch(state) akri-ds-access-celery-worker-1 | File "/usr/local/lib/python3.10/dist-packages/numba/core/byteflow.py", line 331, in dispatch akri-ds-access-celery-worker-1 | inst = state.get_inst() akri-ds-access-celery-worker-1 | File "/usr/local/lib/python3.10/dist-packages/numba/core/byteflow.py", line 1571, in get_inst akri-ds-access-celery-worker-1 | return self._bytecode[self._pc] akri-ds-access-celery-worker-1 | File "/usr/local/lib/python3.10/dist-packages/numba/core/bytecode.py", line 269, in getitem akri-ds-access-celery-worker-1 | return self.table[offset] akri-ds-access-celery-worker-1 | KeyError: 'Failed in nopython mode pipeline (step: analyzing bytecode)\n78'

Embedder object was created using python 3.8 and tried to transform object with python3.10

lmcinnes commented 11 months ago

I'm afraid that looks to be down in numba bytecode, which is beyond the realm of things I can help with.