cache=True & generators?
See original GitHub issuereproducing code:
import numba
import numpy as np
@numba.njit(cache=True)
def _thisfunc(vals):
for v in vals:
yield v
# calling code:
_thisfunc(np.random.rand(500))
results in:
C:\Anaconda3\lib\site-packages\numba\caching.py in _dump(self, obj)
563
564 def _dump(self, obj):
--> 565 return pickle.dumps(obj, protocol=-1)
566
567 @contextlib.contextmanager
PicklingError: Can't pickle <function _thisfunc at 0x0000014AF82B4D08>: it's not the same object as __main__._thisfunc
but with cache=False
the function works. Is there any workaround for this?
Issue Analytics
- State:
- Created 5 years ago
- Reactions:1
- Comments:10 (7 by maintainers)
Top Results From Across the Web
Prebuilt Generators | Fig
Adds more control over the suggested files and folders allowing to filter them or perform fast edits to the generated suggestions. Example: filter...
Read more >Jawr Generators
This generator generates javascript code with locale specific variants which are loaded depending on the user's specific language. Full documentation is here.
Read more >10.5 rmarkdown's site generator | R Markdown - Bookdown
A main restriction of this site generator is that it assumes all Rmd documents ... To enable caching for an entire document, add...
Read more >Using the generator for cache renewal
Using the generator for cache renewal - Sitemap Generator Forum. ... the generator to set a session variable ($_SESSION['cache] = true), ...
Read more >Cache - webpack
... build speed. cache is set to type: 'memory' in development mode and disabled in production mode. cache: true is an alias to...
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 Free
Top 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
@sklam fixed in #7957, support will be in Numba 0.56.
@mtazzari thank you for asking about this, I just double checked on current master and the issue still persists. There is currently no timescale or ETA for this being fixed.