From d5a50696d42f5009c27e66a0e36fe1cfff9898e2 Mon Sep 17 00:00:00 2001 From: Philipp Millet <60098436+pppmlt@users.noreply.github.com> Date: Fri, 4 Nov 2022 15:21:17 +0100 Subject: [PATCH 1/4] add cml action --- .github/workflows/cml.yaml | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 .github/workflows/cml.yaml diff --git a/.github/workflows/cml.yaml b/.github/workflows/cml.yaml new file mode 100644 index 000000000..041cce0d7 --- /dev/null +++ b/.github/workflows/cml.yaml @@ -0,0 +1,24 @@ +name: model-wine-quality +on: push +jobs: + run: + runs-on: ubuntu-latest + # optionally use a convenient Ubuntu LTS + DVC + CML image + # container: ghcr.io/iterative/cml:0-dvc2-base1 + steps: + - uses: actions/checkout@v3 + # may need to setup NodeJS & Python3 on e.g. self-hosted + # - uses: actions/setup-node@v3 + # with: + # node-version: '16' + # - uses: actions/setup-python@v4 + # with: + # python-version: '3.x' + - uses: iterative/setup-cml@v1 + - name: Train model + run: | + # Your ML workflow goes here + pip install -r requirements.txt + python train.py + echo "MODEL METRICS" + cat metrics.txt From 233cccd8727045421f2a773ee6154ba88f20414d Mon Sep 17 00:00:00 2001 From: Philipp Millet <60098436+pppmlt@users.noreply.github.com> Date: Fri, 4 Nov 2022 15:25:23 +0100 Subject: [PATCH 2/4] Update cml.yaml --- .github/workflows/cml.yaml | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/.github/workflows/cml.yaml b/.github/workflows/cml.yaml index 041cce0d7..9ad1be66e 100644 --- a/.github/workflows/cml.yaml +++ b/.github/workflows/cml.yaml @@ -20,5 +20,12 @@ jobs: # Your ML workflow goes here pip install -r requirements.txt python train.py - echo "MODEL METRICS" - cat metrics.txt + + echo "## MODEL METRICS" > report.md + cat metrics.txt >> report.md + + echo "## Data viz" >> report.md + cml-publish feature_importance.png --md >> report.md + cml-publish residuals.png >> report.md + + cml-send-comment report.md From cfb797488ef8a432a2f4ae8b5f7d2937245e5063 Mon Sep 17 00:00:00 2001 From: Philipp Millet <60098436+pppmlt@users.noreply.github.com> Date: Fri, 4 Nov 2022 15:28:10 +0100 Subject: [PATCH 3/4] Update cml.yaml --- .github/workflows/cml.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/cml.yaml b/.github/workflows/cml.yaml index 9ad1be66e..84f8b3557 100644 --- a/.github/workflows/cml.yaml +++ b/.github/workflows/cml.yaml @@ -21,11 +21,11 @@ jobs: pip install -r requirements.txt python train.py - echo "## MODEL METRICS" > report.md + echo "## Model metrics" > report.md cat metrics.txt >> report.md echo "## Data viz" >> report.md cml-publish feature_importance.png --md >> report.md - cml-publish residuals.png >> report.md - + cml-publish residuals.png --md >> report.md + cml-send-comment report.md From 11ec15512ac628e82605004e721de33bbe0d4804 Mon Sep 17 00:00:00 2001 From: Philipp Millet <60098436+pppmlt@users.noreply.github.com> Date: Fri, 4 Nov 2022 16:34:12 +0100 Subject: [PATCH 4/4] Update cml.yaml --- .github/workflows/cml.yaml | 17 +++++------------ 1 file changed, 5 insertions(+), 12 deletions(-) diff --git a/.github/workflows/cml.yaml b/.github/workflows/cml.yaml index 84f8b3557..36b35bcc5 100644 --- a/.github/workflows/cml.yaml +++ b/.github/workflows/cml.yaml @@ -3,19 +3,12 @@ on: push jobs: run: runs-on: ubuntu-latest - # optionally use a convenient Ubuntu LTS + DVC + CML image - # container: ghcr.io/iterative/cml:0-dvc2-base1 + container: docker://dvcorg/cml-py3:latest steps: - - uses: actions/checkout@v3 - # may need to setup NodeJS & Python3 on e.g. self-hosted - # - uses: actions/setup-node@v3 - # with: - # node-version: '16' - # - uses: actions/setup-python@v4 - # with: - # python-version: '3.x' - - uses: iterative/setup-cml@v1 - - name: Train model + - uses: actions/checkout@v2 + - name: cml_run + env: + repo_token: ${{ secrets.GITHUB_TOKEN }} run: | # Your ML workflow goes here pip install -r requirements.txt