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:
- checks out your committed code,
- puts your model weights back at the same paths,
- installs your dependencies with
uv sync --locked, - runs your script from the repository root,
- collects
predictions.jsonfrom the repository root.
The starter my_eval.py shows the minimum required:
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:
Run your script locally with the committed dependency versions:
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.
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.