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

Add test for sigmoid_focal_loss #5783

Merged
merged 9 commits into from
Apr 8, 2022

Conversation

YosuaMichael
Copy link
Contributor

Sub-task for #5688

adding test for sigmoid_focal_loss function

@YosuaMichael YosuaMichael self-assigned this Apr 7, 2022
@YosuaMichael YosuaMichael requested a review from datumbox April 7, 2022 12:40
@YosuaMichael YosuaMichael marked this pull request as ready for review April 7, 2022 12:40
@YosuaMichael YosuaMichael requested review from pmeier and removed request for datumbox April 7, 2022 12:48
Copy link
Collaborator

@pmeier pmeier left a comment

Choose a reason for hiding this comment

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

As discussed offline, I only had a look at the test setup.

YosuaMichael and others added 4 commits April 7, 2022 15:21
Improve code by using torch.testing.make_tensor

Co-authored-by: Philip Meier <github.pmeier@posteo.de>
Remove unnecessary assert

Co-authored-by: Philip Meier <github.pmeier@posteo.de>
Refactor code for generating inputs and targets

Co-authored-by: Philip Meier <github.pmeier@posteo.de>
Copy link
Contributor Author

@YosuaMichael YosuaMichael left a comment

Choose a reason for hiding this comment

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

Thansk @pmeier , I have made some changes and respond on your review

@YosuaMichael YosuaMichael marked this pull request as draft April 7, 2022 17:43
@YosuaMichael
Copy link
Contributor Author

The test on GPU failed on torch.half, will investigate further why

@YosuaMichael YosuaMichael marked this pull request as ready for review April 8, 2022 10:27
Copy link
Collaborator

@pmeier pmeier left a comment

Choose a reason for hiding this comment

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

Thanks Yosua, LGTM if CI is green!

@YosuaMichael YosuaMichael merged commit f5afae5 into pytorch:main Apr 8, 2022
facebook-github-bot pushed a commit that referenced this pull request May 5, 2022
Summary:
* Add test for sigmoid_focal_loss

* Update test/test_ops.py

Improve code by using torch.testing.make_tensor

* Update test/test_ops.py

Remove unnecessary assert

* Update test/test_ops.py

Refactor code for generating inputs and targets

* Improve focal_loss test code suggested on comment by Philip

* Use fuser2 to prevent fuser bug

* Combine function to generate input, dont set the fuser when device is cpu

* Add github issue for the fuser problem

(Note: this ignores all push blocking failures!)

Reviewed By: jdsgomes, NicolasHug

Differential Revision: D36095694

fbshipit-source-id: 36ed7ece4188eef159fa7f84fc3ebdc346a63f2d

Co-authored-by: Philip Meier <github.pmeier@posteo.de>
Co-authored-by: Philip Meier <github.pmeier@posteo.de>
Co-authored-by: Philip Meier <github.pmeier@posteo.de>
Co-authored-by: Philip Meier <github.pmeier@posteo.de>
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