tinker_cookbook.rl.TrajectoryGroup
class tinker_cookbook.rl.TrajectoryGroup(**)
A group of trajectories produced by one :class:EnvGroupBuilder.
Fields:
- trajectories_G (list[Trajectory])
- final_rewards_G (list[float]) – computed by the EnvGroupBuilder, looking at whole group
- metrics_G (list[Metrics])
- rollout_errors (list[RolloutError]) – Empty list means no trajectory errors occurred. Default:
field(default_factory=list).
get_total_rewards()
Get the total reward (return) for each trajectory in the group.
Returns: list[float]: Total rewards, one per trajectory in the group.