Skip to content

Checkpoint Download Automation for Bundles #4095

@ericspod

Description

@ericspod

Is your feature request related to a problem? Please describe.
The example bundle uses download_ckpt to specify how to download the checkpoint for the bundle from Huggingface. This happens when the config file it's specified is used but doesn't when doing other operations like verify_net_in_out.

Describe the solution you'd like
The specification for the URL of a checkpoint file should be made a formal concept in the metadata specification so that it's downloaded as an automated step whenever a bundle is used for anything. This would keep the tutorials repo clean of large objects and make it easier for users to get the whole bundle without having to download the dataset it's paired with. If users don't want to train or do inference but use the bundle for something else this would be easier. Since the specification makes the file models/model.pt an explicitly-defined file which is always present we can define a ckpt_url value in the metadata referring to a file to be downloaded as stored in that location if the file is missing.

Describe alternatives you've considered
I downloaded the checkpoint manually by copy-pasting the code snippet to do the download. This wasn't a mountanous workload but it would make automated operations on bundles easier to have explicit mechanisms to do this.

Additional context
The idea is to automate preparing bundles for packaging into other contexts such as a MONAI Deploy operator, so the weights have to be present for this to be done and if they need downloading that is a manual step at present.

Metadata

Metadata

Type

No type

Projects

Relationships

None yet

Development

No branches or pull requests

Issue actions