Skip to content

Conversation

@MMelQin
Copy link
Collaborator

@MMelQin MMelQin commented Sep 19, 2025

Adds a lightweight Flask-based REST wrapper to run a MONAI Deploy app (AISpleenSeg) with status and callback support, plus scripts and docs to test locally.

  • Introduces REST endpoints (/status, /process) that run the app in a background thread and optionally POST results to a callback URL
  • Provides a sample AISpleenSeg app wired into the wrapper, including pipeline composition and result reporting
  • Adds local test script and documentation for setup, data download, and endpoint testing
  • Package the REST service app as MAP with monai-deploy CLI and run the MAP container with docker run command for needing additional options such as volume mappings and environment variable passing.

@MMelQin MMelQin requested a review from Copilot September 19, 2025 01:37
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

Adds a lightweight Flask-based REST wrapper to run a MONAI Deploy app (AISpleenSeg) with status and callback support, plus scripts and docs to test locally.

  • Introduces REST endpoints (/status, /process) that run the app in a background thread and optionally POST results to a callback URL
  • Provides a sample AISpleenSeg app wired into the wrapper, including pipeline composition and result reporting
  • Adds local test script and documentation for setup, data download, and endpoint testing

Reviewed Changes

Copilot reviewed 10 out of 10 changed files in this pull request and generated 13 comments.

Show a summary per file
File Description
platforms/aidoc/restful_app/app.py Flask REST server, job lifecycle handling, and callback dispatch.
platforms/aidoc/restful_app/ai_spleen_seg_app/app.py AISpleenSeg app composition and result packaging for callback.
platforms/aidoc/restful_app/ai_spleen_seg_app/init.py Package init for AISpleenSeg; alters sys.path.
platforms/aidoc/restful_app/ai_spleen_seg_app/main.py Entrypoint to run AISpleenSeg standalone.
platforms/aidoc/restful_app/ai_spleen_seg_app/app.yaml App metadata and resource hints.
platforms/aidoc/restful_app/requirements.txt Wrapper runtime dependencies (Flask, requests, SDK, MONAI, Torch, etc.).
platforms/aidoc/restful_app/ai_spleen_seg_app/requirements.txt App-specific dependencies; overlaps with wrapper requirements.
platforms/aidoc/restful_app/env_settings_repo.sh Example environment variable settings (model/input/output).
platforms/aidoc/test_endpoints.sh Script to test endpoints and capture callback via netcat.
platforms/aidoc/README.md How-to run, test, and callback payload examples.

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@MMelQin MMelQin requested a review from Copilot September 19, 2025 05:30
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

Copilot reviewed 10 out of 10 changed files in this pull request and generated 3 comments.


Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@MMelQin MMelQin requested a review from Copilot September 19, 2025 05:53
@MMelQin MMelQin changed the title Add code and doc for making MONAI apps as RESTful service on Aidoc AIOS Making MONAI apps as REST service on Aidoc AiOS Sep 19, 2025
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

Copilot reviewed 10 out of 10 changed files in this pull request and generated 4 comments.


Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@MMelQin MMelQin changed the title Making MONAI apps as REST service on Aidoc AiOS Making MONAI Deploy apps and MAP run as REST services on Aidoc AiOS Sep 20, 2025
@MMelQin MMelQin changed the title Making MONAI Deploy apps and MAP run as REST services on Aidoc AiOS Making MONAI Deploy app and MAP run as REST services on Aidoc AiOS Sep 20, 2025
@MMelQin MMelQin requested a review from Copilot September 20, 2025 02:45
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

Copilot reviewed 10 out of 10 changed files in this pull request and generated 3 comments.


Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Copy link
Collaborator

@mocsharp mocsharp left a comment

Choose a reason for hiding this comment

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

LGTM. Tested the test_endpoints.sh script and everything look good. Thanks!

chezhia and others added 8 commits October 30, 2025 19:37
Signed-off-by: Elan Somasundaram <[email protected]>
Signed-off-by: chezhia <[email protected]>
Signed-off-by: Elan Somasundaram <[email protected]>
Signed-off-by: chezhia <[email protected]>
Signed-off-by: chezhia <[email protected]>
Signed-off-by: chezhia <[email protected]>
… of latest holoscan SDK CUDA 12 version (#565)

* Make affine and space consistent as space is properly parse by MONAI transforms

Signed-off-by: M Q <[email protected]>

* Typing improvements

Signed-off-by: M Q <[email protected]>

* Make image metadata Affine and Space consistent, either LPS or RAS

Signed-off-by: M Q <[email protected]>

* Update monai/deploy/operators/monai_seg_inference_operator.py

Co-authored-by: Copilot <[email protected]>
Signed-off-by: Ming M Qin <[email protected]>

* Correct CoPilot suggested code which failed liniting

Signed-off-by: M Q <[email protected]>

* Fix complaint from new version of mypy

Signed-off-by: M Q <[email protected]>

* Support the latest holoscan SDK CUDA 12 version, holoscan-cu12

Signed-off-by: M Q <[email protected]>

* Docs gen works with Python 3.10+

Signed-off-by: M Q <[email protected]>

* Fix complaints on single quote vs dhouble quote for string

Signed-off-by: M Q <[email protected]>

* Making docs gen require python >= 3.10

Signed-off-by: M Q <[email protected]>

* Fix docs build error on readthedocs, although local builds had no issues

Signed-off-by: M Q <[email protected]>

---------

Signed-off-by: M Q <[email protected]>
Signed-off-by: Ming M Qin <[email protected]>
Co-authored-by: Copilot <[email protected]>
* Update release notes for v3.3.0

Signed-off-by: M Q <[email protected]>

* Update the index file

Signed-off-by: M Q <[email protected]>

* Bump version: 3.2.0 → 3.3.0

Signed-off-by: M Q <[email protected]>

---------

Signed-off-by: M Q <[email protected]>
@sonarqubecloud
Copy link

Quality Gate Failed Quality Gate failed

Failed conditions
26.3% Duplication on New Code (required ≤ 3%)

See analysis details on SonarQube Cloud

@MMelQin
Copy link
Collaborator Author

MMelQin commented Oct 31, 2025

SonarQubeCloud / SonarCloud Code Analysis Quality Gate failure can be ignored, because the example in this PR deliberately reuses the same example code to illustrate how to make it an REST service for Aidoc.

@MMelQin MMelQin merged commit f17c518 into main Oct 31, 2025
4 of 5 checks passed
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.

5 participants