Extend analyze.py for ISMCTS metrics
- Loss section: add ISMCTS policy/value twin-axis panel alongside the Deep CFR advantage/strategy panel. Both render only when their keys exist; the unused side shows "No data". - Memory Size: add memory/replay alongside memory/advantage and memory/strategy. - New MCTS section (analysis_09_mcts.png): visit-count entropy, value prediction error, policy/MCTS KL — three iter-time scalars emitted by IsMctsTrainer. Auto-skips on Deep CFR runs (no data).
This commit is contained in:
@@ -90,6 +90,14 @@ SECTIONS: tuple[SectionSpec, ...] = (
|
||||
secondary_metrics=("loss/strategy",),
|
||||
secondary_ylabel="strategy CE",
|
||||
),
|
||||
PlotSpec(
|
||||
"Losses (ISMCTS policy / value)",
|
||||
("loss/policy",),
|
||||
"policy CE",
|
||||
kind="train",
|
||||
secondary_metrics=("loss/value",),
|
||||
secondary_ylabel="value MSE",
|
||||
),
|
||||
PlotSpec(
|
||||
"Samples",
|
||||
("samples/advantage", "samples/strategy"),
|
||||
@@ -98,7 +106,7 @@ SECTIONS: tuple[SectionSpec, ...] = (
|
||||
),
|
||||
PlotSpec(
|
||||
"Memory Size",
|
||||
("memory/advantage", "memory/strategy"),
|
||||
("memory/advantage", "memory/strategy", "memory/replay"),
|
||||
"samples",
|
||||
kind="train",
|
||||
),
|
||||
@@ -287,6 +295,30 @@ SECTIONS: tuple[SectionSpec, ...] = (
|
||||
),
|
||||
),
|
||||
),
|
||||
SectionSpec(
|
||||
"MCTS",
|
||||
"analysis_09_mcts.png",
|
||||
(
|
||||
PlotSpec(
|
||||
"Visit-count entropy at root",
|
||||
("mcts/avg_visit_entropy",),
|
||||
"nats",
|
||||
kind="train",
|
||||
),
|
||||
PlotSpec(
|
||||
"Value prediction error",
|
||||
("mcts/value_prediction_error",),
|
||||
"MSE (score units)",
|
||||
kind="train",
|
||||
),
|
||||
PlotSpec(
|
||||
"Policy / MCTS KL",
|
||||
("mcts/policy_mcts_kl",),
|
||||
"KL (nats)",
|
||||
kind="train",
|
||||
),
|
||||
),
|
||||
),
|
||||
)
|
||||
|
||||
SUMMARY_EVAL_METRICS: tuple[tuple[str, str, float], ...] = (
|
||||
|
||||
Reference in New Issue
Block a user