SIENTIAPDE-1222
Update image tag in values.yaml and enhance debug logging in Gates and MLFlow activities - Updated the image tag in values.yaml from '0.0.1' to '0.0.2'. - Improved debug logging in the Gates activity to format input data and filters for better readability. - Enhanced MLFlow activity logging to include formatted output for raw and transformed response data, ensuring consistent logging format.
This commit is contained in:
@@ -206,8 +206,8 @@ class Gates(BaseActivity):
|
||||
|
||||
filter_output = []
|
||||
|
||||
self.debug(create_sample_dict(
|
||||
data, max_items=5, max_depth=2), metadata)
|
||||
self.debug(f"Input data: \n {create_sample_dict(
|
||||
data, max_items=5, max_depth=2)}", metadata)
|
||||
self.debug(f"Filters: {filters}", metadata)
|
||||
|
||||
comments = []
|
||||
@@ -293,7 +293,7 @@ class Gates(BaseActivity):
|
||||
filter_output = []
|
||||
|
||||
self.debug(f"Input data:\n {data.head(5).to_string()}", metadata)
|
||||
self.debug(create_sample_dict(filters), metadata)
|
||||
self.debug(f"Filters: \n {create_sample_dict(filters)}", metadata)
|
||||
|
||||
for fil, config in filters.items():
|
||||
if fil not in mlflow_content_filter_functions:
|
||||
|
||||
@@ -161,9 +161,8 @@ class MLFlow(BaseActivity):
|
||||
model_name, data, model_config
|
||||
)
|
||||
|
||||
self.debug("Transform raw response data:", metadata)
|
||||
self.debug(create_sample_dict(
|
||||
response_data), metadata)
|
||||
self.debug(f"Transform raw response data: \n {create_sample_dict(
|
||||
response_data)}", metadata)
|
||||
|
||||
if response_data['success']:
|
||||
|
||||
@@ -194,9 +193,8 @@ class MLFlow(BaseActivity):
|
||||
|
||||
response_data['content'] = response_dataframe.to_dict()
|
||||
|
||||
self.debug("Transform response data:", metadata)
|
||||
self.debug(create_sample_dict(
|
||||
response_data), metadata)
|
||||
self.debug(f"Transform response data: \n {create_sample_dict(
|
||||
response_data)}", metadata)
|
||||
|
||||
self.info("Data transformed successfully", metadata)
|
||||
|
||||
@@ -248,9 +246,8 @@ class MLFlow(BaseActivity):
|
||||
model_name, data, model_config
|
||||
)
|
||||
|
||||
self.debug("Prediction response data:", metadata)
|
||||
self.debug(create_sample_dict(
|
||||
response_data), metadata)
|
||||
self.debug(f"Prediction response data: \n {create_sample_dict(
|
||||
response_data)}", metadata)
|
||||
|
||||
self.info("Data predicted successfully", metadata)
|
||||
|
||||
|
||||
@@ -24,6 +24,7 @@ class MLFlowRepository():
|
||||
self.model_serving = ModelServing(tracking_uri=host,
|
||||
username=username, password=password,
|
||||
logger=logger)
|
||||
self.logger = logger
|
||||
|
||||
def transform(self, model_name: str, data: pd.DataFrame, model_config: dict) -> dict:
|
||||
"""
|
||||
@@ -90,7 +91,8 @@ class MLFlowRepository():
|
||||
|
||||
end_time = datetime.now()
|
||||
data = pd.DataFrame(data, columns=['prediction'])
|
||||
self.logger.info(f"Data: {data.to_string()}")
|
||||
self.logger.info(
|
||||
f"Data received from model prediction: {data.to_string()}")
|
||||
data.index = input_index
|
||||
data['response_time'] = (end_time - start_time).total_seconds()
|
||||
|
||||
|
||||
@@ -11,9 +11,9 @@ image:
|
||||
# This sets the pull policy for images.
|
||||
pullPolicy: Always
|
||||
# Overrides the image tag whose default is the chart appVersion.
|
||||
tag: "0.0.1"
|
||||
tag: "0.0.2"
|
||||
|
||||
# This is for the secrets for pulling an image from a private repository more information can be found here: https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/
|
||||
0# This is for the secrets for pulling an image from a private repository more information can be found here: https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/
|
||||
imagePullSecrets:
|
||||
- name: docker-hub-secret
|
||||
# This is to override the chart name.
|
||||
|
||||
Reference in New Issue
Block a user