SIENTIAPDE-1252: Improve caching in quality gate, add alt text to logo, and change exception type in MLflow repository.

This commit is contained in:
Bruno Domingues
2025-10-13 10:54:38 -03:00
parent b3c749872c
commit 9d4ec19586
4 changed files with 11 additions and 6 deletions

View File

@@ -196,10 +196,14 @@ jobs:
uses: actions/setup-python@v5 uses: actions/setup-python@v5
with: with:
python-version: "3.11" python-version: "3.11"
cache: 'pip'
cache-dependency-path: | - name: 💾 Cache pip packages
requirements.txt uses: actions/cache@v4
requirements-dev.txt with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('requirements.txt', 'requirements-dev.txt') }}
restore-keys: |
${{ runner.os }}-pip-
- name: 📦 Install Dependencies - name: 📦 Install Dependencies
run: | run: |

View File

@@ -110,6 +110,7 @@
<a href="#" class="logo"> <a href="#" class="logo">
<img <img
src="https://aignosi.blob.core.windows.net/sientia/20231016-Aignosi_Logo_WHITE.png" src="https://aignosi.blob.core.windows.net/sientia/20231016-Aignosi_Logo_WHITE.png"
alt="Aignosi Logo"
width="247" width="247"
height="70" height="70"
/> />

View File

@@ -607,7 +607,7 @@ class MLFlowRepository:
except Exception as e: except Exception as e:
error_msg = f"Failed to save run '{data.run_name}' to MLflow: {str(e)}" error_msg = f"Failed to save run '{data.run_name}' to MLflow: {str(e)}"
self.logger.error(error_msg) self.logger.error(error_msg)
raise Exception(error_msg) from e raise RuntimeError(error_msg) from e
def _init_artifacts_data(self, data: TrainModelResult) -> tuple[pd.DataFrame, pd.DataFrame]: def _init_artifacts_data(self, data: TrainModelResult) -> tuple[pd.DataFrame, pd.DataFrame]:
""" """

View File

@@ -762,7 +762,7 @@ def test_save_run_mlflow_error(mock_path, mlflow_repository):
'MLflow connection error' 'MLflow connection error'
) )
with pytest.raises(Exception) as exc_info: with pytest.raises(RuntimeError) as exc_info:
mlflow_repository.save_run(data) mlflow_repository.save_run(data)
assert 'Failed to save run' in str(exc_info.value) assert 'Failed to save run' in str(exc_info.value)