Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to run the prostate-mri-lesion-seg tutorial notebook using jupyter #343

Closed
deepakri201 opened this issue Nov 30, 2023 · 6 comments
Closed
Assignees

Comments

@deepakri201
Copy link

deepakri201 commented Nov 30, 2023

Hi,

Describe the bug

I am working with @fedorov, and I'm trying to run the tutorial.ipynb using jupyter. Unfortunately, I get the following error when using !monai-deploy package:

image

To Reproduce

Steps to reproduce the behavior:

  1. I have followed the instructions and have a prostate_mri_lesion_seg folder with the following files:
    • models downloaded from Google Drive in /monai_deploy_prostate/prostate_mri_lesion_seg_app/models
    • .py files for the app downloaded from GitHub in /monai_deploy_prostate/prostate_mri_lesion_seg_app
    • ProstateX data downloaded from Google Drive in /monai_deploy_prostate/test_data/ProstateX-0004
  2. I have created an environment and run pip install monai-deploy-app-sdk==0.5.1 as written the instructions, as well as installed additional dependencies such as pydicom ,highdicom, jupyter, etc.
  3. When I run the following cell in the tutorial.ipynb notebook, I get the error above where the app does not exist.

Environment (please complete the following information):

  • OS = Ubuntu 20.04
  • Python version = 3.8.10
  • MONAI version [e.g. git commit hash] = 1.3.0
  • CUDA/cuDNN version = CUDA version 12.0
  • GPU models and configuration = A100X-8C

Thank you!

Deepa

@fedorov
Copy link

fedorov commented Dec 1, 2023

Notably, the error seems to be the same as in #342.

@jtetrea jtetrea self-assigned this Dec 1, 2023
@jtetrea
Copy link
Contributor

jtetrea commented Dec 1, 2023

Thanks for giving the code a try @deepakri201!

The only thing that I can really give feedback based on the error you shared is to make sure that the notebook and the repository are in the right location...the notebook is originally designed to be executed right alongside the application folder, just as it is in the repository. I see that you changed the reference of the folder to an absolute path instead of the relative one...this shouldn't cause an error, but please verify location on your system is referenced properly. Otherwise try keeping as-is and executing alongside application code.

@fedorov I see the issue that you raised in #342 when trying to execute on Colab that is also similar. If you just run the notebook in Colab without cloning the full repository files, it will not be able to build the container.

@deepakri201
Copy link
Author

Thanks for responding!

I was able to fix the above error (I had the wrong path name). Now I'm able to run the !monai-deploy package successfully, and also run the load_and_visualize_dicom_image.

However now I am running the following command !monai-deploy run lesion_seg_workflow_app:v1.0 {dcm_dir} output and get the following error about the organ model not being found:

image

I've downloaded the models from the Google drive folder, and placed them in prostate_mri_lesion_seg_app/models as the tutorial says. This is what my folder structure looks like:

image

I've also verified that the model.ts file does in fact exist in the organ folder.

Am I supposed to put the models in a different folder? Thanks!

Deepa

@jtetrea
Copy link
Contributor

jtetrea commented Dec 12, 2023

Hey @deepakri201 ...that is strange. I am not sure what would be causing this error. I tried some different version of MONAI (I was originally testing with 1.2.0, but 1.3.0 is now available) but I couldn't reproduce. I am using monai==1.3.0 and monai-deploy-app-sdk==0.5.1. Are these the versions you are using?

A way to verify directly would be to try to look inside the docker container with a command like:
docker run --rm -it --entrypoint=/bin/bash lesion_seg_workflow_app:v1.0

This will open a shell in the container and you could look in the /opt/monai/app/models folder and see if the right model is there. If not, then that is the issue and the container is not properly copying in the models during the build. I see nothing wrong with your folder structure or naming, but maybe something else. Please give this a try and let me know.

@deepakri201
Copy link
Author

Hi @jtetrea,

I checked my version numbers and I'm also using monai==1.3.0 and monai-deploy-app-sdk==0.5.1.

Interestingly, I re-ran everything (!monai-deploy package and !monai-deploy run), and now it seems to find the model just fine :) I was able to go through the notebook without any further issues.

Thank you for your help!

Deepa

@jtetrea
Copy link
Contributor

jtetrea commented Dec 13, 2023

That is great news! We appreciate your interest in this model. Please reach out if needed as you continue using it. Cheers!

@jtetrea jtetrea closed this as completed Dec 13, 2023
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

No branches or pull requests

3 participants