-
Notifications
You must be signed in to change notification settings - Fork 21.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update on "[pytorch] Add triplet margin loss with custom distance"
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]
- Loading branch information
Showing
630 changed files
with
19,343 additions
and
5,987 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
28 changes: 28 additions & 0 deletions
28
.circleci/cimodel/data/simple/anaconda_prune_defintions.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
from collections import OrderedDict | ||
|
||
from cimodel.data.simple.util.branch_filters import gen_filter_dict | ||
from cimodel.lib.miniutils import quote | ||
|
||
|
||
CHANNELS_TO_PRUNE = ["pytorch-nightly", "pytorch-test"] | ||
PACKAGES_TO_PRUNE = "pytorch torchvision torchaudio torchtext ignite torchcsprng" | ||
|
||
|
||
def gen_workflow_job(channel: str): | ||
return OrderedDict( | ||
{ | ||
"anaconda_prune": OrderedDict( | ||
{ | ||
"name": f"anaconda-prune-{channel}", | ||
"context": quote("org-member"), | ||
"packages": quote(PACKAGES_TO_PRUNE), | ||
"channel": channel, | ||
"filters": gen_filter_dict(branches_list=["postnightly"]), | ||
} | ||
) | ||
} | ||
) | ||
|
||
|
||
def get_workflow_jobs(): | ||
return [gen_workflow_job(channel) for channel in CHANNELS_TO_PRUNE] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.