run-leaderboard-evaluation
Skill này làm gì
Skill chạy đánh giá CARLA Leaderboard cho một agent lái xe trên một tập tuyến. Skill dành cho lập trình viên muốn chấm điểm agent và cần thiết lập đúng cho một lần kiểm tra dài.
Khi nào nên dùng
- ✓Khi bạn muốn đánh giá agent lái xe của mình trên các tuyến Leaderboard.
- ✓Khi một lần đánh giá dài bị lỗi và bạn muốn tiếp tục từ checkpoint.
- ✓Khi bạn muốn một smoke test nhanh trên một tuyến trước khi chạy đầy đủ.
Liên kết skill
https://github.com/carla-simulator/carla/blob/ue58-dev/Skills/leaderboard/run-leaderboard-evaluation/SKILL.mdSao chép rồi dán vào AI của bạn (Claude, ChatGPT hoặc Cursor) và nhờ nó làm theo hướng dẫn.
Cách dùng
Cách dễ nhất: sao chép tin nhắn và dán vào AI của bạn. AI sẽ đọc skill và làm theo hướng dẫn.
Tin nhắn có sẵn để dán
Dành cho Claude Code, Codex hoặc Cursor: chạy lệnh trong thư mục dự án của bạn và skill sẽ được cài đặt.
Tải tệp SKILL.md về và thả vào thư mục skill của agent.
Ví dụ cách nhờ AI
“Hãy chạy agent của tôi trên các tuyến devtest trước, rồi bắt đầu tập huấn luyện đầy đủ với checkpoint mà tôi có thể tiếp tục.”
5 skill mới mỗi tuần. Đọc chỉ 1 phút.
Cách hoạt động
Agent kiểm tra toàn bộ thiết lập trước khi bắt đầu, gồm phiên bản, bản đồ, lớp agent và cảm biến. Agent chạy smoke test trên một tập tuyến ngắn trước, rồi chạy tập đầy đủ và lưu checkpoint.
Nội dung kỹ thuật (SKILL.md gốc)
Lấy nguyên văn từ GitHub, do tác giả viết bằng tiếng Anh.
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
Câu hỏi thường gặp
Một lần chạy đầy đủ mất bao lâu?
Tập huấn luyện có 90 tuyến ở Town12, nên một lần chạy đầy đủ có thể mất hàng giờ, đó là lý do các kiểm tra được làm trước.
Lần chạy có tiếp tục được sau khi crash không?
Có. Bộ đánh giá ghi checkpoint mà một lần chạy có thể tiếp tục từ đó.
Các tập kiểm tra lớn cỡ nào?
Tập devtest có 2 tuyến, tập validation có 20, và tập huấn luyện có 90.
Chi tiết
Mô tả gốc của tác giả
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
Độ phổ biến
- Sao GitHub
- 15k
- Vị trí xếp hạng
- #11082
- Giấy phép
- MIT
- Cập nhật
- 2/11/2026
Bình luận
- …
Thêm skill từ kho mã này
create-leaderboard-route
15kGiúp agent của bạn tạo file tuyến đường CARLA Leaderboard bằng cách đặt các điểm waypoint và trigger kịch bản từ camera của simulator, rồi kiểm tra và sắp xếp chúng.
package-leaderboard-agent
15kGiúp agent của bạn đóng gói một agent lái xe thành image Docker để nộp lên CARLA Leaderboard, kiểm tra cấu trúc thư mục và thử rằng image nạp được agent.
read-leaderboard-results
15kGiúp agent của bạn đọc file kết quả CARLA Leaderboard, giải thích điểm và vi phạm của từng tuyến, và chấm lại một lần chạy theo phiên bản luật khác.
write-leaderboard-agent
15kGiúp agent của bạn viết một agent lái xe cho CARLA Leaderboard, với lớp đúng, cấu hình cảm biến trong giới hạn đường đua và file khởi đầu hoạt động.
Skill tương tự
test-driven-development
311kDạy agent của bạn viết kiểm thử thất bại trước, xem nó thất bại, rồi viết đoạn mã ngắn nhất để vượt qua trước khi làm bất kỳ tính năng hay bản sửa nào.
verification-before-completion
311kDạy agent của bạn chạy kiểm tra thực tế và đọc kết quả đầu ra trước khi khẳng định một việc, bản sửa hoặc bản build đã hoàn thành hay vượt qua.
migrate-to-shoehorn
310kThay các ép kiểu rủi ro trong tệp kiểm thử bằng thư viện shoehorn, để các bài kiểm thử dùng dữ liệu một phần vẫn qua được kiểm tra kiểu.