コンテンツにスキップ

Test Map

更新日: 2026-07-05

変更内容ごとに走らせるテストをまとめる。迷ったら最後に unittest discover -s tests を実行する。

Quick Commands

PYTHONPATH=src uv run python -m py_compile src/pca/search/ismcts/impl.py
PYTHONPATH=src uv run python -m pca.training.selfplay --help
PYTHONPATH=src uv run python -m unittest tests.test_module_boundaries
PYTHONPATH=src uv run python -m unittest discover -s tests

Module Boundaries

Change Tests
__all__ / facade / re-export tests.test_module_boundaries
pca.training.dataset compatibility tests.test_module_boundaries, tests.test_training
pca.search.ismcts.types compatibility tests.test_module_boundaries, tests.test_encoder
CLI --help / argparse module --help smoke test

Encoder / Decision

Change Tests
observation tokenization tests.test_encoder
action encoding / selected action tests.test_encoder
PolicyDecision behavior tests.test_encoder
neural policy batch tests.test_encoder
heuristic reranker tests.test_reranker if available, plus tests.test_encoder

Search / ISMCTS

Change Tests
search value profile tests.test_encoder
leaf value / aux prize value tests.test_encoder -k aux_prize or full tests.test_encoder
candidate pruning / visit distribution tests.test_encoder
runtime stats tests.test_encoder, tests.test_selfplay_summary
public-state key tests.test_encoder

Self-Play

Change Tests
record schema / JSONL output tests.test_encoder, tests.test_selfplay_summary, tests.test_training
summary stats / CSV tests.test_selfplay_summary
rule-agent teacher weight tests.test_rule_agents, tests.test_training
CLI defaults python -m pca.training.selfplay --help, tests.test_module_boundaries
parallel stream output targeted self-play smoke if feasible, plus JSONL append tests

Training

Change Tests
JSONL loader / filters tests.test_training
search collate tests.test_training
belief collate tests.test_training
policy/value loss tests.test_training
checkpoint load / model config tests.test_training
metadata cache/table tests.test_training

Evaluation / Submission

Change Tests
evaluation summaries tests.test_module_boundaries, targeted evaluation tests if present
bundle loader bundle smoke if available
submission load path local bundle smoke if available
tournament CLI python -m pca.evaluation.tournament --help

Full Verification

Use after refactors, schema changes, or public API changes:

PYTHONPATH=src uv run python -m unittest discover -s tests

Use before long self-play:

PYTHONPATH=src uv run python -m pca.training.selfplay --help
PYTHONPATH=src uv run python -m unittest tests.test_module_boundaries tests.test_encoder tests.test_selfplay_summary