Using Memory and Parallel with cached function defined inside Jupyter notebook results in not using the cache
See original GitHub issueI’m running a Jupyter notebook on a machine with multiple cores. I’m trying to use both caching of intermediate results and parallelism for this. I get a lot of:
python3.7/site-packages/joblib/parallel.py:256: JobLibCollisionWarning: Cannot detect name collisions for function 'cached_two' for func, args, kwargs in self.items]
I believe these are not appearing when I just run single threade or not in a notebook. Sample code below to run in jupyter notebook. joblib 0.14.1 notebook 6.0.3
Issue Analytics
- State:
- Created 3 years ago
- Reactions:1
- Comments:8 (5 by maintainers)
Top Results From Across the Web
Checkpoint using joblib.Memory and joblib.Parallel
This example illustrates how to cache intermediate computing results using joblib.Memory within joblib.Parallel . Embed caching within parallel processing¶. It ...
Read more >IPython: turn off %timeit message about "This could mean that ...
Since upgrading to IPython version 3 (I have 3.1.0), every time I use the %timeit command, it prints "The slowest run took [number]...
Read more >Execute and cache your pages - Jupyter Book
Jupyter Book can automatically run and cache any notebook pages. Notebooks can either be run each time the documentation is built, or cached...
Read more >Using joblib to speed up your Python pipelines
Now, let's use joblib's Memory function with a location defined to store a ... I have shown how Parallel jobs can be run...
Read more >joblib Documentation - Read the Docs
caching methods: memory is designed for pure functions and it is not recommended to use it for methods. If one wants to use...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I was having the same problem in #1069. Moving the functions to a python file as @lesteve suggested worked. Just wanted to report it.
Thank you very much for the report @dsevero and @jontis. I’m going to work on a fix for this.