Skip to main content

Prerequisites

  • Python 3.10+
  • Git
  • API keys for OpenAI and/or Google (Gemini)

Installation

1

Clone the repository

git clone <repository-url>
cd mle_expert_coding
2

Install dependencies

pip install -r requirements.txt
3

Set up API keys

Create a .env file in the project root:
OPENAI_API_KEY=your-openai-api-key
GOOGLE_API_KEY=your-google-api-key

Run Your First Experiment

Option 1: MLE-Bench (Kaggle)

Requires MLE-Bench installation (see Installation):
PYTHONPATH=. python -m benchmarks.mle.runner -c tabular-playground-series-dec-2021 -i 5
This runs 5 iterations on a tabular classification competition.

Option 2: Generic Problem

No extra installation needed:
PYTHONPATH=. python -m src.runner -p "Create a Python script that calculates the first 100 prime numbers"

Expected Output

============================================================
Solving: tabular-playground-series-dec-2021
============================================================
  Max iterations: 5
  Config mode: MLE_CONFIGS
  Coding agent: from config
  Knowledge graph: enabled

Experiment 1 completed with cumulative cost: $0.125
####################################
Experiment with final score 0.847 :
# Solution : Use XGBoost with feature engineering...
####################################
The system creates git branches for each experiment and outputs the best solution path.

Next Steps