SIENTIAPDE-1478
Update sientia-dataops-library dependency version from 1.8.1 to 1.8.2 in requirements.txt and modify API class to accept a list of response data for PI Web API integration.
This commit is contained in:
@@ -77,7 +77,7 @@ class API(SientiaMonitoring):
|
|||||||
|
|
||||||
async def process_pi_web_api_response(
|
async def process_pi_web_api_response(
|
||||||
self,
|
self,
|
||||||
response_data: dict[str, Any],
|
response_data: list[dict[str, Any]],
|
||||||
tags: dict[str, str],
|
tags: dict[str, str],
|
||||||
core_labels: dict[str, str],
|
core_labels: dict[str, str],
|
||||||
metadata: dict[str, Any],
|
metadata: dict[str, Any],
|
||||||
@@ -110,8 +110,7 @@ class API(SientiaMonitoring):
|
|||||||
|
|
||||||
# Evaluate response for each tag
|
# Evaluate response for each tag
|
||||||
written_tags = []
|
written_tags = []
|
||||||
response_items = response_data.get('Items', [])
|
for item in response_data:
|
||||||
for item in response_items:
|
|
||||||
web_id = item.get('WebId')
|
web_id = item.get('WebId')
|
||||||
if not web_id:
|
if not web_id:
|
||||||
self.error('The response did not contain some WebIds', metadata)
|
self.error('The response did not contain some WebIds', metadata)
|
||||||
@@ -233,6 +232,8 @@ class API(SientiaMonitoring):
|
|||||||
attachment_content=trace,
|
attachment_content=trace,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
self.error(trace, metadata)
|
||||||
|
|
||||||
data['prediction_confidence'] = PI_WEB_API_PREDICTION_ERROR_CONFIDENCE
|
data['prediction_confidence'] = PI_WEB_API_PREDICTION_ERROR_CONFIDENCE
|
||||||
data['comments'] = str(e)
|
data['comments'] = str(e)
|
||||||
|
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ psycopg2-binary
|
|||||||
sqlalchemy
|
sqlalchemy
|
||||||
asyncua
|
asyncua
|
||||||
redis
|
redis
|
||||||
git+ssh://git@github.com/Aignosi/sientia-dataops-library.git@1.8.1
|
git+ssh://git@github.com/Aignosi/sientia-dataops-library.git@1.8.2
|
||||||
git+ssh://git@github.com/Aignosi/sientia-mlops-library.git@0.40.7
|
git+ssh://git@github.com/Aignosi/sientia-mlops-library.git@0.40.7
|
||||||
prometheus-client
|
prometheus-client
|
||||||
botocore
|
botocore
|
||||||
|
|||||||
Reference in New Issue
Block a user