Skip to content

ashishpawar517/ML-CI-Demo-Project

Repository files navigation

ML-CI-Demo

Machine Learning Continuous Integration using Github actions. (Using CML Library)


📟

Install

Create a new file in .github/workflows/cml.yml with the following:

name: first_ML_workflow
on: [push]
jobs:
  run:
    runs-on: [ubuntu-latest]
    container: docker://dvcorg/cml-py3:latest
    steps:
      - uses: actions/checkout@v2
      - name: cml_run
        env:
          repo_token: ${{ secrets.GITHUB_TOKEN }}
        run: |
          # Your ML workflow goes here
          pip install -r requirements.txt
          python train.py
          # Write your CML report
          # cat results.txt >> report.md
          # cml-send-comment report.md
            cat metrics.txt >> report.md
          echo >> report.md
          cml-publish confusion_matrix.png --md --title 'confusion-matrix' >> report.md
          cml-send-comment report.md 

⚙️

Usage

Now, whenever you commit/push onto GitHub master branch,This workflow will calculate model's accuracy and auto-generate confusion matrix as Commit comment.



📃

License & Conduct


🙌

Connect

 (follow) To stay up to date on with my free & open-source software contribution.

Twitter @MrAhmadAwais  (follow) To get latest of ALL Tech news & Events.