From fa0b0abd698b8d729f42e6e6e415b501e83f7a11 Mon Sep 17 00:00:00 2001 From: Syakyr Surani Date: Wed, 11 Sep 2024 08:49:17 +0000 Subject: [PATCH] fix: added logger.error(e) to diagnoss issues pertaining to failed mlflow inits --- .../src/{{cookiecutter.src_package_name}}/general_utils.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/{{cookiecutter.repo_name}}/src/{{cookiecutter.src_package_name}}/general_utils.py b/{{cookiecutter.repo_name}}/src/{{cookiecutter.src_package_name}}/general_utils.py index 9a5530f..21d240c 100644 --- a/{{cookiecutter.repo_name}}/src/{{cookiecutter.src_package_name}}/general_utils.py +++ b/{{cookiecutter.repo_name}}/src/{{cookiecutter.src_package_name}}/general_utils.py @@ -92,8 +92,9 @@ def mlflow_init(args, run_name='train-model', setup_mlflow=False, autolog=False) init_success = True logger.info("MLflow initialisation has succeeded.") logger.info("UUID for MLflow run: %s", mlflow_run.info.run_id) - except Exception: + except Exception as e: logger.error("MLflow initialisation has failed.") + logger.error(e) return init_success, mlflow_run