def process_rollout(self, batch_info, rollout: Rollout):
assert isinstance(rollout, Trajectories), "<STR_LIT>"<EOL>advantages = discount_bootstrap_gae(<EOL>rewards_buffer=rollout.transition_tensors['<STR_LIT>'],<EOL>dones_buffer=rollout.transition_tensors['<STR_LIT>'],<EOL>values_buffer=rollout.transition_tensors['<STR_LIT>'],<EOL>final_values=rollout.rollout_tensors['<STR_LIT>'],<EOL>discount_factor=self.discount_factor,<EOL>gae_lambda=self.gae_lambda,<EOL>number_of_steps=rollout.num_steps<EOL>)<EOL>returns = advantages + rollout.transition_tensors['<STR_LIT>']<EOL>rollout.transition_tensors['<STR_LIT>'] = advantages<EOL>rollout.transition_tensors['<STR_LIT>'] = returns<EOL>return rollout<EOL>
Process rollout for ALGO before any chunking/shuffling