diff --git a/.gitea/workflows/train.yaml b/.gitea/workflows/train.yaml index b4bd94c..3e0ecef 100644 --- a/.gitea/workflows/train.yaml +++ b/.gitea/workflows/train.yaml @@ -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 diff --git a/src/train.py b/src/train.py index 52e2228..07a7e62 100644 --- a/src/train.py +++ b/src/train.py @@ -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, }