Always raise OSERROR when pretraining with Imagnet #533
Unanswered
Frog-vegetable
asked this question in
Q&A
Replies: 1 comment
-
我已解决这个问题,感谢openmmlab的说明书!是数据集的标注出现了问题! |
Beta Was this translation helpful? Give feedback.
0 replies
# for free
to join this conversation on GitHub.
Already have an account?
# to comment
-
On Linux. My workers_per_gpu is set to 1. When I adjust the batch_size to ensure that the memory can run properly, the following error occurs when I run the memory to checkpoint.
在Linux系统下,我的workers_per_gpu设置为1。当我调整好batch_size,保证内存可以运行后,每当运行到设置的checkpoint时就会报如下错误。
OSError: Caught OSError in DataLoader worker process 0. Original Traceback (most recent call last):
When I set workers_per_gpu to 0 as instructed by Baidu, I get an error that the parameter is greater than 1.
当我按照百度到的方法将workers_per_gpu设置为0时,会报错要求该参数大于1.
Looking forward to your reply!期待您的回复!
Here is the complete error,下面是完整的报错。
2023-05-08 10:17:50,084 - mmcls - INFO - Iter [1000/15000] lr: 4.667e-01, eta: 0:55:37, time: 0.247, data_time: 0.097, memory: 3286, loss: 6.9194 [ ] 0/1, elapsed: 0s, ETA:Traceback (most recent call last): File "./tools/mmcls/train_mmcls.py", line 204, in <module> main() File "./tools/mmcls/train_mmcls.py", line 200, in main meta=meta) File "/home/froggy/mmrazor/mmrazor/apis/mmcls/train.py", line 218, in train_mmcls_model runner.run(data_loaders, cfg.workflow) File "/home/froggy/anaconda3/envs/openmmlab2/lib/python3.7/site-packages/mmcv/runner/iter_based_runner.py", line 144, in run iter_runner(iter_loaders[i], **kwargs) File "/home/froggy/anaconda3/envs/openmmlab2/lib/python3.7/site-packages/mmcv/runner/iter_based_runner.py", line 70, in train self.call_hook('after_train_iter') File "/home/froggy/anaconda3/envs/openmmlab2/lib/python3.7/site-packages/mmcv/runner/base_runner.py", line 317, in call_hook getattr(hook, fn_name)(self) File "/home/froggy/anaconda3/envs/openmmlab2/lib/python3.7/site-packages/mmcv/runner/hooks/evaluation.py", line 266, in after_train_iter self._do_evaluate(runner) File "/home/froggy/anaconda3/envs/openmmlab2/lib/python3.7/site-packages/mmcv/runner/hooks/evaluation.py", line 275, in _do_evaluate results = self.test_fn(runner.model, self.dataloader) File "/home/froggy/anaconda3/envs/openmmlab2/lib/python3.7/site-packages/mmcv/engine/test.py", line 34, in single_gpu_test for data in data_loader: File "/home/froggy/anaconda3/envs/openmmlab2/lib/python3.7/site-packages/torch/utils/data/dataloader.py", line 521, in __next__ data = self._next_data() File "/home/froggy/anaconda3/envs/openmmlab2/lib/python3.7/site-packages/torch/utils/data/dataloader.py", line 1203, in _next_data return self._process_data(data) File "/home/froggy/anaconda3/envs/openmmlab2/lib/python3.7/site-packages/torch/utils/data/dataloader.py", line 1229, in _process_data data.reraise() File "/home/froggy/anaconda3/envs/openmmlab2/lib/python3.7/site-packages/torch/_utils.py", line 434, in reraise raise exception OSError: Caught OSError in DataLoader worker process 0. Original Traceback (most recent call last): File "/home/froggy/anaconda3/envs/openmmlab2/lib/python3.7/site-packages/torch/utils/data/_utils/worker.py", line 287, in _worker_loop data = fetcher.fetch(index) File "/home/froggy/anaconda3/envs/openmmlab2/lib/python3.7/site-packages/torch/utils/data/_utils/fetch.py", line 49, in fetch data = [self.dataset[idx] for idx in possibly_batched_index] File "/home/froggy/anaconda3/envs/openmmlab2/lib/python3.7/site-packages/torch/utils/data/_utils/fetch.py", line 49, in <listcomp> data = [self.dataset[idx] for idx in possibly_batched_index] File "/home/froggy/anaconda3/envs/openmmlab2/lib/python3.7/site-packages/mmcls/datasets/base_dataset.py", line 97, in __getitem__ return self.prepare_data(idx) File "/home/froggy/anaconda3/envs/openmmlab2/lib/python3.7/site-packages/mmcls/datasets/base_dataset.py", line 91, in prepare_data return self.pipeline(results) File "/home/froggy/anaconda3/envs/openmmlab2/lib/python3.7/site-packages/mmcls/datasets/pipelines/compose.py", line 33, in __call__ data = t(data) File "/home/froggy/anaconda3/envs/openmmlab2/lib/python3.7/site-packages/mmcls/datasets/pipelines/loading.py", line 48, in __call__ img_bytes = self.file_client.get(filename) File "/home/froggy/anaconda3/envs/openmmlab2/lib/python3.7/site-packages/mmcv/fileio/file_client.py", line 1017, in get return self.client.get(filepath) File "/home/froggy/anaconda3/envs/openmmlab2/lib/python3.7/site-packages/mmcv/fileio/file_client.py", line 538, in get with open(filepath, 'rb') as f: OSError: [Errno 36] File name too long: 'data/imagenet/val/490 361 171 822 297 482
And then there's a very long list of numbers,后面就是非常长的一串数字
Beta Was this translation helpful? Give feedback.
All reactions