run-leaderboard-evaluation
What it does
The skill runs the CARLA Leaderboard evaluation for a driving agent across a set of routes. It is for developers who want to score their agent and need a long test run set up correctly.
When to use it
- βWhen you want to evaluate your driving agent on Leaderboard routes.
- βWhen a long evaluation crashed and you want to resume it from a checkpoint.
- βWhen you want a quick smoke test on one route before a full run.
Skill link
https://github.com/carla-simulator/carla/blob/ue58-dev/Skills/leaderboard/run-leaderboard-evaluation/SKILL.mdCopy it and paste it into your AI (Claude, ChatGPT or Cursor), asking it to follow the instructions.
How to use
The easiest way: copy the message and paste it into your AI. It reads the skill and follows the instructions.
Ready-to-paste message
For Claude Code, Codex or Cursor: run it in your project folder and the skill gets installed.
Download the SKILL.md and drop it into your agentβs skills folder.
Example of what to ask your AI
βRun my agent on the devtest routes first, then start the full training set with a checkpoint I can resume from.β
5 new skills a week. 1 minute to read.
How it works
The agent checks the whole setup before starting, including the versions, the maps, the agent class, and the sensors. It runs a smoke test on a short route set first, then runs the full set and saves checkpoints.
Technical content (original SKILL.md)
Original text by the author, straight from GitHub.
Run a leaderboard evaluation
Paths.
scripts/β¦andreferences/β¦below are relative to the directory holding this SKILL.md. Your working directory is the user's project, not that directory, so prefix them with its absolute path or the command is not found.
leaderboard_evaluator.py drives your agent through each route, records
infractions, computes a driving score and writes a JSON checkpoint it can resume
from. It is a long-running batch job: routes_devtest.xml is 2 routes,
routes_validation.xml is 20, routes_training.xml is 90 routes in Town12 β
hours of wall clock, so the preflight matters more than usual.
Instructions
Progress:
- [ ] Step 1: Preflight everything (bash scripts/check_env.sh) β clear every FAIL
- [ ] Step 2: Smoke-test on one devtest route
- [ ] Step 3: Run the real set, with a checkpoint you can resume from
- [ ] Step 4: Read the results (read-leaderboard-results)
Step 1: Preflight
source scripts/env.sh
bash scripts/check_env.sh
This is the skill's main value. It checks, before anything expensive: the
leaderboard version, that scenario_runner is on the paired branch, that carla
/ agents / srunner / leaderboard all import, that the agent file exists and
defines the class the evaluator will look for, that the track is valid for the
version, and that Town12/Town13 exist on the running server.
Step 2-3: Run
source scripts/env.sh
# smoke test: one route, debug on
TEAM_AGENT="$LEADERBOARD_ROOT/leaderboard/autoagents/npc_agent.py" \
bash scripts/run_leaderboard.sh --routes-subset 0 --debug 1
# your agent over the validation set, resumable
TEAM_AGENT=~/team_code/my_agent.py TEAM_CONFIG=~/team_code/config.json \
CHECKPOINT_ENDPOINT=~/results/validation.json \
bash scripts/run_leaderboard.sh --routes "$LEADERBOARD_ROOT/data/routes_validation.xml"
# a slice of the training set, 3 repetitions each
bash scripts/run_leaderboard.sh --routes-subset '0-4,10' --repetitions 3
# resume after a crash β picks up where the checkpoint left off
bash scripts/run_leaderboard.sh --resume 1
The wrapper sets the environment, runs the preflight, then calls the evaluator.
The repo's own run_leaderboard.sh does the same thing with less checking β and
note it references DEBUG_CHECKPOINT_ENDPOINT without ever exporting it, so live
results silently go nowhere. This wrapper defaults it next to the checkpoint.
Everything the evaluator accepts, and what it means:
| Flag / env | Meaning |
|---|---|
--routes / ROUTES |
route XML (default data/routes_devtest.xml) |
--routes-subset / ROUTES_SUBSET |
'' = all, 0-4, 1,6,8, or 0-2,5,8-10 |
--repetitions / REPETITIONS |
repeats per route; each gets a fresh TM seed |
--track / CHALLENGE_TRACK_CODENAME |
SENSORS, MAP, SENSORS_QUALIFIER, MAP_QUALIFIER |
--agent / TEAM_AGENT |
the agent .py |
--agent-config / TEAM_CONFIG |
passed to your setup() |
--checkpoint / CHECKPOINT_ENDPOINT |
results JSON; also the resume state |
--debug-checkpoint / DEBUG_CHECKPOINT_ENDPOINT |
live text results, written when --debug >= 2 |
--debug / DEBUG_CHALLENGE |
0 quiet, 1 route/scenario info, 2+ live results |
--record / RECORD_PATH |
CARLA recorder output directory |
--resume / RESUME |
continue from the checkpoint instead of restarting |
--timeout |
per-route client timeout, default 300 s |
--traffic-manager-seed |
fixed per run; repetitions vary it deterministically |
--routes-subset is indices into the file, not route ids. They coincide in the
shipped files because ids are sequential from 0, but not in a hand-edited file.
What the evaluator forces
_setup_simulation applies these regardless of the server's current settings:
synchronous_mode = True, fixed_delta_seconds = 1/20
deterministic_ragdolls = True, spectator_as_ego = False
traffic_manager: synchronous, hybrid_physics_mode = True
per load_world: tile_stream_distance = 650, actor_active_distance = 650
world.reset_all_traffic_lights()
So do not bother setting weather, sync or TM options beforehand β they are overwritten. The 20 Hz tick rate is fixed and is what your agent's per-tick budget is measured against.
Step 4: Aftermath
The evaluator resets the world to async itself in _reset_world_settings, but
only if the run did not time out (`if self.world and self.manager and not
self._client_timed_out
FAQ
How long does a full run take?
The training set has 90 routes in Town12, so a full run can take hours, which is why the checks come first.
Can a run resume after a crash?
Yes. The evaluator writes checkpoints that a run can resume from.
How big are the test sets?
The devtest set has 2 routes, the validation set has 20, and the training set has 90.
Details
Original description by the author
Runs the CARLA Leaderboard evaluator over a set of routes with your agent β routes/routes-subset/repetitions/track selection, checkpoint and live-results endpoints, resume after a crash, recording, and the debug levels β for leaderboard 1.0, 2.0 or 2.1. Preflights the whole stack (version pairing, maps, ports, agent class, sensor budget) before spending hours, and hands the world back in async mode. Use when the user asks to "run the leaderboard", "evaluate my agent", "run routes_training", "resume an evaluation", or "reproduce my submission locally".
repo: carla-simulator/carla
Popularity
- GitHub stars
- 15k
- Ranking position
- #11082
- License
- MIT
- Updated
- 11/2/2026
Comments
- β¦
More skills from this repository
create-leaderboard-route
15kHelps your agent build CARLA Leaderboard route files by placing waypoints and scenario triggers from the simulator camera, then checking and ordering them.
package-leaderboard-agent
15kHelps your agent package a driving agent into a Docker image for CARLA Leaderboard submission, checking the folder layout and testing that the image loads it.
read-leaderboard-results
15kHelps your agent read a CARLA Leaderboard results file, explain each route's score and infractions, and rescore a run under the other rule version.
write-leaderboard-agent
15kHelps your agent write a driving agent for the CARLA Leaderboard, with the correct class, a sensor setup within the track limits, and a working starting file.
Similar skills
test-driven-development
311kTeaches your agent to write a failing test first, watch it fail, then write the smallest code that passes, before building any feature or fix.
verification-before-completion
311kTeaches your agent to run real checks and read their output before claiming that a task, fix, or build is complete or passing.
migrate-to-shoehorn
310kReplaces risky type casts in your test files with the shoehorn library, so tests can use partial data and still pass type checks.