lmcinnes / lmcinnes/umap

TypeError: can't pickle weakref objects

Open
#746 6 comments 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 ran UMAP with
umap_model = umap.UMAP(n_neighbors=15,n_components=5, low_memory=False, random_state=42).fit(df)
and it works, but when run
joblib.dump(umap_model, 'test.sav')
or
umap_model.transform(df1)
get errors: TypeError: can't pickle weakref objects

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 reported UMAP fit with n_neighbors=15, n_components=5, low_memory=False, and random_state=42, then try joblib.dump(umap_model, 'test.sav') and umap_model.transform(df1). Use the resulting traceback to locate the failing component; done means both serialization and transformation work without the weakref TypeError.

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
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.