You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
Bundles can be specified to depend on optional packages through the optional_packages_version in metadata.json. Some bundles may require certain packages so a required_packages_version may be needed, or a change in name for optional_packages_version.
Describe the solution you'd like
Some way of specifying what packages other Pytorch, Numpy, and MONAI are needed by a bundle.
Describe alternatives you've considered
I've used optional_packages_version to specify needed packages but this doesn't seem adequate.
The issue is that there are required packages that a bundle absolutely needs and packages that would nice to have but not strictly needed. These two aren't differentiated in the json file and I felt there should be, or we change the name to required_packages_version to make it clear these packages are needed and not worry about having things optional.
Yes we do need a new schema. I wanted to update it to try to take into account non-tensor arguments as well as arbitrary argument names. It currently isn't quite correct without so I need to do some looking into JSON schema definitions and get to that.
What non-tensor arguments and arbitrary argument names did you refer to?
Currently the schema allows only tensor arguments to a network's forward pass and we need to take into account other types. The initial design intent was to capture what tensor values are needed for input but to be a complete specification we need to account for other things. For outputs it might be the same thing where we need to account for more than just tensors as output, and different numbers of outputs.
Activity
ericspod commentedon Sep 7, 2023
I don't think this is a really high priority item, but we should update the metadata schema some time anyway.
KumoLiu commentedon Nov 21, 2023
Hi @ericspod, for now, if
optional_packages_versionis in "metadata.json", it will add these packages to requirements.txt. Doesn't this currently meet the request, or do you think it would be better to change the name torequired_packages_version?https://github.com/Project-MONAI/model-zoo/blob/8845f3a04766e254b156c23fc4d2f91659c056d4/ci/get_bundle_requirements.py#L39
ericspod commentedon Nov 21, 2023
The issue is that there are required packages that a bundle absolutely needs and packages that would nice to have but not strictly needed. These two aren't differentiated in the json file and I felt there should be, or we change the name to
required_packages_versionto make it clear these packages are needed and not worry about having things optional.fix Project-MONAI#6959
KumoLiu commentedon Nov 23, 2023
Hi @Ericspo, I think we also need to create a new schema and update all bundles. What do you think?
https://github.com/Project-MONAI/model-zoo/blob/f20f894f2c0993c94184c7002529ea303a2f8c74/models/brats_mri_segmentation/configs/metadata.json#L2C16-L2C120
ericspod commentedon Nov 23, 2023
Yes we do need a new schema. I wanted to update it to try to take into account non-tensor arguments as well as arbitrary argument names. It currently isn't quite correct without so I need to do some looking into JSON schema definitions and get to that.
KumoLiu commentedon Nov 24, 2023
What non-tensor arguments and arbitrary argument names did you refer to?
I also considering updating the output definition in the schema. For the raw output of the network, it is possible that there is more than just a single tensor, do you think we need to consider them all? Look like now we are defining the raw output of the network. But sometimes the output can be more complicated(such as detection).
#6724
https://github.com/Project-MONAI/model-zoo/blob/f20f894f2c0993c94184c7002529ea303a2f8c74/models/endoscopic_tool_segmentation/configs/metadata.json#L78
ericspod commentedon Nov 24, 2023
Currently the schema allows only tensor arguments to a network's forward pass and we need to take into account other types. The initial design intent was to capture what tensor values are needed for input but to be a complete specification we need to account for other things. For outputs it might be the same thing where we need to account for more than just tensors as output, and different numbers of outputs.
Adding metadata schema to the code base itself (#7409)
Rename `optional_packages_version` to `required_packages_version` (Pr…