Replies: 2 comments 3 replies
-
Sorry for the late reply @awni . What would it mean to pickle a While that can probably be serialized to a file, I don't see how unserializing it would produce a meaningful result. |
Beta Was this translation helpful? Give feedback.
-
I'm carrying a local patch that lets nb_funcs (and methods) be pickled. It's not difficult if you pickle them like Python functions are pickled, i.e., by their name rather than by their contents.
Not sure if this is considered worthwhile upstream but I'd be happy to submit a PR if so. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Just curious on how possible to have support for this or to extend
nb_func
to allow it to be pickled?This comes up in MLX since compiled functions are
nb_func
. And sometimes it's convenient for a Python class to hold a function as an attribute. We can work around it by wrapping stuff in user defined Python classes.. but it's inconvenient and confusing for users who do not know about this.Beta Was this translation helpful? Give feedback.
All reactions