diff --git a/.github/workflow/cml.yaml b/.github/workflow/cml.yaml new file mode 100644 index 000000000..9c11dec0f --- /dev/null +++ b/.github/workflow/cml.yaml @@ -0,0 +1,26 @@ +name: model-wine-quality +on: [push] +jobs: + train-and-report: + runs-on: ubuntu-latest + container: docker://ghcr.io/iterative/cml:0-dvc2-base1 + steps: + - uses: actions/checkout@v3 + - name: Train model + env: + REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: | + pip install -r requirements.txt + python train.py # generate plot.png + + # Create CML report + cat metrics.txt >> report.md + echo '![](./plot.png "Confusion Matrix")' >> report.md + cml comment create report.md + + echo "## Model Metrics > report.md + cat metrics.txt >> report.md + + cml-publish feature_importance.png --md >> report.md + cml-publish residuals.png --md >> report.md + cml-send-comment report.md