Skip to content

Build your solution

Your repository is a normal Python project managed with uv. Work on it the way you usually would: use branches, open pull requests, and train wherever you like.

The inference script

When you submit, the evaluation server:

  1. checks out your committed code,
  2. puts your model weights back at the same paths,
  3. installs your dependencies with uv sync --locked,
  4. runs your script from the repository root,
  5. collects predictions.json from the repository root.

The starter my_eval.py shows the minimum required:

my_eval.py
import json
from pathlib import Path

def main():
    Path("predictions.json").write_text(json.dumps({"predictions": [0, 1, 0]}))

if __name__ == "__main__":
    main()

Replace the placeholder with your model's inference. Keep it lean, because everything this script does is measured: loading, preprocessing and prediction.

Limits

predictions.json must be valid JSON and at most 5 MB.

You can split your code into several modules and import them normally. Any script in the repository can be submitted (see Submit).

Dependencies

Add packages with uv. This updates pyproject.toml and uv.lock, and both must be committed:

uv add scikit-learn
git add pyproject.toml uv.lock
git commit -m "feat: add scikit-learn"

Run your script locally with the committed dependency versions:

uv run --locked python my_eval.py

See the uv cheat sheet for installing, removing and upgrading packages.

Tip

The .gitignore written by the CLI already ignores predictions.json, emissions.csv and common weight files (*.bin, *.safetensors, *.pt, *.onnx, *.pkl…). Any other untracked file is left out of the submission, and the CLI warns you about it.

Model weights

Put model files or folders under models/ and don't commit them to Git. The CLI uploads them for you at submission time.

models/
├── .gitkeep
└── distilbert/
    ├── config.json
    └── model.safetensors

In your script, load them with paths relative to the repository root, for example models/distilbert.

Weights are not shared through Git. To use a teammate's model, copy the files into your own models/ folder, or submit from their machine.