diff --git a/.github/workflows/cml.yaml b/.github/workflows/cml.yaml new file mode 100644 index 000000000..63973ea27 --- /dev/null +++ b/.github/workflows/cml.yaml @@ -0,0 +1,26 @@ +name: model_wine_quality +on: [push] +jobs: + run: + runs-on: [ubuntu-latest] + container: docker://dvcorg/cml-py3:latest + steps: + - uses: actions/checkout@v2 + - name: 'Train my model' + env: + repo_token: ${{ secrets.GITHUB_TOKEN }} + run: | + + # Your ML workflow goes here + pip install -r requirements.txt + python train.py + + # cml helps to write into a .md document + echo "## MODEL METRICS" > report.md + cat metrics.txt >> report.md + + echo "## Data Vizualisation" >> report.md + cml-publish feature_importance.png --md >> report.md + cml-publish residuals.png --md >> report.md + + cml-send-comment report.md 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