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

Added a sample integration for LLM models in huggingface #494

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

vikashg
Copy link
Collaborator

@vikashg vikashg commented Jun 17, 2024

I have added a sample application for LLM models integration from huggingface in monai-deploy-app-sdk. This feature was discussed in #489

The specific model which was integrated in this example is called Prompt2MedImage

Things to do:

  • We need to create an operator for LLM model integration
  • For this particular example, I need to add a JPEG2DICOM converter. For the JPEG2DICOM, we should be able to bring in DICOM metadata from an existing patient data. In absence of such patient data, we should populate the dicom tags with a place holder "John Smith" metadata information.
  • LLMs need specific libraries like transformers and hub (any many more for pre and post processing text data). We need to add these libraries as "optional" requirements for monai-deploy-app-sdk.

Vikash Gupta added 2 commits June 17, 2024 10:32
Signed-off-by: Vikash Gupta <gupta.vikash@mayo.edu>
Signed-off-by: Vikash Gupta <gupta.vikash@mayo.edu>
@vikashg vikashg requested a review from MMelQin June 17, 2024 14:40
Copy link
Collaborator

@MMelQin MMelQin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please fix the formatting error before merging, shown in the build / test action:
2024-06-17 14:42:25 $ python3 -m isort --check /home/runner/work/monai-deploy-app-sdk/monai-deploy-app-sdk
ERROR: /home/runner/work/monai-deploy-app-sdk/monai-deploy-app-sdk/examples/apps/hugging_face_integration_app/med_image_generation/app.py Imports are incorrectly sorted and/or formatted.
Skipped 6 files
isort check failed!
Please run auto style fixes: ./run check --autofix
Error: Process completed with exit code 1.

@vikashg
Copy link
Collaborator Author

vikashg commented Dec 13, 2024

@MMelQin When I try to run autofix, I get the following error

root@20e8f0568062:/workspace/app/monai-deploy-app-sdk# ./run check --autofix
DO_DRY_RUN: false
do_black_format: true
do_black_fix: true
do_isort_format: true
do_isort_fix: true
do_flake8_format: false
do_pytype_format: false
do_mypy_format: false
Checking import of module 'monai.deploy'...
2024-12-13 21:03:40 $ python3 -c import monai.deploy
/workspace/app/monai-deploy-app-sdk/monai/deploy/utils/importutil.py:20: UserWarning: Module monai was already imported from None, but /workspace/app/monai-deploy-app-sdk is being added to sys.path
  import pkg_resources
Fixing import order...
You must be in a virtual environment to install dependencies.
Please activate the virtual environment at /workspace/app/monai-deploy-app-sdk/.venv/dev and execute the setup command again.

  source /workspace/app/monai-deploy-app-sdk/.venv/dev/bin/activate
  ./run check --autofix

Can you please suggest how do I fix this. I tried to activate the venv but I get the following error

bash: /workspace/app/monai-deploy-app-sdk/.venv/dev/bin/activate: No such file or directory

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.

2 participants