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

Import Errors in Datasets Class #44

Open
Ian-VA opened this issue Dec 27, 2022 · 1 comment
Open

Import Errors in Datasets Class #44

Ian-VA opened this issue Dec 27, 2022 · 1 comment

Comments

@Ian-VA
Copy link

Ian-VA commented Dec 27, 2022

Hi,

When using the latest version of medicaltorch (or at least, the one installed by pip), importing the datasets class into the program raises the following error:

from torch._six import string_classes, int_classes                                   
ImportError: cannot import name 'int_classes' from 'torch._six'

I've found that this can be fixed by removing int_classes in the following line in datasets.py:

from torch._six import string_classes, int_classes

and, instead, declaring int_classes = int.

@tzuifurther
Copy link

tzuifurther commented Aug 15, 2023

In Pytorch 2.0 stable removes the _six, please see this and apex has some function to check the pytorch version this

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

2 participants