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 cosine similarity metric #3203

Merged
merged 22 commits into from
Mar 19, 2024
Merged

Add cosine similarity metric #3203

merged 22 commits into from
Mar 19, 2024

Conversation

kzkadc
Copy link
Contributor

@kzkadc kzkadc commented Mar 14, 2024

Fixes #3202

Description:

Check list:

  • New tests are added (if a new feature is added)
  • New doc strings: description and/or example code are in RST format
  • Documentation is updated (if required)

Copy link
Collaborator

@vfdev-5 vfdev-5 left a comment

Choose a reason for hiding this comment

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

Thanks a lot for the PR @kzkadc !
I think we can put this implementation to ignite.metrics instead of contrib metrics as it does not have any 3rd party dependencies.

Let's also write a test to verify the correctness

ignite/contrib/metrics/cosine_similarity.py Outdated Show resolved Hide resolved
kzkadc and others added 2 commits March 18, 2024 15:19
@vfdev-5
Copy link
Collaborator

vfdev-5 commented Mar 18, 2024

@kzkadc thanks for the update. Let's put this implementation to ignite.metrics instead of contrib metrics

@kzkadc
Copy link
Contributor Author

kzkadc commented Mar 18, 2024

@vfdev-5 Thank you for your review! I moved it to igite.metrics.
I will also try to write a test.

@vfdev-5
Copy link
Collaborator

vfdev-5 commented Mar 18, 2024

@kzkadc if auto code-formatting GH action is bothering you, you can disable it from your fork. https://github.com/pytorch/ignite/actions/workflows/code-style.yml

@github-actions github-actions bot added docs module: metrics Metrics module labels Mar 19, 2024
Copy link
Collaborator

@vfdev-5 vfdev-5 left a comment

Choose a reason for hiding this comment

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

Thanks a lot for the PR @kzkadc !

@vfdev-5 vfdev-5 enabled auto-merge (squash) March 19, 2024 23:21
@vfdev-5 vfdev-5 merged commit 27deb45 into pytorch:master Mar 19, 2024
13 of 18 checks passed
@vfdev-5
Copy link
Collaborator

vfdev-5 commented Mar 20, 2024

Hi @kzkadc , sorry, I was too quick to merge this PR which actually has failing xla job: https://github.com/pytorch/ignite/actions/runs/8351321508/job/22859463184
Could you please fix it in a follow-up PR?

@kzkadc
Copy link
Contributor Author

kzkadc commented Mar 20, 2024

@vfdev-5 sorry for my mistake. I fixed it in #3213.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add cosine similarity metric
2 participants