SIENTIAPDE-1478
Refactor validation script and improve logging in API and model repository - Updated validation script to include 'e2e/' directory in code formatting and linting checks. - Enhanced error logging in API class to improve readability of error messages. - Refactored debug logging in model repository for better structured output. - Cleaned up import statements in various files for improved organization.
This commit is contained in:
@@ -31,27 +31,20 @@ Environment Variables:
|
||||
|
||||
from temporalio import client, workflow
|
||||
from temporalio.runtime import PrometheusConfig, Runtime, TelemetryConfig
|
||||
from temporalio.worker import (
|
||||
PollerBehaviorAutoscaling,
|
||||
ResourceBasedSlotConfig,
|
||||
Worker,
|
||||
WorkerTuner,
|
||||
)
|
||||
|
||||
with workflow.unsafe.imports_passed_through():
|
||||
import asyncio
|
||||
import os
|
||||
import sys
|
||||
from datetime import timedelta
|
||||
|
||||
from prometheus_client import start_http_server
|
||||
from sientia_do.notifications.handlers import CoreNotificationHandler as NotificationHandler
|
||||
from sientia_do.observability.logger import get_logger
|
||||
from sientia_do.utils.connectors_config import (
|
||||
build_api_config,
|
||||
build_mongodb_config,
|
||||
build_postgres_config,
|
||||
)
|
||||
from sientia_do.notifications.handlers import CoreNotificationHandler as NotificationHandler
|
||||
from sientia_do.observability.logger import get_logger
|
||||
|
||||
from laborious import metrics
|
||||
from laborious.activities.activities import Activities
|
||||
@@ -60,6 +53,7 @@ with workflow.unsafe.imports_passed_through():
|
||||
build_mlflow_config,
|
||||
build_opc_config,
|
||||
)
|
||||
from laborious.worker.prepare_worker import prepare_worker
|
||||
from laborious.workflows.drift import Drift
|
||||
from laborious.workflows.minimal_retrain import MinimalRetrain
|
||||
from laborious.workflows.predictions_batch import PredictionsBatch
|
||||
@@ -68,11 +62,11 @@ with workflow.unsafe.imports_passed_through():
|
||||
FormatAndExportPrediction,
|
||||
)
|
||||
from laborious.workflows.sub_workflows.prediction_process import PredictionProcess
|
||||
from laborious.worker.prepare_worker import prepare_worker
|
||||
|
||||
POD_ID = os.getenv('POD_ID')
|
||||
SDK_METRICS_PORT = int(os.getenv('HTTP_SDK_METRICS_PORT', '9091'))
|
||||
|
||||
|
||||
async def main():
|
||||
"""
|
||||
Main entry point for the Laborious worker application.
|
||||
@@ -215,7 +209,7 @@ async def main():
|
||||
activities.write_metrics,
|
||||
],
|
||||
logger=logger,
|
||||
)
|
||||
),
|
||||
]
|
||||
|
||||
handlers = []
|
||||
|
||||
Reference in New Issue
Block a user