pytyche.viz.experiment_evolution_gif

pytyche.viz.experiment_evolution_gif(history, output_path, fps=0.2)[source]

Render the round-by-round experiment evolution to an animated GIF.

Each frame shows the round’s cell allocation, plus the round’s policy tree when one was fit.

Parameters:
  • history (Sequence[Any]) – Per-round experiment snapshots — the shipped L1 Experiment shape, consumed duck-typed: cells_shipped (the cell list plot_cells accepts) and next_recommendation carrying the round’s fitted tree (None on a plan with no fit, e.g. real-data cold starts).

  • output_path (str | Path) – Destination .gif path.

  • fps (float) – Frames (rounds) per second. Rounds are dense (a full policy tree per frame); the default holds each for five seconds.

Return type:

Path

Returns:

output_path as a Path.

Raises:

ValueError – When history is empty.