diff --git a/.github/workflows/cml.yaml b/.github/workflows/cml.yaml new file mode 100644 index 000000000..71b1e0477 --- /dev/null +++ b/.github/workflows/cml.yaml @@ -0,0 +1,18 @@ +name: model-training +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: | + pip install -r requirements.txt + python train.py + + cat metrics.txt >> report.md + cml-publish confusion_matrix.png --md >> report.md + cml-send-comment report.md diff --git a/train.py b/train.py index f7ea25d3a..b7ae23ad0 100644 --- a/train.py +++ b/train.py @@ -13,7 +13,7 @@ # Fit a model -depth = 2 +depth = 5 clf = RandomForestClassifier(max_depth=depth) clf.fit(X_train,y_train)