8000 Pass filename components into Checkpoint.load_objects · Issue #2480 · pytorch/ignite · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
Pass filename components into Checkpoint.load_objects #2480
Closed
@KevinMusgrave

Description

@KevinMusgrave

🚀 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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0