diff --git a/.github/workflows/cml.yml b/.github/workflows/cml.yml new file mode 100644 index 000000000..17efe6e96 --- /dev/null +++ b/.github/workflows/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 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