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

Fix an inappropriate test expression to remove a logical short circuit #2082

Conversation

munahaf
Copy link
Contributor

@munahaf munahaf commented Sep 15, 2023

In file: _mean_ap.py, the comparison of Collection length creates a logical short circuit. I suggested that the Collection length comparison should be done without creating a logical short circuit.

Sponsorship and Support:

This work is done by the security researchers from OpenRefactory and is supported by the Open Source Security Foundation (OpenSSF): Project Alpha-Omega. Alpha-Omega is a project partnering with open source software project maintainers to systematically find new, as-yet-undiscovered vulnerabilities in open source code - and get them fixed – to improve global software supply chain security.

The bug is found by running the Intelligent Code Repair (iCR) tool by OpenRefactory and then manually triaging the results.


📚 Documentation preview 📚: https://torchmetrics--2082.org.readthedocs.build/en/2082/

@mergify mergify bot added the ready label Sep 15, 2023
@codecov
Copy link

codecov bot commented Sep 15, 2023

Codecov Report

Merging #2082 (a7228a8) into master (9b21108) will decrease coverage by 49%.
The diff coverage is 0%.

Additional details and impacted files
@@           Coverage Diff            @@
##           master   #2082     +/-   ##
========================================
- Coverage      87%     37%    -49%     
========================================
  Files         287     287             
  Lines       16072   16072             
========================================
- Hits        13964    6026   -7938     
- Misses       2108   10046   +7938     

@SkafteNicki SkafteNicki added this to the v1.1.x milestone Sep 15, 2023
@Borda Borda merged commit 77a5317 into Lightning-AI:master Sep 15, 2023
63 of 64 checks passed
matsumotosan pushed a commit to matsumotosan/metrics that referenced this pull request Sep 17, 2023
Lightning-AI#2082)

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
matsumotosan pushed a commit to matsumotosan/metrics that referenced this pull request Sep 19, 2023
Lightning-AI#2082)

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
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.

3 participants