cloudpickle
problems
cloudpickle | problems | |
---|---|---|
5 | 2 | |
1,584 | 18 | |
1.6% | - | |
6.0 | 6.8 | |
about 1 month ago | 7 months ago | |
Python | ||
GNU General Public License v3.0 or later | - |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
cloudpickle
-
No-GIL mode coming for Python
I believe you just pass objects instead, like you would in OOP, and take the hit of pickling and unpickling them every time.
If you really want to pass lambdas, you can use a third party library to pickle them
https://github.com/cloudpipe/cloudpickle
Yes, this is not great.
-
Is it possible pickle a function with its dependencies?
That was my understanding as well but then I found this package -- cloudpickle which seems to serialize both data and functionality?
- Issue with sklearn
-
I'm learning monads by implementing IO in different languages
It used in production for several months now. We use it to train data science models. The main goal was to make multiprocessing code easier. It actually works great with multiprocessing, especially if you use a library able to serialize lambda functions such as https://github.com/cloudpipe/cloudpickle . I have yet to write a tutorial on how to use multiprocessing and cloudpickle to distribute work to all the worker processes. Thanks for letting me know about pfun. I've never heard of it. Having a look at its documentation, our goals seem to be very close. The features I wanted above all where:
problems
-
No-GIL mode coming for Python
> Does that stay true once the GIL turns back on?
In the current nogil implementation, AFAICS, it seems the GIL can't be turned back on so there is no answer yet.
Theoretically, you could have a one-off operation which fixes all objects when the GIL is turned on. However, there's no way to get all objects in Python. gc.get_objects() only returns tracked objects, and there is no way to list untracked objects.
It seems, three fields are exposed on every CPython object in the stable ABI, any change which affects their offsets will break the stable ABI. https://github.com/capi-workgroup/problems/issues/4#issuecom...
> I'm not following why this affects ABI compatibility, sorry.
True, PyType_FromSpec can set tp_alloc to a wrapper function which papers over the difference in what the "allocfunc" should initialise the memory to.
Re performance - merging the change is the only way people will actually start targeting nogil.
-
Just `PyTuple_Pack` or also `PyTuple_New` and `PyTuple_SetItem`?
PyTuple_New creates a tuple of the given length, each element must be initialized with PyTuple_SetItem. Therefore the tuple remains half-baked until all the elements are initialized, which is not good (see https://github.com/capi-workgroup/problems/issues/56).
What are some alternatives?
extrainterpreters - Utilities for using Python's PEP 554 subinterpreters
pex - A tool for generating .pex (Python EXecutable) files, lock files and venvs.
pants - The Pants Build System
raffiot.py - Robust And Fast Functional IO Toolkit
scala-cli - Scala CLI is a command-line tool to interact with the Scala language. It lets you compile, run, test, and package your Scala code (and more!)
nix - Nix, the purely functional package manager