PPOExperimentMilestoneLog
python
PPOExperimentMilestoneLog(file_path: Path, config: PPOExperimentConfiguration, *, score_metric: str = 'score', score_bands: tuple[int, ...] = (100, 200, 300, 400, 500)) -> NoneAppend-only milestone log for PPO experiment runs.
Initialize the experiment milestone log.
Parameters:
file_path(Path) – CSV file updated in place for the active run.config(PPOExperimentConfiguration) – Experiment configuration serialised intosettings_json.score_metric(str) – Episode-data key used for score-band milestones.score_bands(tuple[int, ...]) – First-hit score thresholds to record for actor/tester progress.
Methods
fieldnames
python
fieldnames() -> list[str]Return the CSV field order for the milestone log.
Returns:
list[str]– The persisted field names.
finish_run
python
finish_run() -> NoneMark the current run as stopped and stamp its end time.
record_actor_episode
python
record_actor_episode(episode_data: dict[str, float], step: int, is_win: bool, timing: TimingSnapshot) -> NoneRecord first-hit actor milestones for one completed episode.
Parameters:
episode_data(dict[str, float]) – Numeric actor episode data.step(int) – Actor environment step at episode completion.is_win(bool) – Whether the actor episode ended in a win.timing(TimingSnapshot) – Timing snapshot captured at completion.
record_checkpoint
python
record_checkpoint(checkpoint_number: int) -> NoneRecord the latest saved checkpoint for the active run row.
Parameters:
checkpoint_number(int) – The checkpoint number that was just saved.
record_tester_episode
python
record_tester_episode(episode_data: dict[str, float], episode: int, is_win: bool, timing: TimingSnapshot) -> NoneRecord first-hit tester milestones for one completed episode.
Parameters:
episode_data(dict[str, float]) – Numeric tester episode data.episode(int) – Tester episode number at episode completion.is_win(bool) – Whether the tester episode ended in a win.timing(TimingSnapshot) – Timing snapshot captured at completion.
start_run
python
start_run(run_id: str, output_directory: Path, *, game_name: str, algorithm: str, experiment_name: str) -> NoneCreate or refresh the current run row in the milestone log.
Parameters:
run_id(str) – Stable run identifier. Resumed runs should reuse the same ID.output_directory(Path) – Output directory for the active run.game_name(str) – Logical game name for the run.algorithm(str) – Algorithm name, for exampleppo.experiment_name(str) – Concrete experiment class name.