From 69a3f0d33db2b29477f6c80b0e7e845a32771c20 Mon Sep 17 00:00:00 2001 From: Nhan Tran <107875597+nhantran0506@users.noreply.github.com> Date: Tue, 4 Mar 2025 20:19:10 +0700 Subject: [PATCH 1/3] adding CI/CD with cml --- .github/workflow/cml.yml | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 .github/workflow/cml.yml diff --git a/.github/workflow/cml.yml b/.github/workflow/cml.yml new file mode 100644 index 000000000..17efe6e96 --- /dev/null +++ b/.github/workflow/cml.yml @@ -0,0 +1,32 @@ +name: test-mlops +on: [push] +jobs: + run: + runs-on: ubuntu-latest + # optionally use a convenient Ubuntu LTS + DVC + CML image + # container: ghcr.io/iterative/cml:0-dvc2-base1 + steps: + - uses: actions/checkout@v3 + # may need to setup NodeJS & Python3 on e.g. self-hosted + # - uses: actions/setup-node@v3 + # with: + # node-version: '16' + # - uses: actions/setup-python@v4 + # with: + # python-version: '3.x' + - uses: iterative/setup-cml@v1 + - env: + REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }} + - name: Train model + run: | + # Your ML workflow goes here + pip install -r requirements.txt + python train.py + + echo "## Data VIZ" >> report.md + cml-publish feature_importance.png --md >> report.md + cml-publish residuals.png --md >> report.md + + cml-send-connect report.md + + \ No newline at end of file From d9720e0a8cb66c5f45623d04ef8a6a6191af437d Mon Sep 17 00:00:00 2001 From: Nhan Tran <107875597+nhantran0506@users.noreply.github.com> Date: Tue, 4 Mar 2025 20:23:25 +0700 Subject: [PATCH 2/3] increase tree --- train.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/train.py b/train.py index 25a64304f..92678f346 100644 --- a/train.py +++ b/train.py @@ -23,7 +23,7 @@ ################################# # Fit a model on the train section -regr = RandomForestRegressor(max_depth=2, random_state=seed) +regr = RandomForestRegressor(max_depth=5, random_state=seed) regr.fit(X_train, y_train) # Report training set score From d5bd1bda1672ab72d30bad5c173a1e1e556e2e6e Mon Sep 17 00:00:00 2001 From: Nhan Tran <107875597+nhantran0506@users.noreply.github.com> Date: Tue, 4 Mar 2025 20:28:05 +0700 Subject: [PATCH 3/3] workflow update --- .github/{workflow => workflows}/cml.yml | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename .github/{workflow => workflows}/cml.yml (100%) diff --git a/.github/workflow/cml.yml b/.github/workflows/cml.yml similarity index 100% rename from .github/workflow/cml.yml rename to .github/workflows/cml.yml