TypeError: can't pickle weakref objects
Open
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
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- 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