Skip to content

4948 Enhance bundle API for getting model zoo info#4994

Merged
wyli merged 7 commits intoProject-MONAI:devfrom
yiheng-wang-nv:4948-enhance-bundle-api-for-model-zoo
Sep 12, 2022
Merged

4948 Enhance bundle API for getting model zoo info#4994
wyli merged 7 commits intoProject-MONAI:devfrom
yiheng-wang-nv:4948-enhance-bundle-api-for-model-zoo

Conversation

@yiheng-wang-nv
Copy link
Copy Markdown
Contributor

@yiheng-wang-nv yiheng-wang-nv commented Aug 25, 2022

Signed-off-by: Yiheng Wang vennw@nvidia.com

Fixes #4948 .

Description

This PR is used to enhance the bundle API, and enable to get:

  1. a list of all bundles as well as their latest versions (by function get_all_bundles_list)
  2. a bundle's latest version, and all existing verions (by function get_bundle_versions)
  3. a bundle's information, include "id", "name", "size", "download_count", "browser_download_url". The information are achieved from github API directly (by function get_bundle_info)

Status

Ready

Types of changes

  • Non-breaking change (fix or new feature that would not break existing functionality).
  • Breaking change (fix or new feature that would cause existing functionality to change).
  • New tests added to cover the changes.
  • Integration tests passed locally by running ./runtests.sh -f -u --net --coverage.
  • Quick tests passed locally by running ./runtests.sh --quick --unittests --disttests.
  • In-line docstrings updated.
  • Documentation updated, tested make html command in the docs/ folder.

Signed-off-by: Yiheng Wang <vennw@nvidia.com>
@yiheng-wang-nv
Copy link
Copy Markdown
Contributor Author

Progress:

  1. I created a basic function: _get_all_bundles_info, which will request all information that we may interest of the model zoo release.
  2. based on the basic function: get_bundles_list, I created a function to get all bundle names that are stored in the release.
  3. To be added: a function that can get a specific bundle's basic information.

The output of the basic function is like:

Screen Shot 2022-08-25 at 5 54 19 PM

The output of get_bundles_list is like:

Screen Shot 2022-08-25 at 5 55 33 PM

@yiheng-wang-nv
Copy link
Copy Markdown
Contributor Author

/black

Signed-off-by: monai-bot <monai.miccai2019@gmail.com>
@Nic-Ma
Copy link
Copy Markdown
Contributor

Nic-Ma commented Aug 25, 2022

Thanks for the quick implementation.
I think we need the API to get the latest version of all the bundles and a specific bundle, and also need API to get all the versions.

Thanks.

@yiheng-wang-nv
Copy link
Copy Markdown
Contributor Author

Thanks for the quick implementation. I think we need the API to get the latest version of all the bundles and a specific bundle, and also need API to get all the versions.

Thanks.

Thanks @Nic-Ma , I will add these functions, and I think both of them can be based on _get_all_bundles_info

@yiheng-wang-nv
Copy link
Copy Markdown
Contributor Author

yiheng-wang-nv commented Sep 8, 2022

Update:

According to the suggestions from @Nic-Ma , I did some changes. Now, we have the following functions:

  1. get_all_bundles_list, all bundle names and latest versions will be returned. For example:
    Screen Shot 2022-09-08 at 5 56 51 PM

  2. get_bundle_versions, the latest version and all existing version of a specified bundle will be returned. For example:
    Screen Shot 2022-09-08 at 6 00 36 PM

  3. get_bundle_info, "id", "name", "size", "download_count", "browser_download_url" of a specified bundle and version will be returned. For example:
    Screen Shot 2022-09-08 at 6 01 54 PM

If "version" is not specified, the information of the latest version will be used in default. For example:
Screen Shot 2022-09-08 at 11 15 09 PM

@wyli
Copy link
Copy Markdown
Contributor

wyli commented Sep 12, 2022

/build

@wyli
Copy link
Copy Markdown
Contributor

wyli commented Sep 12, 2022

/build

@wyli wyli enabled auto-merge (squash) September 12, 2022 16:21
@wyli wyli merged commit af536ff into Project-MONAI:dev Sep 12, 2022
@yiheng-wang-nv yiheng-wang-nv deleted the 4948-enhance-bundle-api-for-model-zoo branch September 13, 2022 03:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add script API to get info of all the available bundles and details in the model-zoo

4 participants