SIENTIAPDE-1712
SIENTIAPDE-1712 Add timestamp column to processed data in MLFlow and improve dataframe validation in MinioDataFramePayload - Added a 'timestamp' column to the processed data in the MLFlow class for better tracking of data entries. - Updated the validation check in MinioDataFramePayload to handle None values for the dataframe more explicitly.
This commit is contained in:
@@ -149,6 +149,8 @@ class MLFlow(MinioManager):
|
|||||||
data.columns.name = None
|
data.columns.name = None
|
||||||
data.index.name = None
|
data.index.name = None
|
||||||
|
|
||||||
|
data['timestamp'] = data.index
|
||||||
|
|
||||||
self.debug(f'Processed input data: \n {data.to_csv()}', metadata)
|
self.debug(f'Processed input data: \n {data.to_csv()}', metadata)
|
||||||
|
|
||||||
# Request transformation from MLFlow model
|
# Request transformation from MLFlow model
|
||||||
|
|||||||
@@ -194,7 +194,7 @@ class MinioDataFramePayload:
|
|||||||
MinioDataFramePayload: Instance with data and/or MinIO fields set.
|
MinioDataFramePayload: Instance with data and/or MinIO fields set.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
if not dataframe or dataframe.empty:
|
if dataframe is None or dataframe.empty:
|
||||||
return cls(
|
return cls(
|
||||||
data=None, last_timestamp=now().strftime(DATETIME_FORMAT_WITH_TZ), status=status
|
data=None, last_timestamp=now().strftime(DATETIME_FORMAT_WITH_TZ), status=status
|
||||||
)
|
)
|
||||||
|
|||||||
Reference in New Issue
Block a user