9bdbb11cf27060e7847a87dcdf691dd6b96ce6df,rlkit/data_management/obs_dict_replay_buffer.py,ObsDictRelabelingBuffer,random_batch,#ObsDictRelabelingBuffer#,171

Before Change


                // random.choice is doing
                num_options = len(possible_future_obs_idxs)
                next_obs_i = int(np.random.randint(0, num_options))
                future_obs_idxs.append(possible_future_obs_idxs[next_obs_i])
            future_obs_idxs = np.array(future_obs_idxs)
            resampled_goals[-num_future_goals:] = self._next_obs[
                self.achieved_goal_key
            ][future_obs_idxs]

After Change


            //// better future obs sample algorithm
            future_indices = indices[-num_future_goals:]
            possible_future_obs_lens = np.array([len(self._idx_to_future_obs_idx[i]) for i in future_indices])
            next_obs_idxs = (np.random.random(num_future_goals) * possible_future_obs_lens).astype(np.int)
            future_obs_idxs = np.array([self._idx_to_future_obs_idx[ids][next_obs_idxs[i]] for i, ids in enumerate(future_indices)])

            resampled_goals[-num_future_goals:] = self._next_obs[
                self.achieved_goal_key
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 5

Non-data size: 3

Instances


Project Name: vitchyr/rlkit
Commit Name: 9bdbb11cf27060e7847a87dcdf691dd6b96ce6df
Time: 2020-08-09
Author: 38036768+YangRui2015@users.noreply.github.com
File Name: rlkit/data_management/obs_dict_replay_buffer.py
Class Name: ObsDictRelabelingBuffer
Method Name: random_batch


Project Name: PacktPublishing/Deep-Reinforcement-Learning-Hands-On
Commit Name: f33446be0e9e8deb631477db30f20ac436491f24
Time: 2018-02-17
Author: max.lapan@gmail.com
File Name: ch16/01_cartpole_es.py
Class Name:
Method Name: sample_noise


Project Name: tyarkoni/pliers
Commit Name: 005968dcfbd2a8f70d8ea3957c8abba60a12492d
Time: 2018-05-15
Author: quinten.mcnamara@gmail.com
File Name: pliers/filters/video.py
Class Name: FrameSamplingFilter
Method Name: _filter


Project Name: dask/dask-image
Commit Name: 17ec4c25d6b26300bbcdb6bfe781595bd2586a96
Time: 2020-10-25
Author: marvin.albert@gmail.com
File Name: dask_image/imread/__init__.py
Class Name:
Method Name: imread


Project Name: MLWave/kepler-mapper
Commit Name: 9fc7493e3ffd84640f364fdc1e6a4bb06240472e
Time: 2019-02-27
Author: dave@daveeargle.com
File Name: kmapper/kmapper.py
Class Name: KeplerMapper
Method Name: map