-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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 bug when loading class name form file in custom dataset #923
Conversation
Hi @ShoupingShan |
Codecov Report
@@ Coverage Diff @@
## master #923 +/- ##
==========================================
+ Coverage 89.67% 89.90% +0.22%
==========================================
Files 114 117 +3
Lines 6431 6555 +124
Branches 1007 1019 +12
==========================================
+ Hits 5767 5893 +126
+ Misses 462 461 -1
+ Partials 202 201 -1
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Thanks for your contribution again.
Looking forward to your new PR.
tests/test_data/test_dataset.py
Outdated
import os | ||
import tempfile |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We may move the import to the top of the file.
LGTM except for one comment. |
Hi @ShoupingShan |
Hi @ShoupingShan |
fix isort lint error when move the import to the top of the file
Sorry about that, I have fixed the isort lint error. |
Hi @ShoupingShan |
…en-mmlab#923) * [Fix] open-mmlab#916 expection string type classes * add unittests for string path classes * fix double quote string in test_dataset.py * move the import to the top of the file * fix isort lint error fix isort lint error when move the import to the top of the file
dont warn for bf16 weights
expection occurs when classes variable is a string file path
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 a bug in custom.py, Exception occurs when
classes
is a string type file path .Modification
modify
classes
toclass_names
in https://github.com/ShoupingShan/mmsegmentation/blob/396070e8d2ab96d21a798907f0139fc99ba66e5c/mmseg/datasets/custom.py#L322 and https://github.com/ShoupingShan/mmsegmentation/blob/396070e8d2ab96d21a798907f0139fc99ba66e5c/mmseg/datasets/custom.py#L333add unit test in
test.dataset.py
https://github.com/ShoupingShan/mmsegmentation/blob/396070e8d2ab96d21a798907f0139fc99ba66e5c/tests/test_data/test_dataset.py#L29BC-breaking (Optional)
Does the modification introduce changes that break the backward-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.
No
Use cases (Optional)
If this PR introduces a new feature, it is better to list some use cases here, and update the documentation.
Checklist