facebookresearch / facebookresearch/SlowFast

Import Error for slowfast/datasets/multigrid_helper.py

Open
#734 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
7.4k
Forks
1.3k
PR merge metrics
No merged PRs in 30d

Description

**To Reproduce**
* Follow instructions in INSTALL.md.
* Run `tools/run_net.py` following GETTING_STARTED.md
* Then, error below is raised.
```bash
Traceback (most recent call last):
File "/home/eraser/projects/SlowFast/tools/run_net.py", line 9, in
from test_net import test
File "/home/eraser/projects/SlowFast/tools/test_net.py", line 17, in
from slowfast.datasets import loader
File "/home/eraser/projects/SlowFast/slowfast/datasets/loader.py", line 13, in
from slowfast.datasets.multigrid_helper import ShortCycleBatchSampler
File "/home/eraser/projects/SlowFast/slowfast/datasets/multigrid_helper.py", line 16, in
from torch._six import int_classes as _int_classes
ModuleNotFoundError: No module named 'torch._six'
```

**Reason for the error**
* The `six` module has been removed from PyTorch >= 2.0.0
* The version statement in slowfast/datasets/multigrid_helper.py only works with PyTorch versions whose major version is 1.
* The version check statement requires updates for PyTorch 2.x or later.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.