Skip to main content
The challenge package is the public-facing repository that ML engineers (Crunchers) use to participate in your competition. When you scaffold a workspace with crunch-node init, the challenge/ directory contains a complete working example. Your challenge package should include:
  • Model interface — The base class that all participant models must implement
  • Scoring function — Lets participants evaluate their models locally
  • Quickstarter examples — Working models that participants can copy and adapt
  • Backtest harness — Lets participants run their models against historical data
The end goal is to publish this as a PyPI package that any Cruncher can pip install to get started.

Default scaffold

The challenge/ directory created by crunch-node init has this structure:

Model interface

The TrackerBase class in tracker.py defines the contract between your Crunch Node and every Cruncher submission:
Key design decisions:
  • tick() receives market data on every feed update — models use it to maintain internal state (e.g., price history, indicators)
  • predict() returns a prediction for a specific scope — the return format must match your InferenceOutput type
The MODEL_BASE_CLASSNAME in your Crunch Node environment must match this class. For the default scaffold, it’s tracker.TrackerBase.

Scoring function

The scaffold includes a scoring function in scoring.py that participants can use for local testing:
Replace this with your actual evaluation logic. This same function is used by the score worker in production (via the SCORING_FUNCTION environment variable).

Quickstarter examples

The examples/ directory contains working models that participants can copy and adapt. The default scaffold includes three strategies: These give participants a working starting point and demonstrate the patterns your interface expects.
Quickstarters are the single most important factor for participation rates. Make sure they work out of the box and are easy to modify.

Backtest harness

The challenge package includes a backtest harness so participants can evaluate their models against historical data before submitting:
The backtest harness:
  • Auto-fetches data from the Coordinator and caches locally on first run
  • Uses the same tick()predict() loop as production
  • Applies the same scoring function and multi-metric evaluation as the live leaderboard

Publishing to PyPI

For participants to install your package, publish it to PyPI:
Participants then install and use it:
Replace starter-challenge with your competition’s package name in pyproject.toml before publishing.

Next: Define your own Crunch

Customize the prediction task, scoring function, and challenge package to build your own competition.