From 6753b5e907000a0080f60afaf751959ab237eb70 Mon Sep 17 00:00:00 2001 From: Ubuntu Date: Fri, 27 Sep 2024 23:05:27 +0200 Subject: [PATCH 1/4] modify forest depth --- train.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/train.py b/train.py index 415d9a9f9..f44634667 100644 --- a/train.py +++ b/train.py @@ -12,7 +12,7 @@ y_test = np.genfromtxt("data/test_labels.csv") # Fit a model -depth = 2 +depth = 5 clf = RandomForestClassifier(max_depth=depth) clf.fit(X_train, y_train) From 5218b713f17b74a9d18706ccd709743867ba383d Mon Sep 17 00:00:00 2001 From: Ira-Trygub Date: Tue, 1 Oct 2024 11:47:10 +0200 Subject: [PATCH 2/4] Add CML workflow --- .github/workflows/cml.yaml | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 .github/workflows/cml.yaml diff --git a/.github/workflows/cml.yaml b/.github/workflows/cml.yaml new file mode 100644 index 000000000..35d1299d1 --- /dev/null +++ b/.github/workflows/cml.yaml @@ -0,0 +1,19 @@ +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 + cml comment create report.md \ No newline at end of file From edbef272189c45481e05143343b3d72fe31baa52 Mon Sep 17 00:00:00 2001 From: Ira-Trygub Date: Tue, 1 Oct 2024 19:54:20 +0200 Subject: [PATCH 3/4] update --- .gitignore | 1 + 1 file changed, 1 insertion(+) create mode 100644 .gitignore diff --git a/.gitignore b/.gitignore new file mode 100644 index 000000000..eba74f4cd --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +venv/ \ No newline at end of file From eaff322e75028bf91693f7c93bf2cc54b7ef9cd6 Mon Sep 17 00:00:00 2001 From: Ira-Trygub Date: Tue, 1 Oct 2024 20:27:41 +0200 Subject: [PATCH 4/4] depth 10 --- train.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/train.py b/train.py index f44634667..883a4c456 100644 --- a/train.py +++ b/train.py @@ -12,7 +12,7 @@ y_test = np.genfromtxt("data/test_labels.csv") # Fit a model -depth = 5 +depth = 10 clf = RandomForestClassifier(max_depth=depth) clf.fit(X_train, y_train)