diff --git a/laborious/activities/gates.py b/laborious/activities/gates.py index cbebebe..c88b59a 100644 --- a/laborious/activities/gates.py +++ b/laborious/activities/gates.py @@ -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: diff --git a/laborious/activities/mlflow.py b/laborious/activities/mlflow.py index 5b449e0..33d9aeb 100644 --- a/laborious/activities/mlflow.py +++ b/laborious/activities/mlflow.py @@ -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) diff --git a/laborious/utils/repository/model_repository.py b/laborious/utils/repository/model_repository.py index 77da23b..9d1cf64 100644 --- a/laborious/utils/repository/model_repository.py +++ b/laborious/utils/repository/model_repository.py @@ -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() diff --git a/values.yaml b/values.yaml index b2ae84e..4eb83d7 100644 --- a/values.yaml +++ b/values.yaml @@ -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.