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] Fix an error on indexing scalar metrics in analyze_result.py #518

Merged
merged 2 commits into from
Nov 5, 2021
Merged

[Fix] Fix an error on indexing scalar metrics in analyze_result.py #518

merged 2 commits into from
Nov 5, 2021

Conversation

imyhxy
Copy link
Contributor

@imyhxy imyhxy commented Nov 5, 2021

Motivation

The output json file from the test.py script could contain scalar item, but the analyze_result.py presumes the item from the result json is a list. This PR filter the scalar item before indexing them.

Checklist

Before PR:

  • Pre-commit or other linting tools are used to fix the potential lint issues.
  • Bug fixes are fully covered by unit tests, the case that causes the bug should be added in the unit tests.
  • The modification is covered by complete unit tests. If not, please add more unit test to ensure the correctness.
  • The documentation has been modified accordingly, like docstring or example tutorials.

After PR:

  • If the modification has potential influence on downstream or other related projects, this PR should be tested with those projects, like MMDet or MMSeg.
  • CLA has been signed and all committers have signed the CLA in this PR.

@codecov
Copy link

codecov bot commented Nov 5, 2021

Codecov Report

Merging #518 (c017cf2) into master (29f5121) will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #518   +/-   ##
=======================================
  Coverage   79.48%   79.48%           
=======================================
  Files         106      106           
  Lines        5975     5975           
  Branches      968      968           
=======================================
  Hits         4749     4749           
  Misses       1095     1095           
  Partials      131      131           
Flag Coverage Δ
unittests 79.48% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.


Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 29f5121...c017cf2. Read the comment docs.

tools/analysis_tools/analyze_results.py Outdated Show resolved Hide resolved
Co-authored-by: Ma Zerun <mzr1996@163.com>
@mzr1996 mzr1996 changed the title [Fix] Error on indexing scalar metrics [Fix] Fix an error on indexing scalar metrics in analyze_result.py Nov 5, 2021
Copy link
Member

@mzr1996 mzr1996 left a comment

Choose a reason for hiding this comment

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

LGTM

@mzr1996 mzr1996 merged commit dc35eb6 into open-mmlab:master Nov 5, 2021
@imyhxy imyhxy deleted the fix-analyze-result branch November 5, 2021 06:09
mzr1996 added a commit to mzr1996/mmpretrain that referenced this pull request Nov 24, 2022
…pen-mmlab#518)

* [Fix] Error on indexing scalar metrics

* [Fix] Error on indexing scalar metrics

Co-authored-by: Ma Zerun <mzr1996@163.com>

Co-authored-by: Ma Zerun <mzr1996@163.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants