pytyche.experiment.schedule

Schedule protocol + shipped variants for per-round visitor counts.

A schedule answers one question per round: how many visitors does round rounds_completed get? None signals stop. GeometricSchedule is the doubling-batch default (Perchet 2016; Esfandiari 2021; Che & Namkoong 2023); FixedSchedule and ExplicitSchedule cover flat and fully-custom plans. Custom implementations only need the two protocol members — no shipped base class is required.

Classes

ExplicitSchedule(sizes)

User-supplied per-round visitor counts; one round per entry.

FixedSchedule(per_round, n_rounds)

Flat per-round visitor count for a bounded number of rounds.

GeometricSchedule(initial[, growth, n_rounds])

Doubling-batch schedule: round i gets initial * growth**i visitors.

Schedule(*args, **kwargs)

Per-round visitor-count contract consumed by SequentialExperiment.

class pytyche.experiment.schedule.Schedule(*args, **kwargs)[source]

Bases: Protocol

Per-round visitor-count contract consumed by SequentialExperiment.

class pytyche.experiment.schedule.GeometricSchedule(initial, growth=2.0, n_rounds=None)[source]

Bases: object

Doubling-batch schedule: round i gets initial * growth**i visitors.

n_rounds=None is open-ended — the operator stops the loop. Non-integer products round to the nearest int.

Parameters:
  • initial (int)

  • growth (float)

  • n_rounds (int | None)

class pytyche.experiment.schedule.FixedSchedule(per_round, n_rounds)[source]

Bases: object

Flat per-round visitor count for a bounded number of rounds.

Parameters:
  • per_round (int)

  • n_rounds (int)

class pytyche.experiment.schedule.ExplicitSchedule(sizes)[source]

Bases: object

User-supplied per-round visitor counts; one round per entry.

Parameters:

sizes (Sequence[int])