[BUG] Unable to run ai_unetr_seg_app due to missing traced model
Hi,
it is not possible to run the ai_unetr_seg_app example, because provided model is not traced. When I get the model from Model Zoo large_files.yml:
"https://developer.download.nvidia.com/assets/Clara/monai/tutorials/model_zoo/model_swin_unetr_btcv_segmentation_v1.pt"
I am hitting an exception:
monai.deploy.exceptions.ItemNotExistsError: A predictor of the model is not set.
Please kindly provide a TorchScript model to test the application.
Thanks
This example app is fairly old now, I recall there was an issue when scripting/tracing the model and maybe the reason why a TorchScript model file is no in the MONAI Model Zoo.
We have two options:
- Try to trace/script the model again
- Create a custom inference operator based off of the base class, and explicitly loads up the Torch model in the application code (the built-in Model Factory is limited to loading the TrochScript models and model folder for the Triton Inference service)
Loading Torch model is straightforward, and I will look to expand the supported Model format in the Model Factory.
@MMelQin @kavmar. I'll add a torchscript model to test the app - no reason why this shouldn't exist.
@MMelQin @kavmar https://github.com/Project-MONAI/model-zoo/pull/747