pytorch/ignite

Checkpoint stateful handlers and metrics

Open

#966 建立於 2020年4月22日

在 GitHub 查看
 (3 留言) (4 反應) (0 負責人)Python (602 fork)batch import
enhancementhelp wantedmodule: metrics

倉庫指標

Star
 (4,313 star)
PR 合併指標
 (平均合併 18天 23小時) (30 天內合併 19 個 PR)

描述

🚀 Feature

Things that are attached to the Engine might have state that would ideally be checkpointed and restored using as part of the Engine's state_dict.

An example is a Checkpoint handler when it has a score_function. Currently, the priorities the Checkpoint class stores is not saved anywhere. It is not able to recover gracefully from failure without manual intervention to parse the checkpoint path names, and directly setting the internals of the class.

Handlers and Metrics should have state_dict and load_state_dict methods (empty by default), and I think it should be possible for these to automatically make it into/restored from the Engine's state_dict when it's attached to an Engine.

貢獻者指南