Skip to content

Ray fails to serialize Torch tensor. #955

@robertnishihara

Description

@robertnishihara

I'm running into problems serializing pytorch tensors.

import ray
import torch

ray.init()

x = torch.Tensor(10)

x_id = ray.put(x)

result = ray.get(x_id)

Inspecting the values shows that x and result are different.

>>> x
 0.0000e+00
-8.5899e+09
 0.0000e+00
-8.5899e+09
 5.6052e-45
 1.4714e-43
 1.5975e-43
 1.4153e-43
 1.3873e-43
 1.6255e-43
[torch.FloatTensor of size 10]

>>> result
[torch.FloatTensor with no dimension]

>>> result[0]
RuntimeError: dimension 1 out of range of 0D tensor at /Users/soumith/code/builder/wheel/pytorch-src/torch/lib/TH/generic/THTensor.c:24

cc @vitchyr

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething that is supposed to be working; but isn't

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions