SIENTIAPDE-1252: Improve caching in quality gate, add alt text to logo, and change exception type in MLflow repository.
This commit is contained in:
12
.github/workflows/quality-gate.yml
vendored
12
.github/workflows/quality-gate.yml
vendored
@@ -196,10 +196,14 @@ jobs:
|
||||
uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: "3.11"
|
||||
cache: 'pip'
|
||||
cache-dependency-path: |
|
||||
requirements.txt
|
||||
requirements-dev.txt
|
||||
|
||||
- name: 💾 Cache pip packages
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: ~/.cache/pip
|
||||
key: ${{ runner.os }}-pip-${{ hashFiles('requirements.txt', 'requirements-dev.txt') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-pip-
|
||||
|
||||
- name: 📦 Install Dependencies
|
||||
run: |
|
||||
|
||||
@@ -110,6 +110,7 @@
|
||||
<a href="#" class="logo">
|
||||
<img
|
||||
src="https://aignosi.blob.core.windows.net/sientia/20231016-Aignosi_Logo_WHITE.png"
|
||||
alt="Aignosi Logo"
|
||||
width="247"
|
||||
height="70"
|
||||
/>
|
||||
|
||||
@@ -607,7 +607,7 @@ class MLFlowRepository:
|
||||
except Exception as e:
|
||||
error_msg = f"Failed to save run '{data.run_name}' to MLflow: {str(e)}"
|
||||
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]:
|
||||
"""
|
||||
|
||||
@@ -762,7 +762,7 @@ def test_save_run_mlflow_error(mock_path, mlflow_repository):
|
||||
'MLflow connection error'
|
||||
)
|
||||
|
||||
with pytest.raises(Exception) as exc_info:
|
||||
with pytest.raises(RuntimeError) as exc_info:
|
||||
mlflow_repository.save_run(data)
|
||||
|
||||
assert 'Failed to save run' in str(exc_info.value)
|
||||
|
||||
Reference in New Issue
Block a user