Start a Kaggle Task

Use MLE Agent to Participate in Kaggle Competitions 🏆

Overview

This tutorial demonstrates how to use MLE Agent to participate in Kaggle competitions, guiding you from data preparation to model training.

Prerequisites

Ensure you have MLE-Agent version 0.4.0 or later and the Kaggle Python API installed.

$ pip3 install mle-agent kaggle -U

Next, integrate your Kaggle account using your Kaggle API token (opens in a new tab).

$ mle integrate
--------------------------------------------------------------------
? Which platform do you want to integrate? (Use arrow keys)
   GitHub
 » Kaggle

Get your Kaggle token from: https://www.kaggle.com/settings (opens in a new tab)

Steps

1. Select a Competition

Join a Kaggle competition (e.g., titanic (opens in a new tab)), and run the MLE Agent with the following command:

$ mle kaggle

kaggle_choose_competition

2. Plan under Interaction

MLE Agent can understand the competition requirements, including data and submission formats. It can automatically access relevant papers and code to enhance its knowledge about the competition.

kaggle_competition_summary

You can interact with MLE Agent to specify your needs, such as data preprocessing methods and ML algorithms.

kaggle_competition_interaction

3. Competition Task Breakdown

Once the agent understands the competition requirements, it will break down the process into separated stages, such as data preprocessing, model training, and evaluation.

kaggle_competition_plan

For each stage, you can provide feedback to adjust the agent's actions according to your requirements.

kaggle_task_breakdown

4. Train & Evalation in Auto Debug

In this example, MLE Agent will evaluate three different ML algorithms: random forest, support vector machine, and gradient boosting. It will train each model separately to determine the best algorithm.

kaggle_competition_train kaggle_competition_eval

Additionally, if errors occur during training or evaluation, such as logic errors or convergence issues, MLE Agent can automatically search Google for solutions and address the problems.

kaggle_competition_debug

5. Submit Best Prediction

Finally, submit the best model's predictions to Kaggle to evaluate its score.

kaggle_competition_result

Summary

This tutorial demonstrated how to use MLE Agent to participate in a Kaggle competition effectively. For any questions or issues, please feel free to contact us and issue a new GitHub issue (opens in a new tab).