Run data pipeline #8
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Run data pipeline | |
on: | |
workflow_run: | |
workflows: ["Increase Data Version"] | |
types: | |
- completed | |
workflow_dispatch: | |
jobs: | |
run-dvc-pipeline: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout Repository | |
uses: actions/checkout@v3 | |
- name: Setup DVC | |
uses: iterative/setup-dvc@v1 | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install python-box ensure pandas pathlib scikit-learn dagshub mlflow numpy | |
- name: Run DVC pipeline | retrain model | |
run: | | |
dvc repro data_update | |
dvc repro data_validation | |
dvc repro data_transformation | |
dvc repro model_train | |
dvc repro model_evaluation | |
- name: Commit and push updated model | |
run: | | |
git config --global user.name 'github-actions' | |
git config --global user.email '[email protected]' | |
git add models/model.pkl | |
git commit -m "[Github Action]: Update model with retrained model" | |
git push |