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

Download the dataset if it is missing #8366

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

ahmadsharif1
Copy link
Contributor

Without this change, if you run the example without data, it fails with this message:

python train.py --data-path=/data/users/ahmads/kinectics400 --kinetics-version="400" --batch-size=8 --cache-dataset
Not using distributed mode
Namespace(data_path='/data/users/ahmads/kinectics400', kinetics_version='400', model='r2plus1d_18', device='cuda', clip_len=16, frame_rate=15, clips_per_video=5, batch_size=8, epochs=45, workers=10, lr=0.64, momentum=0.9, weight_decay=0.0001, lr_milestones=[20, 30, 40], lr_gamma=0.1, lr_warmup_epochs=10, lr_warmup_method='linear', lr_warmup_decay=0.001, print_freq=10, output_dir='.', resume='', start_epoch=0, cache_dataset=True, sync_bn=False, test_only=False, use_deterministic_algorithms=False, world_size=1, dist_url='env://', val_resize_size=(128, 171), val_crop_size=(112, 112), train_resize_size=(128, 171), train_crop_size=(112, 112), weights=None, amp=False, distributed=False)
Loading data
Loading training data
Traceback (most recent call last):
  File "/data/users/ahmads/condahome/datasets/vision/references/video_classification/train.py", line 446, in <module>
    main(args)
  File "/data/users/ahmads/condahome/datasets/vision/references/video_classification/train.py", line 172, in main
    dataset = datasets.KineticsWithVideoId(
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/ahmads/.conda/envs/datasets/lib/python3.12/site-packages/torchvision-0.19.0a0+2c4665f-py3.12-linux-x86_64.egg/torchvision/datasets/kinetics.py", line 139, in __init__
    self.classes, class_to_idx = find_classes(self.split_folder)
                                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/ahmads/.conda/envs/datasets/lib/python3.12/site-packages/torchvision-0.19.0a0+2c4665f-py3.12-linux-x86_64.egg/torchvision/datasets/folder.py", line 41, in find_classes
    classes = sorted(entry.name for entry in os.scandir(directory) if entry.is_dir())
                                             ^^^^^^^^^^^^^^^^^^^^^
FileNotFoundError: [Errno 2] No such file or directory: '/data/users/ahmads/kinectics400/train'

With this change, it starts to download the data if it is missing.

Copy link

pytorch-bot bot commented Apr 2, 2024

🔗 Helpful Links

🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/vision/8366

Note: Links to docs will display an error until the docs builds have been completed.

❌ 1 New Failure

As of commit b82e7b1 with merge base 2c4665f (image):

NEW FAILURE - The following job has failed:

  • Lint / python-types / linux-job (gh)
    RuntimeError: Command docker exec -t be6b9415345633111dab75b6843a723050d82d3a28e032303065286dac08316c /exec failed with exit code 1

This comment was automatically generated by Dr. CI and updates every 15 minutes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants