TrajectoryRepositorySegment
python
TrajectoryRepositorySegment(initial_state: bytes, action_start: int, action_stop: int, start_values: dict[str, int], end_values: dict[str, int], metadata: dict[str, float], end_state: bytes | None = None, start_eligible: bool = True, end_frame_stack: bytes | None = None) -> NoneOne canonical marker-to-marker slice stored in the trajectory repository.
Methods
from_recording
python
from_recording(recording: TrajectoryRecording, *, action_start: int, action_stop: int) -> TrajectoryRepositorySegmentfrom_state_dict
python
from_state_dict(state: dict[str, Any]) -> TrajectoryRepositorySegmentto_state_dict
python
to_state_dict() -> dict[str, Any]Values
action_start
python
action_start: intaction_stop
python
action_stop: intend_frame_stack
python
end_frame_stack: bytes | None = NoneObservation frame stack at end_state, for seeding a restart from this segment.
Deliberately NOT serialised: it is derived by replaying the route, so it is rebuilt on load rather than bloating every checkpoint by ~29KB per segment. A restart without it fills the stack by repeating the restored frame, which shows the policy a world in which nothing is moving.
end_state
python
end_state: bytes | None = Noneend_values
python
end_values: dict[str, int]initial_state
python
initial_state: bytesmetadata
python
metadata: dict[str, float]start_eligible
python
start_eligible: bool = Truestart_values
python
start_values: dict[str, int]