You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Traceback (most recent call last):
[rank0]: File "/mnt/f/GOT-OCR2.0/./GOT-OCR-2.0-master/GOT/train/train_GOT.py", line 160, in
[rank0]: train()
[rank0]: File "/mnt/f/GOT-OCR2.0/./GOT-OCR-2.0-master/GOT/train/train_GOT.py", line 154, in train
[rank0]: trainer.train()
[rank0]: File "/root/miniconda3/envs/got/lib/python3.10/site-packages/transformers/trainer.py", line 2122, in train
[rank0]: return inner_training_loop(
[rank0]: File "/root/miniconda3/envs/got/lib/python3.10/site-packages/transformers/trainer.py", line 2426, in _inner_training_loop
[rank0]: batch_samples, num_items_in_batch = self.get_batch_samples(epoch_iterator, num_batches)
[rank0]: File "/root/miniconda3/envs/got/lib/python3.10/site-packages/transformers/trainer.py", line 5038, in get_batch_samples
[rank0]: batch_samples += [next(epoch_iterator)]
[rank0]: File "/root/miniconda3/envs/got/lib/python3.10/site-packages/accelerate/data_loader.py", line 552, in iter
[rank0]: current_batch = next(dataloader_iter)
[rank0]: File "/root/miniconda3/envs/got/lib/python3.10/site-packages/torch/utils/data/dataloader.py", line 701, in next
[rank0]: data = self._next_data()
[rank0]: File "/root/miniconda3/envs/got/lib/python3.10/site-packages/torch/utils/data/dataloader.py", line 1465, in _next_data
[rank0]: return self._process_data(data)
[rank0]: File "/root/miniconda3/envs/got/lib/python3.10/site-packages/torch/utils/data/dataloader.py", line 1491, in _process_data
[rank0]: data.reraise()
[rank0]: File "/root/miniconda3/envs/got/lib/python3.10/site-packages/torch/_utils.py", line 715, in reraise
[rank0]: raise exception
[rank0]: UnboundLocalError: Caught UnboundLocalError in DataLoader worker process 0.
[rank0]: Original Traceback (most recent call last):
[rank0]: File "/root/miniconda3/envs/got/lib/python3.10/site-packages/torch/utils/data/_utils/worker.py", line 351, in _worker_loop
[rank0]: data = fetcher.fetch(index) # type: ignore[possibly-undefined]
[rank0]: File "/root/miniconda3/envs/got/lib/python3.10/site-packages/torch/utils/data/_utils/fetch.py", line 52, in fetch
[rank0]: data = [self.dataset[idx] for idx in possibly_batched_index]
[rank0]: File "/root/miniconda3/envs/got/lib/python3.10/site-packages/torch/utils/data/_utils/fetch.py", line 52, in
[rank0]: data = [self.dataset[idx] for idx in possibly_batched_index]
[rank0]: File "/mnt/f/GOT-OCR2.0/GOT-OCR-2.0-master/GOT/data/conversation_dataset_qwen.py", line 277, in getitem
[rank0]: image_name = image_path + image_file
[rank0]: UnboundLocalError: local variable 'image_path' referenced before assignment
请问训练时报这个错因为什么呢?
The text was updated successfully, but these errors were encountered:
Traceback (most recent call last):
[rank0]: File "/mnt/f/GOT-OCR2.0/./GOT-OCR-2.0-master/GOT/train/train_GOT.py", line 160, in
[rank0]: train()
[rank0]: File "/mnt/f/GOT-OCR2.0/./GOT-OCR-2.0-master/GOT/train/train_GOT.py", line 154, in train
[rank0]: trainer.train()
[rank0]: File "/root/miniconda3/envs/got/lib/python3.10/site-packages/transformers/trainer.py", line 2122, in train
[rank0]: return inner_training_loop(
[rank0]: File "/root/miniconda3/envs/got/lib/python3.10/site-packages/transformers/trainer.py", line 2426, in _inner_training_loop
[rank0]: batch_samples, num_items_in_batch = self.get_batch_samples(epoch_iterator, num_batches)
[rank0]: File "/root/miniconda3/envs/got/lib/python3.10/site-packages/transformers/trainer.py", line 5038, in get_batch_samples
[rank0]: batch_samples += [next(epoch_iterator)]
[rank0]: File "/root/miniconda3/envs/got/lib/python3.10/site-packages/accelerate/data_loader.py", line 552, in iter
[rank0]: current_batch = next(dataloader_iter)
[rank0]: File "/root/miniconda3/envs/got/lib/python3.10/site-packages/torch/utils/data/dataloader.py", line 701, in next
[rank0]: data = self._next_data()
[rank0]: File "/root/miniconda3/envs/got/lib/python3.10/site-packages/torch/utils/data/dataloader.py", line 1465, in _next_data
[rank0]: return self._process_data(data)
[rank0]: File "/root/miniconda3/envs/got/lib/python3.10/site-packages/torch/utils/data/dataloader.py", line 1491, in _process_data
[rank0]: data.reraise()
[rank0]: File "/root/miniconda3/envs/got/lib/python3.10/site-packages/torch/_utils.py", line 715, in reraise
[rank0]: raise exception
[rank0]: UnboundLocalError: Caught UnboundLocalError in DataLoader worker process 0.
[rank0]: Original Traceback (most recent call last):
[rank0]: File "/root/miniconda3/envs/got/lib/python3.10/site-packages/torch/utils/data/_utils/worker.py", line 351, in _worker_loop
[rank0]: data = fetcher.fetch(index) # type: ignore[possibly-undefined]
[rank0]: File "/root/miniconda3/envs/got/lib/python3.10/site-packages/torch/utils/data/_utils/fetch.py", line 52, in fetch
[rank0]: data = [self.dataset[idx] for idx in possibly_batched_index]
[rank0]: File "/root/miniconda3/envs/got/lib/python3.10/site-packages/torch/utils/data/_utils/fetch.py", line 52, in
[rank0]: data = [self.dataset[idx] for idx in possibly_batched_index]
[rank0]: File "/mnt/f/GOT-OCR2.0/GOT-OCR-2.0-master/GOT/data/conversation_dataset_qwen.py", line 277, in getitem
[rank0]: image_name = image_path + image_file
[rank0]: UnboundLocalError: local variable 'image_path' referenced before assignment
请问训练时报这个错因为什么呢?
The text was updated successfully, but these errors were encountered: