Create @fhir.predict() decorator for simplified ML model deployment#146
Create @fhir.predict() decorator for simplified ML model deployment#146rohan-019 wants to merge 9 commits intodotimplement:mainfrom
Conversation
Signed-off-by: rohan-019 <rohan18126@gmail.com>
Signed-off-by: rohan-019 <rohan18126@gmail.com>
Signed-off-by: rohan-019 <rohan18126@gmail.com>
Signed-off-by: rohan-019 <rohan18126@gmail.com>
Signed-off-by: rohan-019 <rohan18126@gmail.com>
Signed-off-by: rohan-019 <rohan18126@gmail.com>
Signed-off-by: rohan-019 <rohan18126@gmail.com>
|
Hi @rohan-019, just a heads up that you can run the tests and code formatting locally before pushing. There are instructions in the Contributing.md file. |
Hey @adamkells |
|
Hey @jenniferjiangkells |
|
@rohan-019 Thanks for the PR. After reviewing, this issue is now out of scope for the project, and the current changes don’t meet the bar for demonstrated understanding of the codebase, so I’m going to close this. Please also avoid “please review!!” comments; maintainers review contributions as time permits. |
🧠 Add
@fhir.predict()Decorator for Simplified ML Model DeploymentCloses : #143
Summary
This PR introduces a new
@fhir.predict()decorator in theBaseFHIRGatewayto make deploying machine learning models as FHIR-compliant endpoints simpler and more consistent. It abstracts the boilerplate involved in constructing FHIR resources, letting developers focus purely on model inference logic.Key Features
@fhir.predict(resource=RiskAssessment)floatordict) into FHIRRiskAssessmentresources.Implementation Details
healthchain/gateway/fhir/base.py:_wrap_prediction()to construct FHIR-compliant resources._execute_handler()to handle async/sync predictions.predict()decorator to register ML endpoints.tests/gateway/test_base_fhir_gateway.py.Example Usage
Automatically serves a FHIR endpoint:
GET /predict/RiskAssessment/{id}Response:
Checklist