Comments (5)
@hyiltiz: A generator
is dependent on a frame
object, so it's difficult. It can be done, but I believe requires C code.
from dill.
python has done just exactly this, starting with python3.4
from dill.
Also, less obvious is how to pickle a generator. It "can't be done" with ctypes
, last time I checked. However, some good notes/links are here: http://stackoverflow.com/questions/7180212/why-cant-generators-be-pickled/7180424#7180424
from dill.
also, itertools.islice
is useful for dumping the first "X" values, so the last known position is restored
from dill.
I noticed that generator
can't be dill
ed according to the docs. Is there any plans to support it, or it is something fundamentally imposisble to implement? Intuitively, it should be much easier to implement than frame
s or traceback
s, since lambdas can be dill
ed already.
from dill.
Related Issues (20)
- UnpicklingError using dill but not stdlib pickle HOT 2
- Compatibility with Pyodide HOT 6
- tfp.math.psd_kernels.ExponentiatedQuadratic no longer serialiases with latest versions
- `dill.load_session()` raises `NameError: name 'UnpicklingError' is not defined` HOT 5
- pydantic>=2.5 classes can't be serialized HOT 4
- Failure to load dumped partial function (in older python) properly (in newer python)
- threading.Thread fails to pickle in python > 3.13.0a5 HOT 9
- Error with typing.AbstractContextManager in Python 3.8 and newer dill versions (>=0.3.6) HOT 1
- File gets truncated upon unpickling HOT 3
- PyTorch C++-generated module "not found as" itself? HOT 1
- Importing dill changes the python pickler behavior HOT 8
- Recursive self-references that trigger a RecursionError
- Attempting to `dill` a function defined in a `doctest` run with `pytest` causes a `TypeError: cannot pickle 'EncodedFile' object`.
- NumPy 2.0.0 test regression: `test_diff.py`: `RecursionError: maximum recursion depth exceeded` HOT 3
- Python 3.13.0b3: `test_detect.py`: `assert len(s) is len(a)` fails HOT 2
- TypeError: 'bytes' object cannot be interpreted as an integer HOT 4
- How to save class definitions from imported modules?
- Does dill have the `register_pickle_by_value` cloudpickle equivalent ?
- Inconsistent serialization behavior between method of imported class and class created in jupyter notebook? HOT 2
- getsource yields python scalars for numpy scalars
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from dill.