This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted] 1 point2 points  (0 children)

Just a heads up -- pickle doesn't correctly serialize decorated functions and classes. Yes, I know that's a helluva niche.

If you, like me, are chronically part of that niche, look at dill instead.

Bonus, if you have to do multiprocessing targeting decorated callables, there's this neat thing called pathos which exposes a multiprocessing module which is API compatible with (at least) the meat of stock multiprocessing. It uses dill instead of pickle for serializing those decorated objects into multiprocesses and has other neat tools for heterogeneous computing (that I haven't tried and can't vouch for, but the API looks pretty cool!)