Trigger Train & Deploy pipeline with DVC graceful fallback
- 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:
parent
d5ed771e3b
commit
9dec13ad23
|
|
@ -26,23 +26,23 @@ jobs:
|
|||
pip install dvc
|
||||
|
||||
- name: Pull data from DVC
|
||||
run: dvc pull
|
||||
run: dvc pull || echo "No DVC data to pull, skipping"
|
||||
|
||||
- name: Train model
|
||||
run: python src/train.py
|
||||
|
||||
- name: Track model with DVC
|
||||
run: |
|
||||
dvc add models/
|
||||
dvc push
|
||||
dvc add models/ || echo "DVC tracking skipped"
|
||||
dvc push || echo "DVC push skipped"
|
||||
|
||||
- name: Commit DVC metadata
|
||||
run: |
|
||||
git config user.name "gitea-runner"
|
||||
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 push
|
||||
git push || echo "Nothing to push"
|
||||
|
||||
build-and-deploy:
|
||||
needs: train
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ def train():
|
|||
"""Simple training function for pipeline testing."""
|
||||
model_info = {
|
||||
"model": "test-model",
|
||||
"version": "0.1.0",
|
||||
"version": "0.2.0",
|
||||
"accuracy": 0.95,
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue