diff --git a/.github/workflows/cml.yaml b/.github/workflows/cml.yaml new file mode 100644 index 000000000..a50b43f35 --- /dev/null +++ b/.github/workflows/cml.yaml @@ -0,0 +1,19 @@ +name: model-training +on: [push] +jobs: + run: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - uses: actions/setup-python@v2 + - uses: iterative/setup-cml@v1 + - name: Train model + 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 \ No newline at end of file diff --git a/.gitignore b/.gitignore new file mode 100644 index 000000000..df309478b --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ + +.idea/ diff --git a/train.py b/train.py index f7ea25d3a..1df8d7f9a 100644 --- a/train.py +++ b/train.py @@ -13,7 +13,7 @@ # Fit a model -depth = 2 +depth = 6 clf = RandomForestClassifier(max_depth=depth) clf.fit(X_train,y_train)