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

fix: support serialization with pickle #42

Closed
2 tasks
jvdd opened this issue Apr 14, 2023 · 0 comments · Fixed by #44
Closed
2 tasks

fix: support serialization with pickle #42

jvdd opened this issue Apr 14, 2023 · 0 comments · Fixed by #44
Assignees

Comments

@jvdd
Copy link
Member

jvdd commented Apr 14, 2023

Currently none of the Rust downsamplers can be serialized with pickle as pickle throws a TypError when serializing a module

  • add support for pickle
  • add tests for this

Minimal code example ⬇️

In [1]: from tsdownsample import MinMaxDownsampler

In [2]: d = MinMaxDownsampler()

In [3]: import pickle

In [4]: pickle.dump(d, open('test.pkl', 'wb'))
---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)
Cell In[4], line 1
----> 1 pickle.dump(d, open('test.pkl', 'wb'))

TypeError: cannot pickle 'module' object

Related: PR #34 added support + tests for deepcopy

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

Successfully merging a pull request may close this issue.

2 participants