ray.rllib.offline.offline_prelearner.OfflinePreLearner._map_sample_batch_to_episode#

static OfflinePreLearner._map_sample_batch_to_episode(is_multi_agent: bool, batch: Dict[str, list | numpy.ndarray], schema: Dict[str, str] = {'actions': 'actions', 'agent_id': 'agent_id', 'agent_index': 'agent_index', 'dones': 'dones', 'eps_id': 'eps_id', 'infos': 'infos', 'module_id': 'module_id', 'new_obs': 'new_obs', 'obs': 'obs', 'rewards': 'rewards', 't': 't', 'terminateds': 'terminateds', 'truncateds': 'truncateds', 'unroll_id': 'unroll_id'}, finalize: bool = False, input_compress_columns: List[str] | None = None) Dict[str, List[SingleAgentEpisode | MultiAgentEpisode]][source]#

Maps an old stack SampleBatch to new stack episodes.