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

classy-vision==0.5.0 is incompatible with torch==1.9.0 #749

Closed
d4l3k opened this issue Jun 22, 2021 · 2 comments
Closed

classy-vision==0.5.0 is incompatible with torch==1.9.0 #749

d4l3k opened this issue Jun 22, 2021 · 2 comments

Comments

@d4l3k
Copy link

d4l3k commented Jun 22, 2021

🐛 Bug

classy-vision latest release is incompatible with the latest version of torch due to a dependency on torch._six which has since been removed.

To Reproduce

Steps to reproduce the behavior:

$ virtualenv -p ~/.pyenv/versions/3.9.5/bin/python3 ~/venvs/classy_incompatible
$ source ~/venvs/classy_incompatible/bin/activate.fish
$ pip install classy_vision torch
$ python
Python 3.9.5 (default, Jun  7 2021, 12:00:52) 
[GCC 11.1.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> from classy_vision.dataset.classy_dataset import ClassyDataset
/home/tristanr/venvs/classy_incompatible/lib/python3.9/site-packages/torchvision/transforms/_functional_video.py:5: UserWarning: The _functional_video module is deprecated. Please use the functional module instead.
  warnings.warn(
/home/tristanr/venvs/classy_incompatible/lib/python3.9/site-packages/torchvision/transforms/_transforms_video.py:25: UserWarning: The _transforms_video module is deprecated. Please use the transforms module instead.
  warnings.warn(
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/tristanr/venvs/classy_incompatible/lib/python3.9/site-packages/classy_vision/dataset/__init__.py", line 11, in <module>
    from .classy_dataset import ClassyDataset
  File "/home/tristanr/venvs/classy_incompatible/lib/python3.9/site-packages/classy_vision/dataset/classy_dataset.py", line 9, in <module>
    from classy_vision.dataset.transforms import ClassyTransform
  File "/home/tristanr/venvs/classy_incompatible/lib/python3.9/site-packages/classy_vision/dataset/transforms/__init__.py", line 109, in <module>
    import_all_modules(FILE_ROOT, "classy_vision.dataset.transforms")
  File "/home/tristanr/venvs/classy_incompatible/lib/python3.9/site-packages/classy_vision/generic/registry_utils.py", line 20, in import_all_modules
    importlib.import_module(module_name)
  File "/home/tristanr/.pyenv/versions/3.9.5/lib/python3.9/importlib/__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "/home/tristanr/venvs/classy_incompatible/lib/python3.9/site-packages/classy_vision/dataset/transforms/mixup.py", line 10, in <module>
    from classy_vision.generic.util import convert_to_one_hot
  File "/home/tristanr/venvs/classy_incompatible/lib/python3.9/site-packages/classy_vision/generic/util.py", line 21, in <module>
    from torch._six import container_abcs
ImportError: cannot import name 'container_abcs' from 'torch._six' (/home/tristanr/venvs/classy_incompatible/lib/python3.9/site-packages/torch/_six.py)

Looks like this is already fixed in trunk but a new version needs to be released.

853fc0e#diff-cab22f51781936a2fc34e3d44ba1a2227babc98667a9d3f89e08317db2710a1f

Impact

This is causing our tests to fail in https://github.com/pytorch/torchx/pull/83/checks?check_run_id=2889571824

@d4l3k
Copy link
Author

d4l3k commented Jul 12, 2021

There's a new 0.6.0 release which appears to be compatible with torch==1.9.0, testing now https://pypi.org/project/classy-vision/#history

facebook-github-bot pushed a commit to pytorch/torchx that referenced this issue Jul 12, 2021
Summary:
classy-visoin has a new version that should be compatible with the latest version of torch facebookresearch/ClassyVision#749

Pull Request resolved: #98

Test Plan: CI

Reviewed By: kiukchung

Differential Revision: D29666299

Pulled By: d4l3k

fbshipit-source-id: c1e2f94e05230299c23c8744025537b7616cbdc8
@d4l3k
Copy link
Author

d4l3k commented Jul 12, 2021

passing for torchx

@d4l3k d4l3k closed this as completed Jul 12, 2021
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

1 participant