Skip to content

Performance - Profile self-play and training loops #11

Description

@Codex-Crusader

Summary

Profile the self-play and training loops to identify hotspots and gather data to guide optimizations.

Motivation

Profiling is required to prioritize where to optimize (e.g., vectorize training, batch model evaluations, reduce Python loops).

Acceptance criteria / Definition of Done

  • Add a profiling script (e.g., tools/profile_selfplay.py) that runs a short self-play/training workload and records function-level timings.
  • Produce a short report (markdown) listing the top 5 hotspots and one suggested optimization per hotspot.
  • Add instructions to docs/ describing how to reproduce the profiling run locally.

Implementation notes

  • Useful tools: cProfile, pyinstrument, line_profiler, or perf.
  • Capture both CPU time and (if present) GPU time (e.g., batch sizes and model forward timings).
  • If feasible, include benchmarks before/after a small optimization patch.

Complexity

Medium , research + measurement focused.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions