Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Numba caching prevents definition of new functions #17

Open
DavidLP opened this issue Aug 22, 2023 · 3 comments
Open

Numba caching prevents definition of new functions #17

DavidLP opened this issue Aug 22, 2023 · 3 comments
Assignees
Labels

Comments

@DavidLP
Copy link
Collaborator

DavidLP commented Aug 22, 2023

One cannot define new end_of_custer or end_of_event functions, when the interface data stay the same. The reason is, that caching is activated for: https://github.com/SiLab-Bonn/pixel_clusterizer/blob/master/pixel_clusterizer/cluster_functions.py#L167

There is no simple way to remove exisiting caches: https://stackoverflow.com/questions/44131691/how-to-clear-cache-or-force-recompilation-in-numba

Solutions: Clear cache manually when set_end_of_cluster_function or set_end_of_event_function are called

@YannickDieter
Copy link

YannickDieter commented Aug 22, 2023

Thanks for pointing this out! :) I think this is exactly what we observed a few times already @cbespin, no?

@cbespin
Copy link

cbespin commented Aug 22, 2023

Yes, I found no other way than clearing the cache manually. IIRC, it is the __pycache__ folder in the numba installation directory, not the one from pixel_clusterizer. That should be checked a second time before this remains the current solution.

@DavidLP
Copy link
Collaborator Author

DavidLP commented Aug 30, 2023

Ahh yes. I was already wondering where the cache folder is. It was not the one where the script is. At least not when using Windows.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants