Skip to content

[Fix] fix eval bug when single processing.#14

Merged
ZwwWayne merged 3 commits intoopen-mmlab:mainfrom
Justice-Eternal:eval_check
Feb 23, 2022
Merged

[Fix] fix eval bug when single processing.#14
ZwwWayne merged 3 commits intoopen-mmlab:mainfrom
Justice-Eternal:eval_check

Conversation

@zytx121
Copy link
Collaborator

@zytx121 zytx121 commented Feb 20, 2022

Thanks for your contribution and we appreciate it a lot. The following instructions would make your pull request more healthy and more easily get feedback. If you do not understand some items, don't worry, just make the pull request and seek help from maintainers.

Motivation

fix bug in #10

Modification

Please briefly describe what modification is made in this PR.

BC-breaking (Optional)

Does the modification introduce changes that break the back-compatibility of the downstream repos?
If so, please describe how it breaks the compatibility and how the downstream projects should modify their code to keep compatibility with this PR.

Use cases (Optional)

If this PR introduces a new feature, it is better to list some use cases here, and update the documentation.

Checklist

  1. Pre-commit or other linting tools are used to fix the potential lint issues.
  2. The modification is covered by complete unit tests. If not, please add more unit test to ensure the correctness.
  3. The documentation has been modified accordingly, like docstring or example tutorials.

@zytx121 zytx121 assigned jbwang1997 and unassigned jbwang1997 Feb 20, 2022
@zytx121 zytx121 requested a review from jbwang1997 February 20, 2022 07:38
@zytx121 zytx121 changed the title fix eval bug when single processing. [Fix] fix eval bug when single processing. Feb 20, 2022
@zytx121 zytx121 linked an issue Feb 20, 2022 that may be closed by this pull request
Copy link
Collaborator

@yangxue0827 yangxue0827 left a comment

Choose a reason for hiding this comment

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

LGTM

@codecov-commenter
Copy link

codecov-commenter commented Feb 20, 2022

Codecov Report

Merging #14 (08c1955) into main (6519a36) will decrease coverage by 0.02%.
The diff coverage is 18.75%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main      #14      +/-   ##
==========================================
- Coverage   28.92%   28.90%   -0.03%     
==========================================
  Files          97       97              
  Lines        6471     6477       +6     
  Branches      969      970       +1     
==========================================
  Hits         1872     1872              
- Misses       4534     4540       +6     
  Partials       65       65              
Flag Coverage Δ
unittests 28.90% <18.75%> (-0.03%) ⬇️

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

Impacted Files Coverage Δ
mmrotate/datasets/dota.py 11.17% <18.75%> (-0.21%) ⬇️
mmrotate/models/detectors/base.py 25.00% <0.00%> (ø)
mmrotate/core/visualization/image.py 77.77% <0.00%> (ø)

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 6519a36...08c1955. Read the comment docs.

Comment on lines +239 to +240
nproc = min(4, os.cpu_count())
if nproc <= 1:
Copy link
Collaborator

Choose a reason for hiding this comment

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

Can we set the nproc as an input of the format_results function so that it can be modified by users?

Copy link
Collaborator

Choose a reason for hiding this comment

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

The user may be confused as to how much this parameter is set appropriately.

Copy link
Collaborator

Choose a reason for hiding this comment

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

We need to use a single process to call _merge_func when deadlock happened. But nproc = min(4, os.cpu_count()) is usually bigger than 1, which cannot make the program switch from `track_parallel_progress' to 'track_iter_progress'.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Baeed on previous conventions, we should add an argument of nproc in this function. Usually users can set 4 and this could accelerate the process. The users can also set 1 to avoid parallel processing manually. We can add description in the docstring and documentation.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

OK

@zytx121 zytx121 requested a review from jbwang1997 February 22, 2022 05:37
@zytx121 zytx121 requested a review from jbwang1997 February 22, 2022 07:05
Copy link
Collaborator

@jbwang1997 jbwang1997 left a comment

Choose a reason for hiding this comment

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

LGTM

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.

--eval mAP error

5 participants