Merge pull request #13 from Aignosi/SIENTIAPDE-1172-criar-pipeline-de-alertas-orquestrador

Sientiapde 1172 criar pipeline de alertas orquestrador
This commit is contained in:
Bruno Domingues
2025-08-04 10:02:56 -03:00
committed by GitHub
4 changed files with 10 additions and 4 deletions

View File

@@ -4,6 +4,7 @@ from temporalio import activity, workflow
with workflow.unsafe.imports_passed_through(): with workflow.unsafe.imports_passed_through():
from sientia_do.temporal.activities.base import BaseActivity from sientia_do.temporal.activities.base import BaseActivity
from sientia_do.notifications.handlers import CoreNotificationHandler as NotificationHandler 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 sientia_do.temporal.utils.logger import Logger
from laborious.utils.repository.model_repository import MLFlowRepository from laborious.utils.repository.model_repository import MLFlowRepository
from typing import Any from typing import Any
@@ -145,6 +146,7 @@ class MLFlow(BaseActivity):
notification_id='RETRAIN_MODEL_ERROR', notification_id='RETRAIN_MODEL_ERROR',
message=f'Error retraining model {model_name}: {e}', message=f'Error retraining model {model_name}: {e}',
block='retrain_model', block='retrain_model',
level=NotificationLevel.ERROR,
attachment_content=trace attachment_content=trace
) )
self.error(trace, metadata=metadata) self.error(trace, metadata=metadata)
@@ -197,6 +199,7 @@ class MLFlow(BaseActivity):
notification_id='UPDATE_PRODUCTION_MODEL_ERROR', notification_id='UPDATE_PRODUCTION_MODEL_ERROR',
message=f'Error updating production model {model_name}: {e}', message=f'Error updating production model {model_name}: {e}',
block='update_production_model', block='update_production_model',
level=NotificationLevel.ERROR,
attachment_content=trace attachment_content=trace
) )
self.error(trace, metadata=metadata) self.error(trace, metadata=metadata)

View File

@@ -3,5 +3,5 @@ psycopg2-binary
sqlalchemy sqlalchemy
asyncua asyncua
redis redis
git+ssh://git@github.com/Aignosi/sientia-dataops-library.git@1.3.4 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.1 git+ssh://git@github.com/Aignosi/sientia-mlops-library.git@0.38.5

View File

@@ -4,6 +4,7 @@ import numpy as np
from pandas import DataFrame from pandas import DataFrame
from pytest import fixture, mark from pytest import fixture, mark
from laborious.activities.mlflow import MLFlow from laborious.activities.mlflow import MLFlow
from sientia_do.notifications.models import NotificationLevel
@patch("laborious.activities.mlflow.MLFlowRepository") @patch("laborious.activities.mlflow.MLFlowRepository")
@@ -203,6 +204,7 @@ async def test_retrain_model_error(mlflow):
notification_id='RETRAIN_MODEL_ERROR', notification_id='RETRAIN_MODEL_ERROR',
message='Error retraining model test_model: Error retraining model', message='Error retraining model test_model: Error retraining model',
block='retrain_model', block='retrain_model',
level=NotificationLevel.ERROR,
attachment_content=ANY attachment_content=ANY
) )
else: else:
@@ -266,6 +268,7 @@ async def test_update_production_model_error(mlflow):
notification_id='UPDATE_PRODUCTION_MODEL_ERROR', notification_id='UPDATE_PRODUCTION_MODEL_ERROR',
message='Error updating production model test_model: Error updating production model', message='Error updating production model test_model: Error updating production model',
block='update_production_model', block='update_production_model',
level=NotificationLevel.ERROR,
attachment_content=ANY attachment_content=ANY
) )
else: else:

View File

@@ -11,7 +11,7 @@ image:
# This sets the pull policy for images. # This sets the pull policy for images.
pullPolicy: Always pullPolicy: Always
# Overrides the image tag whose default is the chart appVersion. # 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/ # 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: imagePullSecrets:
@@ -123,7 +123,7 @@ env:
- name: GITHUB_REPO_URL - name: GITHUB_REPO_URL
value: "git@github.com:Aignosi/sientia-dataops-laborious_temporal.git" value: "git@github.com:Aignosi/sientia-dataops-laborious_temporal.git"
- name: GITHUB_BRANCH - name: GITHUB_BRANCH
value: "SIENTIAPDE-1171-criar-pipeline-de-retreino-laborious" value: "SIENTIAPDE-1172-criar-pipeline-de-alertas-orquestrador"
- name: PYTHON_APP - name: PYTHON_APP
value: "laborious.worker.worker" value: "laborious.worker.worker"