Get startedGet started for free

Setup model training using CML

In this exercise, you will use CML GitHub Action to train a Random Forest Classifier to predict rainfall. CML is a GitHub Action that abstracts generating reports for ML experiments.

The training will trigger when you open a PR against the main branch. You'll continue working with the weather dataset; the preprocess_dataset.py file contains helper functions to pre-process the dataset as before.

The output from running train.py is a metrics.json file containing model metrics, and confusion_matrix.png file containing a plot of the confusion matrix.

Your task is to finish the scaffolded .github/workflows/train_cml.yaml to formulate a high-level model training flow.

NOTE: Use python3 instead of python to run Python scripts.

This exercise is part of the course

CI/CD for Machine Learning

View Course

Hands-on interactive exercise

Turn theory into action with one of our interactive exercises

Start Exercise