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

numpy datetime64 and timedelta64 not serialized correctly #1041

Closed
salsasepp opened this issue Sep 30, 2017 · 3 comments
Closed

numpy datetime64 and timedelta64 not serialized correctly #1041

salsasepp opened this issue Sep 30, 2017 · 3 comments
Labels
bug Something that is supposed to be working; but isn't

Comments

@salsasepp
Copy link

salsasepp commented Sep 30, 2017

I suspect a bug (or missing feature) in serialization. This reproduces the issue with ray 0.2.0:

import ray
import numpy as np
import datetime

ray.init()

t = np.datetime64(datetime.datetime.now())
print(type(t), t)

t1 = ray.get(ray.put(t))
print(type(t1), t1)

which prints

<class 'numpy.datetime64'> 2017-09-30T14:23:58.356175
<class 'int'> 0

The same applies to np.timedelta64.

Side note: When serializing datetime.datetime objects, ray outputs this warning:
WARNING: Falling back to serializing objects of type <class 'datetime.datetime'> by using pickle. This may be inefficient.
This has prompted me to use numpy.datetime64 in the first place, which apparently does not work.

@salsasepp salsasepp changed the title numpy datetime64 not serialized correctly numpy datetime64 and timedelta64 not serialized correctly Sep 30, 2017
@robertnishihara robertnishihara added the bug Something that is supposed to be working; but isn't label Sep 30, 2017
@robertnishihara
Copy link
Collaborator

Thanks for bringing this up! I just filed an issue with Arrow. See https://issues.apache.org/jira/browse/ARROW-1628.

@robertnishihara
Copy link
Collaborator

@edoakes
Copy link
Contributor

edoakes commented Jan 23, 2020

Fixed now that we're using pickle.

@edoakes edoakes closed this as completed Jan 23, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something that is supposed to be working; but isn't
Projects
None yet
Development

No branches or pull requests

3 participants