diff --git a/laborious/activities/mlflow.py b/laborious/activities/mlflow.py index 63206a7..b5c3d8a 100644 --- a/laborious/activities/mlflow.py +++ b/laborious/activities/mlflow.py @@ -4,6 +4,7 @@ from temporalio import activity, workflow with workflow.unsafe.imports_passed_through(): from sientia_do.temporal.activities.base import BaseActivity from sientia_do.notifications.handlers import CoreNotificationHandler as NotificationHandler + from sientia_do.notifications.models import NotificationLevel from sientia_do.temporal.utils.logger import Logger from laborious.utils.repository.model_repository import MLFlowRepository from typing import Any @@ -145,6 +146,7 @@ class MLFlow(BaseActivity): notification_id='RETRAIN_MODEL_ERROR', message=f'Error retraining model {model_name}: {e}', block='retrain_model', + level=NotificationLevel.ERROR, attachment_content=trace ) self.error(trace, metadata=metadata) @@ -197,6 +199,7 @@ class MLFlow(BaseActivity): notification_id='UPDATE_PRODUCTION_MODEL_ERROR', message=f'Error updating production model {model_name}: {e}', block='update_production_model', + level=NotificationLevel.ERROR, attachment_content=trace ) self.error(trace, metadata=metadata) diff --git a/requirements.txt b/requirements.txt index fed750d..6653e74 100644 --- a/requirements.txt +++ b/requirements.txt @@ -3,5 +3,5 @@ psycopg2-binary sqlalchemy asyncua redis -git+ssh://git@github.com/Aignosi/sientia-dataops-library.git@1.3.4 -git+ssh://git@github.com/Aignosi/sientia-mlops-library.git@0.38.1 +git+ssh://git@github.com/Aignosi/sientia-dataops-library.git@1.3.5 +git+ssh://git@github.com/Aignosi/sientia-mlops-library.git@0.38.5 diff --git a/tests/laborious/activities/test_mlflow.py b/tests/laborious/activities/test_mlflow.py index 3d83736..8995157 100644 --- a/tests/laborious/activities/test_mlflow.py +++ b/tests/laborious/activities/test_mlflow.py @@ -4,6 +4,7 @@ import numpy as np from pandas import DataFrame from pytest import fixture, mark from laborious.activities.mlflow import MLFlow +from sientia_do.notifications.models import NotificationLevel @patch("laborious.activities.mlflow.MLFlowRepository") @@ -203,6 +204,7 @@ async def test_retrain_model_error(mlflow): notification_id='RETRAIN_MODEL_ERROR', message='Error retraining model test_model: Error retraining model', block='retrain_model', + level=NotificationLevel.ERROR, attachment_content=ANY ) else: @@ -266,6 +268,7 @@ async def test_update_production_model_error(mlflow): notification_id='UPDATE_PRODUCTION_MODEL_ERROR', message='Error updating production model test_model: Error updating production model', block='update_production_model', + level=NotificationLevel.ERROR, attachment_content=ANY ) else: diff --git a/values.yaml b/values.yaml index 03f681b..b488144 100644 --- a/values.yaml +++ b/values.yaml @@ -11,7 +11,7 @@ image: # This sets the pull policy for images. pullPolicy: Always # Overrides the image tag whose default is the chart appVersion. - tag: "0.2.5" + tag: "0.2.7" # 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: @@ -123,7 +123,7 @@ env: - name: GITHUB_REPO_URL value: "git@github.com:Aignosi/sientia-dataops-laborious_temporal.git" - name: GITHUB_BRANCH - value: "SIENTIAPDE-1171-criar-pipeline-de-retreino-laborious" + value: "SIENTIAPDE-1172-criar-pipeline-de-alertas-orquestrador" - name: PYTHON_APP value: "laborious.worker.worker"