flatland.evaluators.trajectory_evaluator module

flatland.evaluators.trajectory_evaluator module#

class flatland.evaluators.trajectory_evaluator.TrajectoryEvaluator(trajectory: Trajectory, callbacks: FlatlandCallbacks | None = None)[source]#

Bases: object

evaluate(start_step: int | None = None, end_step: int | None = None, snapshot_interval=0, tqdm_kwargs: dict | None = None)[source]#
The data is structured as follows:
-30x30 map

Contains the data to replay the episodes. - <n>_trains – for n in 10,15,20,50

  • event_logs

    ActionEvents.discrete_action – holds set of action to be replayed for the related episodes. TrainMovementEvents.trains_arrived – holds success rate for the related episodes. TrainMovementEvents.trains_positions – holds the positions for the related episodes.

  • serialised_state

    <ep_id>.pkl – Holds the pickled environment version for the episode.

All these episodes are with constant speed of 1 and malfunctions free.

Parameters

end_stepint

stop evaluation at intermediate step excl.

renderingbool

render while evaluating

snapshot_intervalint

interval to write pkl snapshots to outputs/serialised_state subdirectory (not serialised_state subdirectory directly). 1 means at every step. 0 means never.

tqdm_args: dict

additional kwargs for tqdm