Skip to content

TrajectoryIndex ​

python
TrajectoryIndex(configuration: TrajectoryStoreConfiguration, selection_configurations: dict[str, TrajectorySelectionConfiguration], rng: random.Random, repository: TrajectoryRepository, utilities: TrajectoryUtilityCatalog) -> None

Keyed collection of trajectory buckets.

Source

Properties ​

bucket_count ​

python
bucket_count: int

Source

Methods ​

attach_repository ​

python
attach_repository(repository: TrajectoryRepository) -> None

Point this index at a newly restored repository (for example after a runtime state restore).

Source

buckets_view ​

python
buckets_view() -> ItemsView[TrajectoryKey, TrajectoryBucket]

Return the live (key, bucket) pairs; callers must not mutate the buckets.

Source

debug_bucket_weights ​

python
debug_bucket_weights(name: str, *, context: TrajectorySamplingContext) -> dict[TrajectoryKey, float]

Return one named selector's current per-bucket sampling weights, for checkpoint debug exports.

Source

filtered_metric_summary ​

python
filtered_metric_summary(metric_key: str, *, floor: float | None = None, predicate: TrajectoryRecordFilter | None = None) -> TrajectoryMetricSummary | None

Source

insert_paths ​

python
insert_paths(references: list[TrajectoryReferenceRecording]) -> list[TrajectoryInsertOutcome]

Insert several references, refreshing each touched selector bucket at most once.

Parameters:

  • references (list[TrajectoryReferenceRecording]) – The trajectory references to insert, in order.

Returns:

  • list[TrajectoryInsertOutcome] – The insert outcome for each reference, in the same order.

Source

load_runtime_state_dict ​

python
load_runtime_state_dict(state: dict[str, Any]) -> None

Source

runtime_state_dict ​

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

Source

sample_with_reference ​

python
sample_with_reference(selection: str, *, filter_fn: TrajectoryRecordFilter | None = None, context: TrajectorySamplingContext | None = None) -> tuple[TrajectoryRecording, TrajectorySliceReference] | None

Source

stored_trajectory_ids ​

python
stored_trajectory_ids() -> set[int]

Return the trajectory ids referenced by every currently-stored bucket entry.

Source