lmcinnes / lmcinnes/umap

EOFError by loading umap model

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

Nobody has claimed this yet.

Dominant language
Python
Stars
8.3k
Forks
871
Avg merge
1d 13h
Merged PRs (30d)
5

Description

I have created a umap model and saved it via joblib. Then I try to load the model on another PC but with the same environment. My memory is 50% full. Is it not possible to save an umap model with joblib?

```
umap_model_plot = umap.UMAP(n_neighbors=15,
n_components=2,
metric='cosine').fit(emb)

joblib.dump(umap_model_plot,'umap_2.sav')
```

Load model

```

joblib.load('umap_2.sav')
Traceback (most recent call last):

File "", line 1, in
joblib.load('umap_2.sav')

File "C:\Users\Paul\AppData\Roaming\Python\Python37\site-packages\joblib\numpy_pickle.py", line 585, in load
obj = _unpickle(fobj, filename, mmap_mode)

File "C:\Users\Paul\AppData\Roaming\Python\Python37\site-packages\joblib\numpy_pickle.py", line 504, in _unpickle
obj = unpickler.load()

File "C:\Users\Paul\Anaconda3\envs\top2vec_final\lib\pickle.py", line 1086, in load
raise EOFError

EOFError
```

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 by reproducing the shown umap.UMAP, joblib.dump, and joblib.load sequence in the reported Python 3.7 environments, then inspect how the saved file is created and read. Done means identifying a reproducible cause for the EOFError and documenting or validating a supported loading path.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
machine-learning
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.