Skip to content

Conversation

@lara-hdr
Copy link
Contributor

@lara-hdr lara-hdr commented May 1, 2019

Refactor tests for #19294.

@pytorchbot pytorchbot added the module: onnx Related to torch.onnx label May 1, 2019
@ezyang ezyang requested a review from houseroad May 6, 2019 14:39
@lara-hdr
Copy link
Contributor Author

lara-hdr commented May 9, 2019

test_topk and test_blacklisted_ops will be failing until merged with #19294

@lara-hdr
Copy link
Contributor Author

@houseroad this PR is ready for review :)

Copy link
Member

@houseroad houseroad left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would suggest to split this into two PRs, the refactor part, and the top-k changes. This may help us merge the first part in quicker.

@houseroad
Copy link
Member

Could you rebase again?

@houseroad
Copy link
Member

<test_pytorch_onnx_caffe2_opset9.TestCaffe2BackendEmbed_opset9 testMethod=test_c2_generate_proposals> failed.

@zou3519 zou3519 added the triaged This issue has been looked at a team member, and triaged and prioritized into an appropriate module label Jun 7, 2019
@houseroad
Copy link
Member

rebase? I may take a look if the tests are still failing.

Copy link
Contributor

@facebook-github-bot facebook-github-bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@houseroad has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.

Copy link
Member

@houseroad houseroad left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. Finally we are able to land this.

{"name": "pads", "ints": [0, 0], "type": 7},
{"name": "strides", "ints": [1], "type": 7}]}]
ops = {9 : ops_9, 10 : ops_10}
ops = {10 : ops_10}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch. Why did it fail before?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

check_onnx_opsets_operator() runs tests for opset versions in opset_versions, so it didn't run it for opset 9.

return func(self)
return wrapper

# skips tests for all versions below min_opset_version.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

self.run_model_test(torch.nn.CosineSimilarity(dim=1, eps=1e-6), train=False,
input=(x, y), batch_size=BATCH_SIZE, use_gpu=False)

@skipIfUnsupportedOpsetVersion([10])
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why this failed on opset 10?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LSTM exports with Slice ops (Slice exports with all inputs in opset 10 rather than one input and attributes, which is not the case with the caffe2 op)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see, make sense. I would suggest to add this context into the comments later.

@houseroad
Copy link
Member

Feel free to address the comments in the following PR.

dict(TestCaffe2Backend.__dict__, embed_params=True))

# opset 10 tests
TestCaffe2Backend_opset10 = type(str("TestCaffe2Backend_opset10"),
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also I am wondering if we can renamed TestCaffe2Backend and TestCaffe2BackendEmbed to TestCaffe2Backend_opset9 and TestCaffe2BackendEmbed_opset10

If so, let's do it in the following PRs.

@lara-hdr
Copy link
Contributor Author

Thank you @houseroad !!

@facebook-github-bot
Copy link
Contributor

@houseroad merged this pull request in 45c6fa0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

caffe2 Merged module: onnx Related to torch.onnx open source triaged This issue has been looked at a team member, and triaged and prioritized into an appropriate module

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants