Megvii-BaseDetection / Megvii-BaseDetection/YOLOX

TypeError: __init__() missing 1 required positional argument: 'dtype'

Open
#535 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
10.6k
Forks
2.5k
PR merge metrics
No merged PRs in 30d

Description

Pytorch version 1.9
2021-08-20 00:05:48 | ERROR | yolox.core.launch:68 - An error has been caught in function 'launch', process 'MainProcess' (18728), thread 'MainThread' (568):
Traceback (most recent call last):

File "tools\train.py", line 115, in
dist_url=dist_url, args=(exp, args)
│ │ └ Namespace(batch_size=16, ckpt='./YOLOX_outputs\yolox_coco_tiny\latest_ckpt.pth.tar', devices=1, dist_backend='nccl', dist_u...
│ └ ╒══════════════════╤═════════════════════════════════════════════════════════════════════════════════════════════════════════...
└ 'auto'

File "d:\work\demo\yolox-main\yolox\core\launch.py", line 68, in launch
main_func(*args)
│ └ (╒══════════════════╤════════════════════════════════════════════════════════════════════════════════════════════════════════...
└ <function main at 0x000001ED23056A68>

File "tools\train.py", line 101, in main
trainer.train()
│ └ <function Trainer.train at 0x000001ED47B264C8>
└ <yolox.core.trainer.Trainer object at 0x000001ED48997088>

File "d:\work\demo\yolox-main\yolox\core\trainer.py", line 70, in train
self.train_in_epoch()
│ └ <function Trainer.train_in_epoch at 0x000001ED48215D38>
└ <yolox.core.trainer.Trainer object at 0x000001ED48997088>

File "d:\work\demo\yolox-main\yolox\core\trainer.py", line 80, in train_in_epoch
self.after_epoch()
│ └ <function Trainer.after_epoch at 0x000001ED49023C18>
└ <yolox.core.trainer.Trainer object at 0x000001ED48997088>

File "d:\work\demo\yolox-main\yolox\core\trainer.py", line 210, in after_epoch
self.evaluate_and_save_model()
│ └ <function Trainer.evaluate_and_save_model at 0x000001ED49023EE8>
└ <yolox.core.trainer.Trainer object at 0x000001ED48997088>

File "d:\work\demo\yolox-main\yolox\core\trainer.py", line 293, in evaluate_and_save_model
ap50_95, ap50, summary = self.exp.eval(evalmodel, self.evaluator, self.is_distributed)
│ │ │ │ │ │ │ └ False
│ │ │ │ │ │ └ <yolox.core.trainer.Trainer object at 0x000001ED48997088>
│ │ │ │ │ └ <yolox.evaluators.coco_evaluator.COCOEvaluator object at 0x000001ED60BD4C48>
│ │ │ │ └ <yolox.core.trainer.Trainer object at 0x000001ED48997088>
│ │ │ └ YOLOX(
│ │ │ (backbone): YOLOPAFPN(
│ │ │ (backbone): CSPDarknet(
│ │ │ (stem): Focus(
│ │ │ (conv): BaseConv(
│ │ │ (conv): ...
│ │ └ <function Exp.eval at 0x000001ED49067798>
│ └ ╒══════════════════╤═════════════════════════════════════════════════════════════════════════════════════════════════════════...
└ <yolox.core.trainer.Trainer object at 0x000001ED48997088>

File "exps\example\yolox_voc\yolox_coco_tiny.py", line 240, in eval
return evaluator.evaluate(model, is_distributed, half)
│ │ │ │ └ False
│ │ │ └ False
│ │ └ YOLOX(
│ │ (backbone): YOLOPAFPN(
│ │ (backbone): CSPDarknet(
│ │ (stem): Focus(
│ │ (conv): BaseConv(
│ │ (conv): ...
│ └ <function COCOEvaluator.evaluate at 0x000001ED4901F4C8>
└ <yolox.evaluators.coco_evaluator.COCOEvaluator object at 0x000001ED60BD4C48>

File "d:\work\demo\yolox-main\yolox\evaluators\coco_evaluator.py", line 98, in evaluate
progress_bar(self.dataloader)
│ │ └ <torch.utils.data.dataloader.DataLoader object at 0x000001ED60BD4CC8>
│ └ <yolox.evaluators.coco_evaluator.COCOEvaluator object at 0x000001ED60BD4C48>
└ <class 'tqdm.std.tqdm'>

File "D:\Program Files (x86)\anaconda3\envs\yolox\lib\site-packages\tqdm\std.py", line 1185, in iter
for obj in iterable:
│ └ <torch.utils.data.dataloader.DataLoader object at 0x000001ED60BD4CC8>
└ [tensor([[[[-1.7069, -1.7069, -1.6898, ..., -1.6727, -1.5014, -1.0904],
[-1.7069, -1.7069, -1.7069, ..., -1.7069,...

File "D:\Program Files (x86)\anaconda3\envs\yolox\lib\site-packages\torch\utils\data\dataloader.py", line 521, in next
data = self._next_data()
│ └ <function _MultiProcessingDataLoaderIter._next_data at 0x000001ED47049168>
└ <torch.utils.data.dataloader._MultiProcessingDataLoaderIter object at 0x000001ED536354C8>

File "D:\Program Files (x86)\anaconda3\envs\yolox\lib\site-packages\torch\utils\data\dataloader.py", line 1203, in _next_data
return self._process_data(data)
│ │ └ <torch._utils.ExceptionWrapper object at 0x000001ED53664848>
│ └ <function _MultiProcessingDataLoaderIter._process_data at 0x000001ED47049288>
└ <torch.utils.data.dataloader._MultiProcessingDataLoaderIter object at 0x000001ED536354C8>

File "D:\Program Files (x86)\anaconda3\envs\yolox\lib\site-packages\torch\utils\data\dataloader.py", line 1229, in _process_data
data.reraise()
│ └ <function ExceptionWrapper.reraise at 0x000001ED22F993A8>
└ <torch._utils.ExceptionWrapper object at 0x000001ED53664848>

File "D:\Program Files (x86)\anaconda3\envs\yolox\lib\site-packages\torch_utils.py", line 425, in reraise
raise self.exc_type(msg)
│ │ └ 'Caught MemoryError in DataLoader worker process 0.\nOriginal Traceback (most recent call last):\n File "D:\Program Files (...
│ └ <class 'numpy.core._exceptions._ArrayMemoryError'>
└ <torch._utils.ExceptionWrapper object at 0x000001ED53664848>

TypeError: init() missing 1 required positional argument: 'dtype'

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with tools/train.py and follow the evaluation path into exps/example/yolox_voc/yolox_coco_tiny.py and yolox/evaluators/coco_evaluator.py. Reproduce evaluation with the reported PyTorch 1.9 environment, determine why the DataLoader worker raises the dtype-related TypeError, and verify that model evaluation completes without the exception.

Written by the indexing model from the issue text.

Assessment

Tech stack
python, pytorch
Domain
computer-vision, machine-learning
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
28/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.