Skip to content

Add more advanced smoke test for project Nova and validation workflows #7014

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

Merged
merged 6 commits into from
Dec 7, 2022

Conversation

atalman
Copy link
Contributor

@atalman atalman commented Dec 6, 2022

Move vision smoke test residing in builder: https://github.com/pytorch/builder/blob/main/test/smoke_test/smoke_test.py
So that we can support these from vision repo and share them with project Nova.

@atalman atalman changed the title Add more advanced smoke test Add more advanced smoke test for project Nova and validation workflows Dec 6, 2022
Copy link
Member

@osalpekar osalpekar left a comment

Choose a reason for hiding this comment

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

LGTM on my end once everything is green, thanks!

datumbox
datumbox previously approved these changes Dec 7, 2022
Copy link
Contributor

@datumbox datumbox left a comment

Choose a reason for hiding this comment

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

LGTM, thanks!

FYI any of the Object Detection models would provide a better coverage than Classification because it uses custom ops like RoI Align. Usually it's better to send actual data through the layer to check that it actually works. At least that's what we found out few months back when the M1 changes landed and we faced an issue with the dispatcher.

@datumbox datumbox dismissed their stale review December 7, 2022 08:54

failing test

Copy link
Contributor

@datumbox datumbox left a comment

Choose a reason for hiding this comment

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

@atalman I just noticed that one of the tests fails with:

ERROR conda.cli.main_run:execute(41): `conda run python3 pytorch/vision/test/smoke_test.py` failed. (See above for error)
/Users/runner/work/_temp/conda_environment_3634174756/lib/python3.10/site-packages/torchvision/io/image.py:13: UserWarning: Failed to load image Python extension: dlopen(/Users/runner/work/_temp/conda_environment_3634174756/lib/python3.10/site-packages/torchvision/image.so, 0x0006): Symbol not found: (__ZN2at4_ops19empty_memory_format4callEN3c108ArrayRefIxEENS2_8optionalINS2_10ScalarTypeEEENS5_INS2_6LayoutEEENS5_INS2_6DeviceEEENS5_IbEENS5_INS2_12MemoryFormatEEE)
  Referenced from: '/Users/runner/work/_temp/conda_environment_3634174756/lib/python3.10/site-packages/torchvision/image.so'
torchvision: 0.13.1a0
  Expected in: '/Users/runner/work/_temp/conda_environment_3634174756/lib/python3.10/site-packages/torch/lib/libtorch_cpu.dylib'

  warn(f"Failed to load image Python extension: {e}")
Traceback (most recent call last):
  File "/Users/runner/work/_temp/conda_environment_3634174756/lib/python3.10/site-packages/torch/_ops.py", line 563, in __getattr__
    op, overload_names = torch._C._jit_get_operation(qualified_op_name)
RuntimeError: No such operator image::decode_png

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/Users/runner/work/vision/vision/pytorch/vision/test/smoke_test.py", line 63, in <module>
    main()
  File "/Users/runner/work/vision/vision/pytorch/vision/test/smoke_test.py", line 57, in main
    smoke_test_torchvision()
  File "/Users/runner/work/vision/vision/pytorch/vision/test/smoke_test.py", line 17, in smoke_test_torchvision
    all(x is not None for x in [torch.ops.image.decode_png, torch.ops.torchvision.roi_align]),
  File "/Users/runner/work/_temp/conda_environment_[363](https://github.com/pytorch/vision/actions/runs/3634174756/jobs/6132002165#step:11:364)4174756/lib/python3.10/site-packages/torch/_ops.py", line 567, in __getattr__
    raise AttributeError(
AttributeError: '_OpNamespace' 'image' object has no attribute 'decode_png'

It seems the operator is not registred properly?

@atalman
Copy link
Contributor Author

atalman commented Dec 7, 2022

LGTM, thanks!

FYI any of the Object Detection models would provide a better coverage than Classification because it uses custom ops like RoI Align. Usually it's better to send actual data through the layer to check that it actually works. At least that's what we found out few months back when the M1 changes landed and we faced an issue with the dispatcher.

@datumbox could you please point me to an example of this? I can try to add additional test using Object Detection model, however probably will open new PR for this

Copy link
Contributor

@datumbox datumbox left a comment

Choose a reason for hiding this comment

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

Tests passing, approve.

@atalman atalman merged commit 23d3f78 into pytorch:main Dec 7, 2022
@github-actions
Copy link

github-actions bot commented Dec 7, 2022

Hey @atalman!

You merged this PR, but no labels were added. The list of valid labels is available at https://github.com/pytorch/vision/blob/main/.github/process_commit.py

@datumbox
Copy link
Contributor

datumbox commented Dec 7, 2022

@atalman concerning the Object Detection example, we have one in our documentation here. It's extremely similar to what you have in this PR.

facebook-github-bot pushed a commit that referenced this pull request Dec 12, 2022
… workflows (#7014)

Summary:
* Add more advanced smoke test

* add torch import

* remove dependency on torch

* Add missing vars

* More code and ufmt

Reviewed By: datumbox

Differential Revision: D41836892

fbshipit-source-id: 643a85707be252c4a84c59578b8b1929d415193a

Co-authored-by: Vasilis Vryniotis <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants