Skip to content

Commit

Permalink
added process_claims.yaml
Browse files Browse the repository at this point in the history
  • Loading branch information
RHRolun committed Jan 11, 2024
1 parent 31ee528 commit 9cb68a2
Show file tree
Hide file tree
Showing 4 changed files with 483 additions and 62 deletions.
Empty file.
2 changes: 1 addition & 1 deletion lab-materials/05/05-05/detect_objects.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
aws_secret_access_key=config["DB_AWS_SECRET_ACCESS_KEY"],
use_ssl=config["LLM_ENDPOINT"].startswith("https"),)

detection_endpoint = os.environ.get("DETECTION_ENDPOINT")
detection_endpoint = os.environ.get("detection_endpoint")

def download_images(claim_id):
claim_info = db.get_claim_info(claim_id)
Expand Down
123 changes: 62 additions & 61 deletions lab-materials/05/05-05/process_claims.pipeline
Original file line number Diff line number Diff line change
Expand Up @@ -9,36 +9,37 @@
"id": "primary",
"nodes": [
{
"id": "58a00cb2-1bb2-4bba-9ad4-2c9c1964d61b",
"id": "5a1b2fe1-12c3-4c02-a958-706d09245133",
"type": "execution_node",
"op": "execute-python-node",
"app_data": {
"component_parameters": {
"pipeline_parameters": [],
"pipeline_parameters": [
"claim_id"
],
"dependencies": [
"llm_usage.py",
"templates/summary_template.txt",
"db_utils.py",
".pipeline-envs"
],
"include_subdirectories": false,
"outputs": [],
"outputs": [
"claims.json"
],
"env_vars": [],
"kubernetes_pod_annotations": [],
"kubernetes_pod_labels": [],
"kubernetes_secrets": [],
"kubernetes_shared_mem_size": {},
"kubernetes_tolerations": [],
"mounted_volumes": [],
"filename": "summarize_text.py",
"runtime_image": "quay.io/rlundber/rh1/processing_pipeline:1.1"
"filename": "get_claims.py"
},
"label": "",
"ui_data": {
"label": "summarize_text.py",
"label": "get_claims.py",
"image": "/notebook/robert-serving-test/pipelinetest/static/elyra/python.svg",
"x_pos": 382,
"y_pos": 307,
"x_pos": 217,
"y_pos": 462,
"description": "Run Python script"
}
},
Expand All @@ -53,14 +54,7 @@
},
"label": "Input Port"
}
},
"links": [
{
"id": "35ed5879-199e-4d24-b3f4-cc1a8afe4709",
"node_id_ref": "ef03ea7c-3353-4350-80a9-4bef5305b081",
"port_id_ref": "outPort"
}
]
}
}
],
"outputs": [
Expand All @@ -79,12 +73,11 @@
]
},
{
"id": "64e8b587-2a03-494e-95cc-ab9ec564202a",
"id": "e5233ced-99d5-4420-a56b-c3244f268d46",
"type": "execution_node",
"op": "execute-python-node",
"app_data": {
"component_parameters": {
"pipeline_parameters": [],
"dependencies": [
"llm_usage.py",
"templates/time_template.txt",
Expand All @@ -106,8 +99,8 @@
"ui_data": {
"label": "get_accident_time.py",
"image": "/notebook/robert-serving-test/pipelinetest/static/elyra/python.svg",
"x_pos": 382,
"y_pos": 204,
"x_pos": 555,
"y_pos": 243,
"description": "Run Python script"
}
},
Expand All @@ -125,8 +118,8 @@
},
"links": [
{
"id": "87206d57-c2c6-4474-b4da-73171e1983ad",
"node_id_ref": "ef03ea7c-3353-4350-80a9-4bef5305b081",
"id": "ee404821-8605-4bf7-bedf-93f3cf4adb7e",
"node_id_ref": "5a1b2fe1-12c3-4c02-a958-706d09245133",
"port_id_ref": "outPort"
}
]
Expand All @@ -148,12 +141,11 @@
]
},
{
"id": "39dd3fcf-0efb-4777-be63-97252d396bcb",
"id": "555e8b99-1b42-41c3-bd84-1d26889a72c9",
"type": "execution_node",
"op": "execute-python-node",
"app_data": {
"component_parameters": {
"pipeline_parameters": [],
"dependencies": [
"llm_usage.py",
"templates/location_template.txt",
Expand All @@ -175,8 +167,8 @@
"ui_data": {
"label": "get_location.py",
"image": "/notebook/robert-serving-test/pipelinetest/static/elyra/python.svg",
"x_pos": 383,
"y_pos": 110,
"x_pos": 554,
"y_pos": 460,
"description": "Run Python script"
}
},
Expand All @@ -194,8 +186,8 @@
},
"links": [
{
"id": "9c8783ce-8070-4341-9db5-bccfda250199",
"node_id_ref": "ef03ea7c-3353-4350-80a9-4bef5305b081",
"id": "d4af0f77-c5bb-4d34-b13e-fedac5f78f7a",
"node_id_ref": "5a1b2fe1-12c3-4c02-a958-706d09245133",
"port_id_ref": "outPort"
}
]
Expand All @@ -217,12 +209,11 @@
]
},
{
"id": "e8b3e0f3-af9d-4208-9a44-1adeb22e7eb6",
"id": "81e80566-39c6-4f9b-a427-92bcbc7d5c92",
"type": "execution_node",
"op": "execute-python-node",
"app_data": {
"component_parameters": {
"pipeline_parameters": [],
"dependencies": [
"llm_usage.py",
"templates/sentiment_template.txt",
Expand All @@ -244,8 +235,8 @@
"ui_data": {
"label": "get_sentiment.py",
"image": "/notebook/robert-serving-test/pipelinetest/static/elyra/python.svg",
"x_pos": 380,
"y_pos": 411,
"x_pos": 555,
"y_pos": 565,
"description": "Run Python script"
}
},
Expand All @@ -263,8 +254,8 @@
},
"links": [
{
"id": "f8959d20-0038-48b7-9529-85d18a1dba91",
"node_id_ref": "ef03ea7c-3353-4350-80a9-4bef5305b081",
"id": "2d24c482-bfba-41d5-abe6-5ea9650d6996",
"node_id_ref": "5a1b2fe1-12c3-4c02-a958-706d09245133",
"port_id_ref": "outPort"
}
]
Expand All @@ -286,12 +277,14 @@
]
},
{
"id": "b56d5db6-6d78-4976-9d2c-36d45ca2b195",
"id": "2b07dca0-af2c-4973-8cab-328bb18cecbf",
"type": "execution_node",
"op": "execute-python-node",
"app_data": {
"component_parameters": {
"pipeline_parameters": [],
"pipeline_parameters": [
"detection_endpoint"
],
"dependencies": [
"process_image.py",
"db_utils.py",
Expand All @@ -312,8 +305,8 @@
"ui_data": {
"label": "detect_objects.py",
"image": "/notebook/robert-serving-test/pipelinetest/static/elyra/python.svg",
"x_pos": 379,
"y_pos": 520,
"x_pos": 559,
"y_pos": 681,
"description": "Run Python script"
}
},
Expand All @@ -331,8 +324,8 @@
},
"links": [
{
"id": "eef24785-f69e-4585-bcb4-1b640d511990",
"node_id_ref": "ef03ea7c-3353-4350-80a9-4bef5305b081",
"id": "cd864664-1dc0-4c8e-99b6-459bc4e1c1cb",
"node_id_ref": "5a1b2fe1-12c3-4c02-a958-706d09245133",
"port_id_ref": "outPort"
}
]
Expand All @@ -354,37 +347,34 @@
]
},
{
"id": "ef03ea7c-3353-4350-80a9-4bef5305b081",
"id": "af47e64c-33fb-4881-b6ee-6ffa382a33e1",
"type": "execution_node",
"op": "execute-python-node",
"app_data": {
"component_parameters": {
"pipeline_parameters": [
"claim_id"
],
"dependencies": [
"llm_usage.py",
"templates/summary_template.txt",
"db_utils.py",
".pipeline-envs"
],
"include_subdirectories": false,
"outputs": [
"claims.json"
],
"outputs": [],
"env_vars": [],
"kubernetes_pod_annotations": [],
"kubernetes_pod_labels": [],
"kubernetes_secrets": [],
"kubernetes_shared_mem_size": {},
"kubernetes_tolerations": [],
"mounted_volumes": [],
"filename": "get_claims.py"
"filename": "summarize_text.py"
},
"label": "",
"ui_data": {
"label": "get_claims.py",
"label": "summarize_text.py",
"image": "/notebook/robert-serving-test/pipelinetest/static/elyra/python.svg",
"x_pos": 68,
"y_pos": 311,
"x_pos": 554,
"y_pos": 349,
"description": "Run Python script"
}
},
Expand All @@ -399,7 +389,14 @@
},
"label": "Input Port"
}
}
},
"links": [
{
"id": "83f30421-d0c6-4949-9150-898e47293c5e",
"node_id_ref": "5a1b2fe1-12c3-4c02-a958-706d09245133",
"port_id_ref": "outPort"
}
]
}
],
"outputs": [
Expand Down Expand Up @@ -430,16 +427,11 @@
"pipeline_defaults": {
"kubernetes_shared_mem_size": {},
"mounted_volumes": [],
"kubernetes_pod_labels": [],
"kubernetes_pod_annotations": [],
"kubernetes_tolerations": [],
"kubernetes_pod_labels": [],
"env_vars": [],
"kubernetes_secrets": [],
"env_vars": [
{
"env_var": "DETECTION_ENDPOINT",
"value": ""
}
],
"runtime_image": "quay.io/rlundber/rh1/processing_pipeline:1.2"
},
"pipeline_parameters": [
Expand All @@ -451,6 +443,15 @@
"value": 0
},
"required": true
},
{
"name": "detection_endpoint",
"description": "The endpoint where your detection model is hosted.",
"default_value": {
"type": "String",
"value": "https://your-endpoint"
},
"required": true
}
]
}
Expand Down
Loading

0 comments on commit 9cb68a2

Please sign in to comment.