Skip to content
This repository was archived by the owner on Aug 1, 2025. It is now read-only.
This repository was archived by the owner on Aug 1, 2025. It is now read-only.

Fix issues in detectron2_maskrcnn #101

@jansel

Description

@jansel
./torchbench.py --no-skip -k detectron2_maskrcnn
ERROR FROM offset=6 filename /home/jansel/conda/envs/torchdynamo/lib/python3.8/site-packages/detectron2/structures/masks.py 522 KeyError
========== TorchDynamo Stack Trace ==========
Traceback (most recent call last):
  File "/home/jansel/torchdynamo/torchdynamo/convert_frame.py", line 158, in _convert_frame_assert
    code = transform_code_object(frame.f_code, transform)
  File "/home/jansel/torchdynamo/torchdynamo/bytecode_transformation.py", line 284, in transform_code_object
    transformations(instructions, code_options)
  File "/home/jansel/torchdynamo/torchdynamo/convert_frame.py", line 134, in transform
    tracer.run()
  File "/home/jansel/torchdynamo/torchdynamo/symbolic_convert.py", line 274, in run
    and self.step()
  File "/home/jansel/torchdynamo/torchdynamo/symbolic_convert.py", line 252, in step
    getattr(self, inst.opname)(inst)
  File "/home/jansel/torchdynamo/torchdynamo/symbolic_convert.py", line 384, in IMPORT_FROM
    self.LOAD_ATTR(inst)
  File "/home/jansel/torchdynamo/torchdynamo/symbolic_convert.py", line 608, in LOAD_ATTR
    result = BuiltinVariable(getattr).call_function(
  File "/home/jansel/torchdynamo/torchdynamo/variables/builtin.py", line 212, in call_function
    result = handler(tx, *args, **kwargs)
  File "/home/jansel/torchdynamo/torchdynamo/variables/builtin.py", line 461, in call_getattr
    member = obj.value.__dict__[name]
KeyError: 'paste_masks_in_image'
========== Exception (above) while processing ==========
  File "./torchbench.py", line 1019, in <module>
    main()
  File "./torchbench.py", line 913, in main
    run_one_model(
  File "./torchbench.py", line 981, in run_one_model
    new_result = model_iter_fn(model, example_inputs)
  File "./torchbench.py", line 469, in forward_pass
    def forward_pass(mod, inputs, collect_outputs=True):
  File "/home/jansel/pytorch/torch/nn/modules/module.py", line 1111, in _call_impl
    return forward_call(*input, **kwargs)
  File "/home/jansel/conda/envs/torchdynamo/lib/python3.8/site-packages/detectron2/modeling/meta_arch/rcnn.py", line 122, in forward
    def forward(self, batched_inputs: List[Dict[str, torch.Tensor]]):
  File "/home/jansel/conda/envs/torchdynamo/lib/python3.8/site-packages/detectron2/modeling/meta_arch/rcnn.py", line 174, in inference
    def inference(
  File "/home/jansel/conda/envs/torchdynamo/lib/python3.8/site-packages/detectron2/modeling/meta_arch/rcnn.py", line 174, in inference
    def inference(
  File "/home/jansel/conda/envs/torchdynamo/lib/python3.8/site-packages/detectron2/modeling/meta_arch/rcnn.py", line 174, in inference
    def inference(
  [Previous line repeated 1 more time]
  File "/home/jansel/conda/envs/torchdynamo/lib/python3.8/site-packages/detectron2/modeling/meta_arch/rcnn.py", line 229, in _postprocess
    @staticmethod
  File "/home/jansel/conda/envs/torchdynamo/lib/python3.8/site-packages/detectron2/modeling/postprocessing.py", line 9, in detector_postprocess
    def detector_postprocess(
  File "/home/jansel/conda/envs/torchdynamo/lib/python3.8/site-packages/detectron2/modeling/postprocessing.py", line 9, in detector_postprocess
    def detector_postprocess(
  File "/home/jansel/conda/envs/torchdynamo/lib/python3.8/site-packages/detectron2/modeling/postprocessing.py", line 9, in detector_postprocess
    def detector_postprocess(
  File "/home/jansel/conda/envs/torchdynamo/lib/python3.8/site-packages/detectron2/modeling/postprocessing.py", line 67, in detector_postprocess
    results.pred_masks = roi_masks.to_bitmasks(
  File "/home/jansel/conda/envs/torchdynamo/lib/python3.8/site-packages/detectron2/structures/masks.py", line 517, in to_bitmasks
    @torch.jit.unused
========== End debug info ==========

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions