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
|
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: |
|
||||||
|
|||||||
@@ -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"
|
||||||
/>
|
/>
|
||||||
|
|||||||
@@ -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]:
|
||||||
"""
|
"""
|
||||||
|
|||||||
@@ -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)
|
||||||
|
|||||||
Reference in New Issue
Block a user