Closed
Description
🚀 Feature
Currently, objects can be loaded like this:
from ignite.handlers import Checkpoint
Checkpoint.load_objects(to_load=to_load, checkpoint=checkpoint_fp)
It would be nice to have the following as an option:
from ignite.handlers import Checkpoint
checkpointer = Checkpoint(...)
checkpointer.load_objects(to_load=to_load, filename_components={"name": name, "global_step": global_step})
In other words, pass in components of self.filename_pattern
. The Checkpoint object already has self.filename_pattern
, self.filename_prefix
, self.ext
, and it should also have the dirname
that is passed into __init__
. So most of the components of constructing the filename are already defined in the Checkpoint object. Getting the user to recreate the full file path is unnecessary.