[feature]: Able to use save_best option#575
Conversation
8677428 to
4c29a98
Compare
Codecov Report
@@ 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
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
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) |
There was a problem hiding this comment.
This seems to be necessary, without updating meta, the best ckpt can not be used to test.
There was a problem hiding this comment.
Why we need to update meta?
There was a problem hiding this comment.
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.
* 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>
* [Tests] Mark the ncsnpp model tests as slow * style
Change
eval_hooks.py, able to usesave_bestwhile training.