Skip to content

Commit 6cc2ab7

Browse files
committed
modify forest depth
1 parent 56de3ef commit 6cc2ab7

File tree

2 files changed

+20
-1
lines changed

2 files changed

+20
-1
lines changed

.github/workflows/cml.yaml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
name: CML
2+
on: [push]
3+
jobs:
4+
train-and-report:
5+
runs-on: ubuntu-latest
6+
container: docker://ghcr.io/iterative/cml:0-dvc2-base1
7+
steps:
8+
- uses: actions/checkout@v3
9+
- name: Train model
10+
env:
11+
REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }}
12+
run: |
13+
pip install -r requirements.txt
14+
python train.py # generate plot.png
15+
16+
# Create CML report
17+
cat metrics.txt >> report.md
18+
echo '![](./plot.png "Confusion Matrix")' >> report.md
19+
cml comment create report.md

train.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
y_test = np.genfromtxt("data/test_labels.csv")
1313

1414
# Fit a model
15-
depth = 2
15+
depth = 5
1616
clf = RandomForestClassifier(max_depth=depth)
1717
clf.fit(X_train, y_train)
1818

0 commit comments

Comments
 (0)