TXH-mercury / VAST

Code and Model for VAST: A Vision-Audio-Subtitle-Text Omni-Modality Foundation Model and Dataset
https://arxiv.org/abs/2305.18500
MIT License
243 stars 17 forks source link

Error while captioning using single processor #6

Open Shrad1234 opened 9 months ago

Shrad1234 commented 9 months ago

hi I got the following error while trying to run the code on a set of videos Traceback (most recent call last): File "/media/administrator/1b402ff7-f596-4523-a6fd-4ccdd4432680/ego4d/VAST/./run.py", line 65, in main() File "/media/administrator/1b402ff7-f596-4523-a6fd-4ccdd4432680/ego4d/VAST/./run.py", line 58, in main test(model, val_loaders, args.run_cfg) File "/media/administrator/1b402ff7-f596-4523-a6fd-4ccdd4432680/ego4d/VAST/utils/pipeline.py", line 156, in test eval_log = evaluate_fn(model, test_loader, run_cfg, global_step=0) File "/media/administrator/1b402ff7-f596-4523-a6fd-4ccdd4432680/ego4d/VAST/evaluation/evaluation_mm.py", line 25, in evaluate_mm val_log = evaluate_single(model, loader, task.split('--')[0], run_cfg, global_step,task.split('--')[1]) File "/media/administrator/1b402ff7-f596-4523-a6fd-4ccdd4432680/MIST/envs/vast/lib/python3.9/site-packages/torch/utils/_contextlib.py", line 115, in decorate_context return func(*args, *kwargs) File "/media/administrator/1b402ff7-f596-4523-a6fd-4ccdd4432680/ego4d/VAST/evaluation/evaluation_mm.py", line 46, in evaluate_single cap_dict = evaluate_cap(model, task, val_loader, run_cfg, global_step, dset_name) File "/media/administrator/1b402ff7-f596-4523-a6fd-4ccdd4432680/MIST/envs/vast/lib/python3.9/site-packages/torch/utils/_contextlib.py", line 115, in decorate_context return func(args, **kwargs) File "/media/administrator/1b402ff7-f596-4523-a6fd-4ccdd4432680/ego4d/VAST/evaluation/evaluation_mm.py", line 130, in evaluate_cap for batch in eval_loader: File "/media/administrator/1b402ff7-f596-4523-a6fd-4ccdd4432680/ego4d/VAST/data/loader.py", line 103, in iter self.preload(loader_it) File "/media/administrator/1b402ff7-f596-4523-a6fd-4ccdd4432680/ego4d/VAST/data/loader.py", line 116, in preload self.batch = next(it) File "/media/administrator/1b402ff7-f596-4523-a6fd-4ccdd4432680/MIST/envs/vast/lib/python3.9/site-packages/torch/utils/data/dataloader.py", line 633, in next data = self._next_data() File "/media/administrator/1b402ff7-f596-4523-a6fd-4ccdd4432680/MIST/envs/vast/lib/python3.9/site-packages/torch/utils/data/dataloader.py", line 677, in _next_data data = self._dataset_fetcher.fetch(index) # may raise StopIteration File "/media/administrator/1b402ff7-f596-4523-a6fd-4ccdd4432680/MIST/envs/vast/lib/python3.9/site-packages/torch/utils/data/_utils/fetch.py", line 51, in fetch data = [self.dataset[idx] for idx in possibly_batched_index] File "/media/administrator/1b402ff7-f596-4523-a6fd-4ccdd4432680/MIST/envs/vast/lib/python3.9/site-packages/torch/utils/data/_utils/fetch.py", line 51, in data = [self.dataset[idx] for idx in possibly_batched_index] File "/media/administrator/1b402ff7-f596-4523-a6fd-4ccdd4432680/ego4d/VAST/data/IndexAnno.py", line 68, in getitem raw_captions = anno['desc'] if 'desc' in anno else anno['caption'] KeyError: 'caption'

On detailed verification of the code I go to know that the batch is not getting created by the data loader while running it on single gpu mode.Basically it is getting one loader in prefetched loader and not going futher . Can anyone please help me in solving this issue?