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 error when data_root option in val_cfg or test_cfg are set as None #28

Merged
merged 2 commits into from
May 26, 2021

Conversation

LeoXing1996
Copy link
Collaborator

Use if-else to judge whether config is valid, and ignore configs whose data_root is None.

@codecov-commenter
Copy link

codecov-commenter commented May 21, 2021

Codecov Report

Merging #28 (2073c56) into master (0ece0cd) will decrease coverage by 0.34%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #28      +/-   ##
==========================================
- Coverage   75.67%   75.33%   -0.35%     
==========================================
  Files         107      108       +1     
  Lines        6446     6490      +44     
  Branches     1133     1140       +7     
==========================================
+ Hits         4878     4889      +11     
- Misses       1262     1295      +33     
  Partials      306      306              
Flag Coverage Δ
unittests 75.33% <ø> (-0.35%) ⬇️

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

Impacted Files Coverage Δ
mmgen/core/hooks/__init__.py 100.00% <0.00%> (ø)
mmgen/core/hooks/ceph_hooks.py 23.25% <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 0ece0cd...2073c56. Read the comment docs.

@nbei nbei self-requested a review May 24, 2021 02:57
dataset = build_dataset(cfg.data.val)
else:
elif cfg.data.get('train', None) and \
Copy link
Collaborator

Choose a reason for hiding this comment

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

Here, I may suggest that we can just use cfg.data.get('train', None). Because we assume that the train part should work well once it has been added.

@nbei nbei merged commit 9cdb810 into open-mmlab:master May 26, 2021
@LeoXing1996 LeoXing1996 deleted the eval_wo_val_imgs_root branch June 1, 2022 02:05
LeoXing1996 pushed a commit that referenced this pull request Jul 16, 2022
[Fix] Fix error when `data_root` option in val_cfg or test_cfg are set as None
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.

3 participants