Skip to content

Auto-select bundle version based on the version of MONAI #7930

Closed

Description

@mingxin-zheng

Is your feature request related to a problem? Please describe.

When version is not specified in the bundle download:

version: version name of the target bundle to download, like: "0.1.0". If `None`, will download

the current behavior is to download the latest version of the bundle available in monaihosting.

This potentially introduces an issue if user is using an older version of monai (for example, 1.3) to download a newer version of bundle (e.g. bundles developed by 1.4 and incompatible with 1.3).

Describe the solution you'd like

  1. When the download is complete, check the monai_version in the bundle metadata. Show a warning to the user, if the monai_version is larger than the current monai version used in the user's environment
    https://github.com/Project-MONAI/model-zoo/blob/69572515b848dfbd84640125e88b4f709f07d625/models/brats_mri_axial_slices_generative_diffusion/configs/metadata.json#L16

  2. On top of 1, we can consider adding a feature to further find a matched version that's compatible with the monai in user's environment. This can be implemented by iterating the metadata.json in different version of the bundle and settle once the monai_version is equal or lower than the version in the environment.

Activity

  1. mingxin-zheng commented on Jul 19, 2024

    @mingxin-zheng
    CollaboratorAuthor
  2. mingxin-zheng commented on Jul 22, 2024

    @mingxin-zheng
    CollaboratorAuthor

    On top of 1, we can consider adding a feature to further find a matched version that's compatible with the monai in user's environment. This can be implemented by iterating the metadata.json in different version of the bundle and settle once the monai_version is equal or lower than the version in the environment.

    Implementation requires

    • support of single file (configs/metadata.json) fetching from the download source.
    • check available versions via API calls

    Currently, among BUNDLE_DOWNLOAD_SRC

    • ngc
    • prviate ngc
    • monaihosting (bundle files are zipped)
    • github (bundle files are zipped)
    • huggingface (unknown)

    Is it okay to implement 2 only for ngc/private_ngc? @KumoLiu @yiheng-wang-nv

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions