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

I am using the torchvision-0.13.1+cu113 version, but it seems that it does not have the datapoints package. How can I solve this issue? #8714

Closed
jiangsu415 opened this issue Nov 4, 2024 · 5 comments

Comments

@jiangsu415
Copy link

🐛 Describe the bug

I am using the torchvision-0.13.1+cu113 version, but it seems that it does not have the datapoints package. How can I solve this issue?

Versions

I am using the torchvision-0.13.1+cu113 version, but it seems that it does not have the datapoints package. How can I solve this issue?

@janeyx99 janeyx99 transferred this issue from pytorch/pytorch Nov 6, 2024
@NicolasHug
Copy link
Member

Hi @jiangsu415 , datapoints were renamed into tv_tensors a while ago. I encourage you start here: https://pytorch.org/vision/stable/auto_examples/transforms/plot_transforms_getting_started.html#sphx-glr-auto-examples-transforms-plot-transforms-getting-started-py

You are probably looking at some old documentation / tutorial ? May I ask which one (it needs to be updated!) ?

@abhi-glitchhg
Copy link
Contributor

@jiangsu415 torchvision-0.13.1 doesn't have a datapoints module because the datapoints module was introduced in torchvision 0.15.

You might want to upgrade your environment to 0.15 if you want to use the datapoints module.

Also as Nicolas mentioned, in the later versions it was renamed, so you might want to look at the tv_tensors instead of datapoints.

@eliethesaiyan
Copy link

@abhi-glitchhg , @NicolasHug , @jiangsu415
I have version 0.20.1 , but i get the same problem.

0.20.1
Traceback (most recent call last):
  File "/home/elie/gitclones/zcrop/utils.py", line 11, in <module>
    from torchvision import datapoints
ImportError: cannot import name 'datapoints' from 'torchvision' (/home/dude/miniforge3/envs/test/lib/python3.12/site-packages/torchvision/__init__.py)

did anything changes?
When i check also the documentations. 0.20 does not have any documentation about datapoints module

@abhi-glitchhg
Copy link
Contributor

abhi-glitchhg commented Dec 11, 2024

Yes,

Refer to Nicolas' comments above.

#8714 (comment)

If you are using 0.20, you should use tv_tensors as datapoints was renamed to tv_tensors.

@NicolasHug
Copy link
Member

I'll close this issue as the original problem has been addressed. @eliethesaiyan , can I ask which resource you used that mentioned datapoints?

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

No branches or pull requests

4 participants