Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test test_fasterrcnn_resnet50_fpn is failing #2320

Closed
peterjc123 opened this issue Jun 15, 2020 · 5 comments
Closed

test test_fasterrcnn_resnet50_fpn is failing #2320

peterjc123 opened this issue Jun 15, 2020 · 5 comments

Comments

@peterjc123
Copy link
Contributor

peterjc123 commented Jun 15, 2020

🐛 Bug

Error text:

___________________ ModelTester.test_fasterrcnn_resnet50_fpn ___________________

self = <test_models.ModelTester testMethod=test_fasterrcnn_resnet50_fpn>
model_name = 'fasterrcnn_resnet50_fpn'

    def do_test(self, model_name=model_name):
>       self._test_detection_model(model_name)

test/test_models.py:340: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
test/test_models.py:144: in _test_detection_model
    scripted_model = torch.jit.script(model)
../_test_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placeh/lib/python3.6/site-packages/torch/jit/__init__.py:1355: in script
    return torch.jit._recursive.create_script_module(obj, torch.jit._recursive.infer_methods_to_compile)
../_test_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placeh/lib/python3.6/site-packages/torch/jit/_recursive.py:310: in create_script_module
    concrete_type = concrete_type_store.get_or_create_concrete_type(nn_module)
../_test_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placeh/lib/python3.6/site-packages/torch/jit/_recursive.py:269: in get_or_create_concrete_type
    concrete_type_builder = infer_concrete_type_builder(nn_module)
../_test_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placeh/lib/python3.6/site-packages/torch/jit/_recursive.py:138: in infer_concrete_type_builder
    sub_concrete_type = concrete_type_store.get_or_create_concrete_type(item)
../_test_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placeh/lib/python3.6/site-packages/torch/jit/_recursive.py:269: in get_or_create_concrete_type
    concrete_type_builder = infer_concrete_type_builder(nn_module)
../_test_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placeh/lib/python3.6/site-packages/torch/jit/_recursive.py:231: in infer_concrete_type_builder
    attr_type = infer_type(name, value)
../_test_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placeh/lib/python3.6/site-packages/torch/jit/_recursive.py:99: in infer_type
    attr_type = torch.jit.annotations.ann_to_type(class_annotations[name], _jit_internal.fake_range())
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

ann = <class 'torchvision.models.detection._utils.Matcher'>
loc = <torch._C._jit_tree_views.SourceRange object at 0x7feb2a671458>

    def ann_to_type(ann, loc):
        the_type = try_ann_to_type(ann, loc)
        if the_type is not None:
            return the_type
>       raise ValueError("Unknown type annotation: '{}'".format(ann))
E       ValueError: Unknown type annotation: '<class 'torchvision.models.detection._utils.Matcher'>'

../_test_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placeh/lib/python3.6/site-packages/torch/jit/annotations.py:309: ValueError
__________________ ModelTester.test_keypointrcnn_resnet50_fpn __________________

self = <test_models.ModelTester testMethod=test_keypointrcnn_resnet50_fpn>
model_name = 'keypointrcnn_resnet50_fpn'

    def do_test(self, model_name=model_name):
>       self._test_detection_model(model_name)

test/test_models.py:340: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
test/test_models.py:144: in _test_detection_model
    scripted_model = torch.jit.script(model)
../_test_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placeh/lib/python3.6/site-packages/torch/jit/__init__.py:1355: in script
    return torch.jit._recursive.create_script_module(obj, torch.jit._recursive.infer_methods_to_compile)
../_test_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placeh/lib/python3.6/site-packages/torch/jit/_recursive.py:310: in create_script_module
    concrete_type = concrete_type_store.get_or_create_concrete_type(nn_module)
../_test_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placeh/lib/python3.6/site-packages/torch/jit/_recursive.py:269: in get_or_create_concrete_type
    concrete_type_builder = infer_concrete_type_builder(nn_module)
../_test_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placeh/lib/python3.6/site-packages/torch/jit/_recursive.py:138: in infer_concrete_type_builder
    sub_concrete_type = concrete_type_store.get_or_create_concrete_type(item)
../_test_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placeh/lib/python3.6/site-packages/torch/jit/_recursive.py:269: in get_or_create_concrete_type
    concrete_type_builder = infer_concrete_type_builder(nn_module)
../_test_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placeh/lib/python3.6/site-packages/torch/jit/_recursive.py:231: in infer_concrete_type_builder
    attr_type = infer_type(name, value)
../_test_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placeh/lib/python3.6/site-packages/torch/jit/_recursive.py:99: in infer_type
    attr_type = torch.jit.annotations.ann_to_type(class_annotations[name], _jit_internal.fake_range())
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

