SIENTIAPDE-1273

Update dependencies and refactor data handling in various modules

- Updated sientia-dataops-library dependency version from 1.5.3 to 1.5.4 in requirements files.
- Updated sientia-mlops-library dependency version from 0.39.0 to 0.40.2 in requirements files.
- Refactored return types in Gates, MLFlow, and ModelMetrics classes to return dictionaries instead of DataFrames for improved compatibility with downstream systems.
- Removed the temporal_codec module as it is no longer needed for DataFrame serialization.
- Adjusted data handling in the Drift workflow to ensure proper data structure is maintained.
This commit is contained in:
vitor-aignosi
2025-11-17 09:58:55 -03:00
parent d2b365a34d
commit c8b809f189
9 changed files with 40 additions and 177 deletions

View File

@@ -423,7 +423,7 @@ class MLFlow(SientiaMonitoring):
@activity.defn(name='get_reference_data')
async def get_reference_data(self, input_data: dict[str, Any]) -> DataFrame | None:
async def get_reference_data(self, input_data: dict[str, Any]) -> list[dict[Hashable, Any]] | None:
"""
Get reference data from the MLflow Model Registry.
@@ -433,7 +433,7 @@ class MLFlow(SientiaMonitoring):
- model_name (str): Name of the MLFlow model to get reference data from
Returns:
dict[Hashable, Any] | None: Reference data from the MLflow Model Registry.
list[dict[Hashable, Any]] | None: Reference data from the MLflow Model Registry.
"""
@@ -452,4 +452,4 @@ class MLFlow(SientiaMonitoring):
reference_data['timestamp'] = to_datetime(reference_data['timestamp'])
reference_data['timestamp'] = reference_data['timestamp'].dt.strftime(DATETIME_FORMAT)
return reference_data
return reference_data.to_dict(orient='records')