Skip to content

[feature]: Able to use save_best option#575

Merged
xvjiarui merged 5 commits intoopen-mmlab:masterfrom
yinchimaoliang:add-save-best-option
Jun 2, 2021
Merged

[feature]: Able to use save_best option#575
xvjiarui merged 5 commits intoopen-mmlab:masterfrom
yinchimaoliang:add-save-best-option

Conversation

@yinchimaoliang
Copy link
Copy Markdown
Contributor

Change eval_hooks.py, able to use save_best while training.

@yinchimaoliang yinchimaoliang force-pushed the add-save-best-option branch from 8677428 to 4c29a98 Compare May 30, 2021 11:58
@codecov
Copy link
Copy Markdown

codecov bot commented May 30, 2021

Codecov Report

Merging #575 (f8fe731) into master (dc5d53b) will decrease coverage by 0.15%.
The diff coverage is 60.86%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #575      +/-   ##
==========================================
- Coverage   86.41%   86.26%   -0.16%     
==========================================
  Files         101      101              
  Lines        5279     5278       -1     
  Branches      851      854       +3     
==========================================
- Hits         4562     4553       -9     
- Misses        557      561       +4     
- Partials      160      164       +4     
Flag Coverage Δ
unittests 86.26% <60.86%> (-0.16%) ⬇️

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

Impacted Files Coverage Δ
mmseg/core/evaluation/eval_hooks.py 77.27% <60.86%> (-18.29%) ⬇️

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 dc5d53b...f8fe731. Read the comment docs.

@xvjiarui xvjiarui requested a review from xiexinch June 1, 2021 02:34
tools/train.py Outdated
PALETTE=datasets[0].PALETTE)
# add an attribute for visualization convenience
model.CLASSES = datasets[0].CLASSES
meta.update(cfg.checkpoint_config.meta)
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

This seems to be necessary, without updating meta, the best ckpt can not be used to test.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Why we need to update meta?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Right now, meta missing some keys such as CLASSES and PALETTE, so the best ckpt it saves won't have these keys, which will cause failure during test time. Updating meta will solve the problem.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

I see. Reverted.

@xvjiarui xvjiarui merged commit 9dd3e15 into open-mmlab:master Jun 2, 2021
bowenroom pushed a commit to bowenroom/mmsegmentation that referenced this pull request Feb 25, 2022
* Add  save_best option in eval_hook.

* Update meta to fix best model can not test bug

* refactor with _do_evaluate

* remove redundent

* add meta

Co-authored-by: Jiarui XU <xvjiarui0826@gmail.com>
aravind-h-v pushed a commit to aravind-h-v/mmsegmentation that referenced this pull request Mar 27, 2023
* [Tests] Mark the ncsnpp model tests as slow

* style
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.

2 participants