TrajectoryIndex
python
TrajectoryIndex(configuration: TrajectoryStoreConfiguration, selection_configurations: dict[str, TrajectorySelectionConfiguration], rng: random.Random, repository: TrajectoryRepository, utilities: TrajectoryUtilityCatalog) -> NoneKeyed collection of trajectory buckets.
Properties
bucket_count
python
bucket_count: intMethods
attach_repository
python
attach_repository(repository: TrajectoryRepository) -> NonePoint this index at a newly restored repository (for example after a runtime state restore).
buckets_view
python
buckets_view() -> ItemsView[TrajectoryKey, TrajectoryBucket]Return the live (key, bucket) pairs; callers must not mutate the buckets.
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.
filtered_metric_summary
python
filtered_metric_summary(metric_key: str, *, floor: float | None = None, predicate: TrajectoryRecordFilter | None = None) -> TrajectoryMetricSummary | Noneinsert_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.
load_runtime_state_dict
python
load_runtime_state_dict(state: dict[str, Any]) -> Noneruntime_state_dict
python
runtime_state_dict() -> dict[str, Any]sample_with_reference
python
sample_with_reference(selection: str, *, filter_fn: TrajectoryRecordFilter | None = None, context: TrajectorySamplingContext | None = None) -> tuple[TrajectoryRecording, TrajectorySliceReference] | Nonestored_trajectory_ids
python
stored_trajectory_ids() -> set[int]Return the trajectory ids referenced by every currently-stored bucket entry.