Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Experiment by changing depth to 4 #333

Open
wants to merge 12 commits into
base: master
Choose a base branch
from
Open
23 changes: 23 additions & 0 deletions .github/workflows/cml.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: CML
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
<<<<<<< HEAD
cml comment create report.md
=======
cml comment create report.md
>>>>>>> c9c93716fd5af55e194fccb17839ace3add989cd
5 changes: 4 additions & 1 deletion train.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,10 @@
y_test = np.genfromtxt("data/test_labels.csv")

# Fit a model
depth = 2

depth = 3


clf = RandomForestClassifier(max_depth=depth)
clf.fit(X_train, y_train)

Expand Down