Project-MONAI/MONAILabel

Possible enhancements of `monailabel/utils/others/generic.py`

yiheng-wang-nv opened this issue · 5 comments

I viewed the code of this file, and found some places that may have issues or can be enhanced.

  1. https://github.com/Project-MONAI/MONAILabel/blob/f0d3c6b8258301aaff18606b2c5a5a376f4714d4/monailabel/utils/others/generic.py#L349:L356
    I think here can define a function for this part, and then another place can also call this function.
  2. It seems now we cannot support to download ngc bundles with specified version number (see:
    download(name=k, bundle_dir=model_dir, source=zoo_source)
    ), should we also support it?

For 1, these two logics are a bit different. But it could be optimized..

For 2, we didn't have the logic to fetch bundle version from NGC right? If users want to provide the version, we can support it. If users don't know the version, we prefer to always download the latest.

For 1, these two logics are a bit different. But it could be optimized..

For 2, we didn't have the logic to fetch bundle version from NGC right? If users want to provide the version, we can support it. If users don't know the version, we prefer to always download the latest.

Hi @tangy5 ,

Can we support the user-specified bundle version for the download function here?

Thanks.

For 1, these two logics are a bit different. But it could be optimized..
For 2, we didn't have the logic to fetch bundle version from NGC right? If users want to provide the version, we can support it. If users don't know the version, we prefer to always download the latest.

Hi @tangy5 ,

Can we support the user-specified bundle version for the download function here?

Thanks.

yes, we can. Will add this.

for 2, it supports well. For 1, we can't directly make it a separate function due to different user behavior at different apps and env. Thanks.