ML Pipeline
This directory contains the machine learning pipeline for training the complexity classifier.
Structure
ml/
βββ data/ # Dataset loading and preprocessing
β βββ load_dataset.py
βββ training/ # Model training and evaluation
β βββ train.py # DistilBERT fine-tuning
β βββ evaluate.py # Model evaluation
βββ export/ # Model export
β βββ convert_to_onnx.py
βββ artifacts/ # Saved models and metrics
βββ model.onnx
βββ metrics.json
Training
# Train the complexity classifier
python -m ml.training.train --dataset arc --epochs 5
# Evaluate the model
python -m ml.training.evaluate --model-dir ml/artifacts/complexity-classifier
# Export to ONNX
python -m ml.export.convert_to_onnx --model-dir ml/artifacts/complexity-classifier
Dataset
The classifier is trained on the ARC dataset (AI2 Reasoning Challenge) which provides:
- Easy examples: Simple questions that can be handled by smaller models
- Challenge examples: Complex questions requiring more capable models
Alternatively, Easy2Hard-Bench can be used for continuous difficulty scores.