lmcinnes / lmcinnes/pynndescent

AttributeError: 'NNDescent' object has no attribute 'parallel_batch_queries'

Open
#176 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
970
Forks
107
PR merge metrics
No merged PRs in 30d

Description

I am facing above error when i download the model from azureml and convert it back using joblib. Below are the lines

from azureml.core.model import Model
umap_model = Model.get_model_path(model_name=UMAP_MODEL_NAME)
umap_model = joblib.load(umap_model)

Error Stack:

2022-04-01 09:03:23,178 | root | ERROR | User's init function failed
2022-04-01 09:03:23,181 | root | ERROR | Encountered Exception Traceback (most recent call last):
File "/var/azureml-server/aml_blueprint.py", line 217, in register
main.init()
File "/var/azureml-app/main.py", line 35, in init
driver_module.init()
File "/structure/azureml-app/code/predict.py", line 184, in init
umap_model = joblib.load(umap_model)
File "/azureml-envs/azureml_b1cb60a1e5e920a67cefb22f8b19cd0b/lib/python3.8/site-packages/joblib/numpy_pickle.py", line 585, in load
obj = _unpickle(fobj, filename, mmap_mode)
File "/azureml-envs/azureml_b1cb60a1e5e920a67cefb22f8b19cd0b/lib/python3.8/site-packages/joblib/numpy_pickle.py", line 504, in _unpickle
obj = unpickler.load()
File "/azureml-envs/azureml_b1cb60a1e5e920a67cefb22f8b19cd0b/lib/python3.8/pickle.py", line 1212, in load
dispatch[key[0]](self)
File "/azureml-envs/azureml_b1cb60a1e5e920a67cefb22f8b19cd0b/lib/python3.8/site-packages/joblib/numpy_pickle.py", line 329, in load_build
Unpickler.load_build(self)
File "/azureml-envs/azureml_b1cb60a1e5e920a67cefb22f8b19cd0b/lib/python3.8/pickle.py", line 1705, in load_build
setstate(state)
File "/azureml-envs/azureml_b1cb60a1e5e920a67cefb22f8b19cd0b/lib/python3.8/site-packages/pynndescent/pynndescent_.py", line 938, in __setstate__
self._init_search_function()
File "/azureml-envs/azureml_b1cb60a1e5e920a67cefb22f8b19cd0b/lib/python3.8/site-packages/pynndescent/pynndescent_.py", line 1189, in _init_search_function
parallel_search = self.parallel_batch_queries
AttributeError: 'NNDescent' object has no attribute 'parallel_batch_queries'

Packages used:
channels:
- anaconda
- conda-forge
dependencies:
- python=3.8.12
- pip:
- pandas==1.2.4
- numpy==1.22.0
- numba==0.53.*
- azureml-defaults~=1.34.0
- beautifulsoup4==4.10.0
- hdbscan==0.8.27
- joblib==1.0.1
- git+https://github.com/casics/nostril.git
- scikit_learn==1.0.2
- tensorflow==2.6.0
- keras==2.6.0
- transformers==4.12.5
- umap==0.1.1
- umap_learn==0.5.1
- Jinja2==2.10.1
- Flask==1.1.1
- MarkupSafe==1.1.1
- itsdangerous==2.0.1

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with pynndescent_.py, especially NNDescent.__setstate__ and _init_search_function, then inspect how joblib.load restores the object across the listed Python and package versions. Reproduce the AzureML model-loading path and compare the serialized model's environment with the deployment environment; done means the saved NNDescent model loads without the reported AttributeError.

Written by the indexing model from the issue text.

Assessment

Tech stack
azure, python
Domain
machine-learning
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.