SIENTIAPDE-1110

Update process_confidence method in OPC activity to include metadata parameter for improved data handling.
This commit is contained in:
vitor-aignosi
2025-06-27 10:23:52 -03:00
parent f1eba071aa
commit 82356ca3b0

View File

@@ -122,9 +122,9 @@ class OPC(BaseActivity):
tag_type='confidence'
)
return self.process_confidence(data, success)
return self.process_confidence(data, success, metadata)
def process_confidence(self, data: DataFrame, success: bool) -> dict[Any, Any]:
def process_confidence(self, data: DataFrame, success: bool, metadata: dict[str, Any]) -> dict[Any, Any]:
"""
Processes the confidence of OPC server write operations and updates the DataFrame accordingly.
@@ -138,7 +138,6 @@ class OPC(BaseActivity):
Returns:
dict[Any, Any]: The processed data as a dictionary.
"""
metadata = data['metadata']
if not success:
data['prediction_confidence'] = OPC_WRITTING_ERROR_CONFIDENCE