From d71c45e61dc6a29b61e254ea60ee1612e66e4fbe Mon Sep 17 00:00:00 2001 From: vitor-aignosi Date: Fri, 27 Mar 2026 14:28:13 -0300 Subject: [PATCH] SIENTIAPDE-1712 SIENTIAPDE-1712 Add 'on_conflict' parameter to PredictionsBatch and PredictionProcess classes for improved conflict handling during predictions. --- laborious/workflows/predictions_batch.py | 1 + laborious/workflows/sub_workflows/prediction_process.py | 2 ++ 2 files changed, 3 insertions(+) diff --git a/laborious/workflows/predictions_batch.py b/laborious/workflows/predictions_batch.py index 36e2e97..e68c215 100644 --- a/laborious/workflows/predictions_batch.py +++ b/laborious/workflows/predictions_batch.py @@ -117,6 +117,7 @@ class PredictionsBatch: 'model_config': input_data.get('model_config', {}), 'path_priority': input_data.get('path_priority', ['STOP', 'CONTINUE', 'REPEAT']), 'opc_output_config': input_data.get('opc_output_config', {}), + 'on_conflict': input_data.get('on_conflict', 'error'), 'pi_web_api_output_config': input_data.get('pi_web_api_output_config', {}), 'prediction_store_policy': input_data.get('prediction_store_policy', 'lts:1'), 'save_transform': input_data.get('save_transform', True), diff --git a/laborious/workflows/sub_workflows/prediction_process.py b/laborious/workflows/sub_workflows/prediction_process.py index 7c4d702..da4125b 100644 --- a/laborious/workflows/sub_workflows/prediction_process.py +++ b/laborious/workflows/sub_workflows/prediction_process.py @@ -228,6 +228,7 @@ class PredictionProcess: 'subworkflow.format_and_export_prediction', { 'metadata': metadata, + 'on_conflict': input_data.get('on_conflict', 'error'), 'path_flag': path_flag, 'data': predicted_data, 'transformed_data': transformed_data if save_transform else None, @@ -337,6 +338,7 @@ class PredictionProcess: 'opc_output_config': input_data['opc_output_config'], 'pi_web_api_output_config': input_data['pi_web_api_output_config'], 'prediction_store_policy': input_data['prediction_store_policy'], + 'on_conflict': input_data.get('on_conflict', 'error'), }, ) return True