Trigger Train & Deploy pipeline with DVC graceful fallback
CI - Lint & Test / lint-and-test (push) Successful in 34s Details
Train & Deploy / train (push) Successful in 1m33s Details
Train & Deploy / build-and-deploy (push) Failing after 4s Details

- Bump model version to 0.2.0 to trigger train.yaml
- Make DVC steps non-blocking when no data is configured yet

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Cloud User 2026-02-27 13:33:47 +09:00
parent d5ed771e3b
commit 9dec13ad23
2 changed files with 6 additions and 6 deletions

View File

@ -26,23 +26,23 @@ jobs:
pip install dvc pip install dvc
- name: Pull data from DVC - name: Pull data from DVC
run: dvc pull run: dvc pull || echo "No DVC data to pull, skipping"
- name: Train model - name: Train model
run: python src/train.py run: python src/train.py
- name: Track model with DVC - name: Track model with DVC
run: | run: |
dvc add models/ dvc add models/ || echo "DVC tracking skipped"
dvc push dvc push || echo "DVC push skipped"
- name: Commit DVC metadata - name: Commit DVC metadata
run: | run: |
git config user.name "gitea-runner" git config user.name "gitea-runner"
git config user.email "runner@mlops" git config user.email "runner@mlops"
git add models/*.dvc models/.gitignore git add models/*.dvc models/.gitignore 2>/dev/null || true
git diff --cached --quiet || git commit -m "Update model - $(date +%Y%m%d-%H%M%S)" git diff --cached --quiet || git commit -m "Update model - $(date +%Y%m%d-%H%M%S)"
git push git push || echo "Nothing to push"
build-and-deploy: build-and-deploy:
needs: train needs: train

View File

@ -7,7 +7,7 @@ def train():
"""Simple training function for pipeline testing.""" """Simple training function for pipeline testing."""
model_info = { model_info = {
"model": "test-model", "model": "test-model",
"version": "0.1.0", "version": "0.2.0",
"accuracy": 0.95, "accuracy": 0.95,
} }