Skip to content

Conversation

@ethch18
Copy link

@ethch18 ethch18 commented Aug 27, 2020

Stack from ghstack:

Summary: As discussed here,
adding in a Python-only implementation of the triplet-margin loss that takes a
custom distance function. Still discussing whether this is necessary to add to
PyTorch Core.

Test Plan: python test/run_tests.py

Reviewers:

Subscribers:

Tasks:

Tags:

Differential Revision: D23363898

Summary: As discussed [here](#43342),
adding in a Python-only implementation of the triplet-margin loss that takes a
custom distance function.  Still discussing whether this is necessary to add to
PyTorch Core.

Test Plan: python test/run_tests.py

Reviewers:

Subscribers:

Tasks:

Tags:

[ghstack-poisoned]
@ethch18 ethch18 requested a review from apaszke as a code owner August 27, 2020 00:52
@ethch18 ethch18 linked an issue Aug 27, 2020 that may be closed by this pull request
@dr-ci
Copy link

dr-ci bot commented Aug 27, 2020

💊 CI failures summary and remediations

As of commit 7756ad2 (more details on the Dr. CI page):


None of the CI failures appear to be your fault 💚



❄️ 2 failures tentatively classified as flaky

but reruns have not yet been triggered to confirm:

See CircleCI build pytorch_windows_vs2019_py36_cuda10.1_test1 (1/2)

Step: "Test" (full log | diagnosis details | 🔁 rerun) ❄️

ModuleNotFoundError: No module named 'torch'
[ERROR:VsDevCmd.bat] Where [value] is: 
[ERROR:VsDevCmd.bat]    1 : basic debug logging 
[ERROR:VsDevCmd.bat]    2 : detailed debug logging 
[ERROR:VsDevCmd.bat]    3 : trace level logging. Redirection of output to a file when using this level is recommended. 
[ERROR:VsDevCmd.bat] Example: set VSCMD_DEBUG=3 
[ERROR:VsDevCmd.bat]          vsdevcmd.bat > vsdevcmd.trace.txt 2>&1 
Run jit_profiling tests 
Traceback (most recent call last): 
  File "run_test.py", line 13, in <module> 
    import torch 
ModuleNotFoundError: No module named 'torch' 
+ cleanup
+ retcode=1
+ set +x

See CircleCI build pytorch_windows_vs2019_py36_cuda10.1_test2 (2/2)

Step: "Test" (full log | diagnosis details | 🔁 rerun) ❄️

ModuleNotFoundError: No module named 'torch'
[ERROR:VsDevCmd.bat] vsdevcmd.bat [args] for additional details. 
[ERROR:VsDevCmd.bat] Where [value] is: 
[ERROR:VsDevCmd.bat]    1 : basic debug logging 
[ERROR:VsDevCmd.bat]    2 : detailed debug logging 
[ERROR:VsDevCmd.bat]    3 : trace level logging. Redirection of output to a file when using this level is recommended. 
[ERROR:VsDevCmd.bat] Example: set VSCMD_DEBUG=3 
[ERROR:VsDevCmd.bat]          vsdevcmd.bat > vsdevcmd.trace.txt 2>&1 
Traceback (most recent call last): 
  File "run_test.py", line 13, in <module> 
    import torch 
ModuleNotFoundError: No module named 'torch' 
+ cleanup
+ retcode=1
+ set +x

1 failure confirmed as flaky and can be ignored:

  • pytorch_linux_bionic_py3_8_gcc9_build

This comment was automatically generated by Dr. CI (expand for details).Follow this link to opt-out of these comments for your Pull Requests.

Please report bugs/suggestions on the GitHub issue tracker or post in the (internal) Dr. CI Users group.

See how this bot performed.

This comment has been revised 78 times.

Summary: As discussed [here](#43342),
adding in a Python-only implementation of the triplet-margin loss that takes a
custom distance function.  Still discussing whether this is necessary to add to
PyTorch Core.

Test Plan: python test/run_tests.py

Reviewers:

Subscribers:

Tasks:

Tags:

Differential Revision: [D23363898](https://our.internmc.facebook.com/intern/diff/D23363898)

[ghstack-poisoned]
ethch18 added a commit that referenced this pull request Aug 27, 2020
Summary: As discussed [here](#43342),
adding in a Python-only implementation of the triplet-margin loss that takes a
custom distance function.  Still discussing whether this is necessary to add to
PyTorch Core.

Test Plan: python test/run_tests.py

Reviewers:

Subscribers:

Tasks:

Tags:

ghstack-source-id: b62a832
Pull Request resolved: #43680
Summary: As discussed [here](#43342),
adding in a Python-only implementation of the triplet-margin loss that takes a
custom distance function.  Still discussing whether this is necessary to add to
PyTorch Core.

Test Plan: python test/run_tests.py

Reviewers:

Subscribers:

Tasks:

Tags:

Differential Revision: [D23363898](https://our.internmc.facebook.com/intern/diff/D23363898)

[ghstack-poisoned]
ethch18 added a commit that referenced this pull request Aug 27, 2020
Summary: As discussed [here](#43342),
adding in a Python-only implementation of the triplet-margin loss that takes a
custom distance function.  Still discussing whether this is necessary to add to
PyTorch Core.

Test Plan: python test/run_tests.py

Reviewers:

Subscribers:

Tasks:

Tags:

ghstack-source-id: 14fbd6d
Pull Request resolved: #43680
@ethch18 ethch18 requested review from albanD and mruberry August 27, 2020 17:15
@mruberry mruberry removed the request for review from apaszke August 28, 2020 05:39
Summary: As discussed [here](#43342),
adding in a Python-only implementation of the triplet-margin loss that takes a
custom distance function.  Still discussing whether this is necessary to add to
PyTorch Core.

Test Plan: python test/run_tests.py

Reviewers:

Subscribers:

Tasks:

Tags:

Differential Revision: [D23363898](https://our.internmc.facebook.com/intern/diff/D23363898)

[ghstack-poisoned]
ethch18 added a commit that referenced this pull request Sep 18, 2020
Summary: As discussed [here](#43342),
adding in a Python-only implementation of the triplet-margin loss that takes a
custom distance function.  Still discussing whether this is necessary to add to
PyTorch Core.

* Consolidate tests, clarify functional limitations

* Documentation updates

* Remove stray imports

* Fix CI

Test Plan: python test/run_tests.py

Reviewers:

Subscribers:

Tasks:

Tags:

ghstack-source-id: a4e87fa
Pull Request resolved: #43680
@ethch18
Copy link
Author

ethch18 commented Sep 18, 2020

Addressed doc comments + rebase + add test decorator. @mruberry @albanD this should be ready to go once CI passes!

@ethch18
Copy link
Author

ethch18 commented Sep 18, 2020

Looks like all CI tests are passing except for a couple (flaky-esque?) windows failures -- is this expected/is there a way to tell if something is broken upstream?

@mruberry
Copy link
Collaborator

Looks like all CI tests are passing except for a couple (flaky-esque?) windows failures -- is this expected/is there a way to tell if something is broken upstream?

Yep. Sorry for the confusion. Windows CI is broken at the moment and we're working on a fix. You can ignore those failures ;)

@ethch18
Copy link
Author

ethch18 commented Sep 18, 2020

Cool -- in that case, I think this is ready. What steps do I have to complete on my end for the merge?

(if it's preferable, I'm totally fine with waiting until a non-Friday afternoon to merge this too)

@mruberry
Copy link
Collaborator

Cool -- in that case, I think this is ready. What steps do I have to complete on my end for the merge?

(if it's preferable, I'm totally fine with waiting until a non-Friday afternoon to merge this too)

You don't need to do anything at this point. We take it from here.

Summary: As discussed [here](#43342),
adding in a Python-only implementation of the triplet-margin loss that takes a
custom distance function.  Still discussing whether this is necessary to add to
PyTorch Core.

Test Plan: python test/run_tests.py

Reviewers:

Subscribers:

Tasks:

Tags:

Differential Revision: [D23363898](https://our.internmc.facebook.com/intern/diff/D23363898)

[ghstack-poisoned]
ethch18 added a commit that referenced this pull request Sep 18, 2020
Summary: As discussed [here](#43342),
adding in a Python-only implementation of the triplet-margin loss that takes a
custom distance function.  Still discussing whether this is necessary to add to
PyTorch Core.

* Consolidate tests, clarify functional limitations

* Documentation updates

* Remove stray imports

* Fix CI

Test Plan: python test/run_tests.py

Reviewers:

Subscribers:

Tasks:

Tags:

ghstack-source-id: 7052170
Pull Request resolved: #43680
@mruberry
Copy link
Collaborator

This is now merged, congrats @ethch18! This is a cool module.

@ethch18
Copy link
Author

ethch18 commented Sep 22, 2020

Thanks @mruberry and @albanD! Appreciate the mentorship and guidance.

Curious what your thoughts are on the C++ side of this -- I had PR #44072 open as a proof-of-concept but that's pretty out of date at this point. If there's a need, I can continue working on this over the next month or so, or I could hand it off to someone else if that's preferable.

@mruberry
Copy link
Collaborator

@glaringlee is our C++ API czar. We do like to keep the C++ API consistent with the Python API and would definitely accept a PR implementing this module in C++.

@facebook-github-bot
Copy link
Contributor

This pull request has been merged in ef885c1.

@facebook-github-bot
Copy link
Contributor

This pull request has been merged in ef885c1.

@glaringlee
Copy link
Contributor

@ethch18
I saw PR #44072 is pretty much done. Can you clean it a bit and sync with the python version (if anything changed in pytrhon but not updated in this C++ version), I can help reviewing this and land it. Thank you so much for contributing!

@ethch18
Copy link
Author

ethch18 commented Sep 22, 2020

@glaringlee sure, thanks for reviewing this!. PR #44072 is out of date -- had quite a few changes made here that weren't reflected there. I don't have time at the moment but will tidy it up once I have a chance and ping you in the comments there.

loadbxh pushed a commit to loadbxh/Torch that referenced this pull request Sep 23, 2020
Summary: As discussed [here](pytorch/pytorch#43342),
adding in a Python-only implementation of the triplet-margin loss that takes a
custom distance function.  Still discussing whether this is necessary to add to
PyTorch Core.

* Consolidate tests, clarify functional limitations

* Documentation updates

* Remove stray imports

* Fix CI

Test Plan: python test/run_tests.py

Reviewers:

Subscribers:

Tasks:

Tags:

ghstack-source-id: 672055f
Pull Request resolved: pytorch/pytorch#43680
@facebook-github-bot facebook-github-bot deleted the gh/ethch18/3/head branch September 26, 2020 14:14
ethch18 added a commit that referenced this pull request Sep 26, 2020
This PR adds a C++ implementation of the TripletMarginWithDistanceLoss, for which the Python implementation was introduced in PR #43680.  It's based on PR #44072, but I'm resubmitting this to unlink it from Phabricator.

cc: @mruberry @albanD @glaringlee 

[ghstack-poisoned]
ethch18 added a commit that referenced this pull request Sep 28, 2020
This PR adds a C++ implementation of the TripletMarginWithDistanceLoss, for which the Python implementation was introduced in PR #43680.  It's based on PR #44072, but I'm resubmitting this to unlink it from Phabricator.

cc: @mruberry @albanD @glaringlee 

[ghstack-poisoned]
ethch18 added a commit that referenced this pull request Sep 29, 2020
This PR adds a C++ implementation of the TripletMarginWithDistanceLoss, for which the Python implementation was introduced in PR #43680.  It's based on PR #44072, but I'm resubmitting this to unlink it from Phabricator.

cc: @mruberry @albanD @glaringlee 

[ghstack-poisoned]
ethch18 added a commit that referenced this pull request Sep 29, 2020
This PR adds a C++ implementation of the TripletMarginWithDistanceLoss, for which the Python implementation was introduced in PR #43680.  It's based on PR #44072, but I'm resubmitting this to unlink it from Phabricator.

cc: @mruberry @albanD @glaringlee 

[ghstack-poisoned]
ethch18 added a commit that referenced this pull request Sep 29, 2020
This PR adds a C++ implementation of the TripletMarginWithDistanceLoss, for which the Python implementation was introduced in PR #43680.  It's based on PR #44072, but I'm resubmitting this to unlink it from Phabricator.

cc: @mruberry @albanD @glaringlee 

[ghstack-poisoned]
ethch18 added a commit that referenced this pull request Sep 29, 2020
This PR adds a C++ implementation of the TripletMarginWithDistanceLoss, for which the Python implementation was introduced in PR #43680.  It's based on PR #44072, but I'm resubmitting this to unlink it from Phabricator.

cc: @mruberry @albanD @glaringlee 

[ghstack-poisoned]
facebook-github-bot pushed a commit that referenced this pull request Sep 30, 2020
Summary:
Pull Request resolved: #45377

This PR adds a C++ implementation of the TripletMarginWithDistanceLoss, for which the Python implementation was introduced in PR #43680.  It's based on PR #44072, but I'm resubmitting this to unlink it from Phabricator.

Test Plan: Imported from OSS

Reviewed By: izdeby

Differential Revision: D24003973

fbshipit-source-id: 2d9ada7260a6f27425ff2fdbbf623dad0fb79405
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Merged 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.

Proposal: Generic Triplet-Margin Loss

8 participants