Skip to content

Statistics

Exported from sekai and sekai.stats. See the Episode statistics guide.

EpisodeStats dataclass

EpisodeStats(episode_return: float, episode_length: int, elapsed_time: float, start_time: float, end_time: float, terminated: bool, truncated: bool, extra: dict[str, Any] = dict())

Typed episode statistics — not an untyped dict.

StatsTracker

Bases: Protocol

Protocol for pluggable statistics collection backends.

InMemoryTracker

InMemoryTracker(max_episodes: int | None = 100)

Keeps a rolling window of EpisodeStats in memory.

LoggingTracker

LoggingTracker(logger: Logger | None = None)

Emits structured log records for each completed episode.