Pass filename components into Checkpoint.load_objects
See original GitHub issue🚀 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.
Issue Analytics
- State:
- Created 2 years ago
- Reactions:1
- Comments:7 (4 by maintainers)
Top Results From Across the Web
Checkpoint — PyTorch-Ignite v0.4.10 Documentation
Helper method to apply load_state_dict on the objects from to_load . Filename components such as name, score and global state can be configured....
Read more >ignite/checkpoint.py at master · pytorch/ignite - GitHub
This class stores a single file as a dictionary of provided objects to save. The filename is defined by ``filename_pattern`` and by default...
Read more >checkpoint file name dynamically - MSDN - Microsoft
How do I pass checkpoint file name location dynamically ? For example. We have several SSIS packages and all of them using checkpoints....
Read more >Splitting a Filename into Its Component Parts - Perl Cookbook ...
The fileparse function can be used to extract the extension. To do so, pass fileparse the path to decipher and a regular expression...
Read more >Solved: help with a script - Check Point CheckMates
txt filename. but lately (maybe from some ver upgrade) it failed to save the filename with $hostname, so it's only save it with...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@sdesrozis looks good to me as well. I was also wondering if we could make the method signature as
basically, fetching filename_components as kwargs and rarely used
load_kwards
as a dictI see, that makes sense. Let me see what can be done for that.