Cudf: [BUG] cannot move a cudf series to a torch tensor

Created on 20 Mar 2020  路  4Comments  路  Source: rapidsai/cudf

Describe the bug
A clear and concise description of what the bug is.

t = torch.tensor(cudf.Series(1, 2, 3))

triggers this error

TypeError Traceback (most recent call last)
in
----> 1 t = torch.tensor(cudf.Series(1, 2, 3))

TypeError: the read only flag is not supported, should always be False

Steps/Code to reproduce bug
Follow this guide http://matthewrocklin.com/blog/work/2018/02/28/minimal-bug-reports to craft a minimal bug report. This helps us reproduce the issue you're having and resolve the issue more quickly.

Run the above command with pytorch 1.3.1 and cudf 0.11

Expected behavior
A clear and concise description of what you expected to happen.

no error and tensor created.

Environment overview (please complete the following information)

  • Environment location: [Bare-metal, Docker, Cloud(specify cloud provider)]

Datascience Worksation Z*, running in preinstalled nvidia-dsd-2.0.0 conda environment.

  • Method of cuDF install: [conda, Docker, or from source]

preinstalled on the lachine by nvidia.

  • If method of install is [Docker], provide docker pull & docker run commands used

Environment details
Please run and paste the output of the cudf/print_env.sh script here, to gather any other relevant environment details

I don't know where cudf files are. Script not in path.

Additional context
Add any other context about the problem here.

bug cuDF (Python)

All 4 comments

@jfpuget I'm not sure what we should do on the cuDF side to properly support this. When we're giving you the data, it's absolutely not read only so we really shouldn't artificially mark it as so, especially when we have features in Numba / CuPy modifying the data inplace in other situations.

Have you raised an issue against PyTorch regarding this behavior that I could read more about?

@kkraus14 ??

The error is because the data is marked as read only, not the reverse.

I filled this bug report because RAPIDS dev team told me to do so.

I misread the bug report and I apologize. I asked you to file this issue because we want information like this disseminated publicly so others can learn as well.

We'll tackle this in 0.14.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

ayushdg picture ayushdg  路  3Comments

c-jamie picture c-jamie  路  3Comments

jmkim picture jmkim  路  3Comments

randerzander picture randerzander  路  3Comments

jrhemstad picture jrhemstad  路  3Comments