Please check the type of change your PR introduces:
- [ ] Bugfix
- [x] Feature
- [ ] Code style update (formatting, renaming)
- [ ] Refactoring (no functional changes, no api changes)
- [ ] Build related changes
- [ ] Documentation content changes
- [ ] Other (please describe):
## What is the current behavior?
close #5
Related issues :
What is the new behavior?
update checkpoint model format
support for resume training in training pipeline
reading class_names attribute from checkpoint in prediction and export pipeline
change class_names in dataset to optional
adding model checkpoint update script in script/update_model.py
Checkpoint Model Format
default (required) member in checkpoint:
epoch --> number of epochs the model have been trained
state_dict -> trained model's state dict, this is the same as the entire data as the old format
optimizer_state --> optimizer state in training
config --> configuration used to train the model
additional member (if any):
class_names --> model's output class names map
metrics --> per epoch training metrics
scheduler_state -> state_dict for trainer's lr scheduler
Checklist
[x] Unit tests pass locally with my changes
[x] I have added tests that prove my fix is effective or that my feature works
[x] I have added necessary documentation (if appropriate)
[x] Any dependent changes have been merged and published in downstream modules
closes #5
Type of changes
Please check the type of change your PR introduces: - [ ] Bugfix - [x] Feature - [ ] Code style update (formatting, renaming) - [ ] Refactoring (no functional changes, no api changes) - [ ] Build related changes - [ ] Documentation content changes - [ ] Other (please describe): ## What is the current behavior?Related issues :
What is the new behavior?
class_names
attribute from checkpoint in prediction and export pipelineclass_names
in dataset to optionalscript/update_model.py
Checkpoint Model Format
default (required) member in checkpoint:
epoch
--> number of epochs the model have been trainedstate_dict
-> trained model's state dict, this is the same as the entire data as the old formatoptimizer_state
--> optimizer state in trainingconfig
--> configuration used to train the modeladditional member (if any):
class_names
--> model's output class names mapmetrics
--> per epoch training metricsscheduler_state
->state_dict
for trainer's lr schedulerChecklist
[Unreleased]
Changelog