39784035924760e69ec50ab6ab29c8666a595eec,softlearning/replay_pools/replay_pool.py,ReplayPool,add_path,#ReplayPool#Any#,34
Before Change
:param path: Dict like one outputted by railrl.samplers.util.rollout
for i, (
observation,
action,
reward,
next_observation,
terminal,
agent_info,
env_info
) in enumerate(zip(
path["observations"],
path["actions"],
path["rewards"],
path["next_observations"],
path["terminals"],
path.get("agent_infos", {}),
path.get("env_infos", {}),
)):
self.add_sample(
observation=observation,
action=action,
reward=reward,
next_observation=next_observation,
terminal=terminal,
agent_info=agent_info,
env_info=env_info,
)
self.terminate_episode()
@abc.abstractmethod
def random_batch(self, batch_size):
After Change
path_length = path["observations"].shape[0]
self.add_samples(num_samples=path_length, **{
key: value
for key, value in path.items()
if key in self.field_names
})
self.terminate_episode()
In pattern: SUPERPATTERN
Frequency: 4
Non-data size: 6
Instances Project Name: rail-berkeley/softlearning
Commit Name: 39784035924760e69ec50ab6ab29c8666a595eec
Time: 2018-08-22
Author: kristian.hartikainen@gmail.com
File Name: softlearning/replay_pools/replay_pool.py
Class Name: ReplayPool
Method Name: add_path
Project Name: rail-berkeley/softlearning
Commit Name: 74ff03f3c373703439c3ed6bada477812f25bc96
Time: 2018-08-23
Author: kristian.hartikainen@gmail.com
File Name: softlearning/replay_pools/replay_pool.py
Class Name: ReplayPool
Method Name: add_path
Project Name: KhronosGroup/NNEF-Tools
Commit Name: 62b38fec099eb8a94c61fa032d05b305a9b7984f
Time: 2019-02-26
Author: tamas.danyluk@aimotive.com
File Name: parser/cpp/python/nnef.py
Class Name:
Method Name: format_invocation
Project Name: pfnet/optuna
Commit Name: 2e7dc431b92fd66702ec1c1cd3142c3335c0f490
Time: 2020-11-10
Author: imamura@ms.k.u-tokyo.ac.jp
File Name: optuna/storages/_rdb/storage.py
Class Name: RDBStorage
Method Name: _update_trial