ann = <class 'torchvision.models.detection._utils.Matcher'>
loc = <torch._C._jit_tree_views.SourceRange object at 0x7feb2a71c848>

    def ann_to_type(ann, loc):
        the_type = try_ann_to_type(ann, loc)
        if the_type is not None:
            return the_type
>       raise ValueError("Unknown type annotation: '{}'".format(ann))
E       ValueError: Unknown type annotation: '<class 'torchvision.models.detection._utils.Matcher'>'

../_test_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placeh/lib/python3.6/site-packages/torch/jit/annotations.py:309: ValueError
____________________ ModelTester.test_maskrcnn_resnet50_fpn ____________________

self = <test_models.ModelTester testMethod=test_maskrcnn_resnet50_fpn>
model_name = 'maskrcnn_resnet50_fpn'

    def do_test(self, model_name=model_name):
>       self._test_detection_model(model_name)

test/test_models.py:340: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
test/test_models.py:144: in _test_detection_model
    scripted_model = torch.jit.script(model)
../_test_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placeh/lib/python3.6/site-packages/torch/jit/__init__.py:1355: in script
    return torch.jit._recursive.create_script_module(obj, torch.jit._recursive.infer_methods_to_compile)
../_test_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placeh/lib/python3.6/site-packages/torch/jit/_recursive.py:310: in create_script_module
    concrete_type = concrete_type_store.get_or_create_concrete_type(nn_module)
../_test_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placeh/lib/python3.6/site-packages/torch/jit/_recursive.py:269: in get_or_create_concrete_type
    concrete_type_builder = infer_concrete_type_builder(nn_module)
../_test_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placeh/lib/python3.6/site-packages/torch/jit/_recursive.py:138: in infer_concrete_type_builder
    sub_concrete_type = concrete_type_store.get_or_create_concrete_type(item)
../_test_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placeh/lib/python3.6/site-packages/torch/jit/_recursive.py:269: in get_or_create_concrete_type
    concrete_type_builder = infer_concrete_type_builder(nn_module)
../_test_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placeh/lib/python3.6/site-packages/torch/jit/_recursive.py:231: in infer_concrete_type_builder
    attr_type = infer_type(name, value)
../_test_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placeh/lib/python3.6/site-packages/torch/jit/_recursive.py:99: in infer_type
    attr_type = torch.jit.annotations.ann_to_type(class_annotations[name], _jit_internal.fake_range())
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

ann = <class 'torchvision.models.detection._utils.Matcher'>
loc = <torch._C._jit_tree_views.SourceRange object at 0x7feb2e36c5e0>

    def ann_to_type(ann, loc):
        the_type = try_ann_to_type(ann, loc)
        if the_type is not None:
            return the_type
>       raise ValueError("Unknown type annotation: '{}'".format(ann))
E       ValueError: Unknown type annotation: '<class 'torchvision.models.detection._utils.Matcher'>'

To Reproduce

See binary jobs on CircleCI

Expected behavior

Tests pass.

@peterjc123
Copy link
Contributor Author

cc @fmassa

@fmassa
Copy link
Member

fmassa commented Jun 15, 2020

This has started failing a couple of days ago, and is probably due to an issue on upstream PyTorch.

cc @eellison

facebook-github-bot pushed a commit to pytorch/pytorch that referenced this issue Jun 16, 2020
Summary:
Fix for pytorch/vision#2320 - still need to fix whatever reverting this change breaks

EDIT: reverting this change doesnt seem to break anything, and fixes the torchvision issue
Pull Request resolved: #40041

Reviewed By: eellison

Differential Revision: D22067586

Pulled By: fmassa

fbshipit-source-id: 4b235fd3a69665dcc5689f12310097be31b40a28
xwang233 pushed a commit to xwang233/pytorch that referenced this issue Jun 20, 2020
…#40041)

Summary:
Fix for pytorch/vision#2320 - still need to fix whatever reverting this change breaks

EDIT: reverting this change doesnt seem to break anything, and fixes the torchvision issue
Pull Request resolved: pytorch#40041

Reviewed By: eellison

Differential Revision: D22067586

Pulled By: fmassa

fbshipit-source-id: 4b235fd3a69665dcc5689f12310097be31b40a28
@datumbox datumbox closed this as completed Nov 9, 2020
@datumbox
Copy link
Contributor

datumbox commented Jan 6, 2021

This issue appears to be stale, so I'm closing it. If you think it should remain open, feel free to reopen it.

@datumbox datumbox reopened this Jan 6, 2021
@peterjc123
Copy link
Contributor Author

@datumbox It seems that you reopened it.

@datumbox
Copy link
Contributor

datumbox commented Jan 7, 2021

@peterjc123 Doh!!!!

@datumbox datumbox closed this as completed Jan 7, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants