diff --git a/backend/internal/engine.py b/backend/internal/engine.py index cbc50dd..0f71e13 100644 --- a/backend/internal/engine.py +++ b/backend/internal/engine.py @@ -22,6 +22,7 @@ logger = logging.getLogger(__name__) logger.info = lambda message: print(message) +logger.exception = lambda message: print(message) class Engine: """ diff --git a/backend/internal/experiment_manager.py b/backend/internal/experiment_manager.py index d6b7f97..33628b3 100644 --- a/backend/internal/experiment_manager.py +++ b/backend/internal/experiment_manager.py @@ -14,6 +14,9 @@ logger = logging.getLogger(__name__) logger.info = lambda message: print(message) +logger.error = lambda message: print(message) +logger.warning = lambda message: print(message) +logger.debug = lambda message: print(message) class ExperimentManager: def __init__(self, base_path): @@ -108,6 +111,8 @@ def run_experiment(self, experiment_id, output_format, runs): engine.run(runs=runs, orchestration_timeout=None, randomize=False, accounting=False) except Exception as e: logger.error(f"Error running experiment: {e}") + import traceback + logger.error(f"stacktrace: {traceback.format_exc()}") self.update_experiment(experiment_id, {'status': 'FAILED', 'error_message': str(e)}) finally: self.release_lock() diff --git a/backend/internal/kubernetes_orchestrator.py b/backend/internal/kubernetes_orchestrator.py index 0c555cb..988c70d 100644 --- a/backend/internal/kubernetes_orchestrator.py +++ b/backend/internal/kubernetes_orchestrator.py @@ -19,6 +19,10 @@ from backend.internal.models.orchestrator import Orchestrator # Import the abstract base class logger = logging.getLogger(__name__) logger.info = lambda message: print(message) +logger.error = lambda message: print(message) +logger.warning = lambda message: print(message) +logger.debug = lambda message: print(message) + from backend.internal.errors import OxnException, OrchestratorException, OrchestratorResourceNotFoundException class KubernetesOrchestrator(Orchestrator):