flashbax icon indicating copy to clipboard operation
flashbax copied to clipboard

Index trajectories at particular index from buffer

Open shariqfz opened this issue 1 year ago • 1 comments

Can we get trajectories at particular index from the TrajectoryBuffer or ItemBuffer. Something like buffer.get_trajectory(state, trajectory_index), since buffer.sample(state, rng_key) returns a random slice from the buffer.

shariqfz avatar Sep 13 '24 19:09 shariqfz

You would have to specify the batch index as well as the starting time index but this is pretty easy functionality to add.

EdanToledo avatar Sep 20 '24 10:09 EdanToledo