SIENTIAPDE-1712

Refactor MinioDataFramePayload usage across activities

- Updated instances of MinioDataFramePayload initialization in Gates, MLFlow, and Storage classes to use the new from_dict method for better data reconstruction from dictionaries.
- Enhanced the PredictionProcess workflow to utilize the updated payload handling.
- Added passthrough fixtures in tests to accommodate the new from_dict method for consistent testing behavior.
This commit is contained in:
vitor-aignosi
2026-03-20 15:52:04 -03:00
parent 8789e6693f
commit 67942c45e0
12 changed files with 155 additions and 31 deletions

View File

@@ -38,8 +38,6 @@ class PredictionProcess:
8. Export Delegation: Delegates to FormatAndExportPrediction workflow
"""
cleanup_prefixes: set[str] = set()
@workflow.run
async def run(self, input_data: dict[str, Any]):
"""
@@ -90,8 +88,6 @@ class PredictionProcess:
model_config = input_data.get('model_config', {})
save_transform = input_data.get('save_transform', True)
prefix = data.cleanup_prefix()
try:
await self._run_prediction_pipeline(
input_data,
@@ -103,13 +99,12 @@ class PredictionProcess:
save_transform,
)
finally:
if self.cleanup_prefixes:
await workflow.execute_activity_method(
Activities.cleanup_minio_objects_expired,
{**metadata, 'prefix': prefix},
retry_policy=retry_policy,
start_to_close_timeout=timedelta(minutes=5),
)
await workflow.execute_activity_method(
Activities.cleanup_minio_objects_expired,
{**metadata, 'data': data},
retry_policy=retry_policy,
start_to_close_timeout=timedelta(minutes=5),
)
async def _run_prediction_pipeline(
self,