Skip to content

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) -> None

One canonical marker-to-marker slice stored in the trajectory repository.

Source

Methods ​

from_recording ​

python
from_recording(recording: TrajectoryRecording, *, action_start: int, action_stop: int) -> TrajectoryRepositorySegment

Source

from_state_dict ​

python
from_state_dict(state: dict[str, Any]) -> TrajectoryRepositorySegment

Source

to_state_dict ​

python
to_state_dict() -> dict[str, Any]

Source

Values ​

action_start ​

python
action_start: int

Source

action_stop ​

python
action_stop: int

Source

end_frame_stack ​

python
end_frame_stack: bytes | None = None

Observation 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.

Source

end_state ​

python
end_state: bytes | None = None

Source

end_values ​

python
end_values: dict[str, int]

Source

initial_state ​

python
initial_state: bytes

Source

metadata ​

python
metadata: dict[str, float]

Source

start_eligible ​

python
start_eligible: bool = True

Source

start_values ​

python
start_values: dict[str, int]

Source