Skip to content

Automatically download / upload models with hugging face, torch hub #4042

Closed

Description

@Nic-Ma

Is your feature request related to a problem? Please describe.
As MONAI bundle features are ready to use, it would be nice to manage bundle models with hugging face and torch hub, etc.
Like: https://huggingface.co/MONAI/example_spleen_segmentation

So it's necessary to develop features to automatically download / apply models from the hubs, may support bundle package, checkpoint, torchscript model. And for future steps, we can think about how to review new models and execute CICD before approving or uploading to the hub.

Activity

  1. Nic-Ma commented on Apr 1, 2022

    @Nic-Ma
    ContributorAuthor

    @yiheng-wang-nv is investigating requirements, ideas, solutions, will prepare a proposal soon.

    Thanks.

  2. changed the title [-]Automatically download / upload models from hugging face, torch hub[/-] [+]Automatically download / upload models with hugging face, torch hub[/+] on Apr 4, 2022
  3. Nic-Ma commented on Apr 4, 2022

    @Nic-Ma
    ContributorAuthor

    Hi @yiheng-wang-nv ,

    In my simple mind, I think maybe we can start from the download features and think about below initial ideas first:

    1. Use cases to download with CLI python -m monai.bundle download XXX:
      1.1. download the whole bundle package
      1.2. download the model weights
      1.3. download the TorchScript model
      1.4. download any file, refer to: https://huggingface.co/docs/hub/how-to-downstream
    2. Data source:
      2.1. bundle packages on hugging face
      2.2. (P1) bundle packages on NVIDIA NGC
      2.3. (P1) bundle packages on amazon AWS
      (I think torch hub is just APIs, no storage)
    3. Support 3rd APIs for advanced features:
      3.1. use torch.hub.XXX, refer to: https://github.com/huggingface/transformers/blob/main/hubconf.py
      3.2. (P1) use hugging face API, refer to: https://huggingface.co/docs/hub/adding-a-library
    4. Update the tutorial example to show features.

    Thanks.

  4. added a commit that references this issue on Oct 19, 2023
    6e5fdc0
  5. moved this to ✅ Done in MONAI Core Backlogon Oct 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

Type

No type

Projects

Relationships

None yet

Development

No branches or pull requests

Issue actions