[Fix] fix eval bug when single processing.#14
Conversation
Codecov Report
@@ 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
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
mmrotate/datasets/dota.py
Outdated
| nproc = min(4, os.cpu_count()) | ||
| if nproc <= 1: |
There was a problem hiding this comment.
Can we set the nproc as an input of the format_results function so that it can be modified by users?
There was a problem hiding this comment.
The user may be confused as to how much this parameter is set appropriately.
There was a problem hiding this comment.
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'.
There was a problem hiding this comment.
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.
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