1
0
mirror of https://github.com/gryf/coach.git synced 2025-12-17 11:10:20 +01:00

remove unused method: update_last_transition_info

This commit is contained in:
Zach Dwiel
2018-09-07 14:50:50 -04:00
committed by zach dwiel
parent fb21251157
commit cccfe88f9b
2 changed files with 0 additions and 31 deletions

View File

@@ -273,23 +273,6 @@ class EpisodicExperienceReplay(Memory):
"""
self.remove_episode(episode_index)
def update_last_transition_info(self, info: Dict[str, Any]) -> None:
"""
Update the info of the last transition stored in the memory
:param info: the new info to append to the existing info
:return: None
"""
self.reader_writer_lock.lock_writing_and_reading()
episode = self._buffer[-1]
if episode.length() == 0:
if len(self._buffer) < 2:
return
episode = self._buffer[-2]
episode.transitions[-1].info.update(info)
self.reader_writer_lock.release_writing_and_reading()
def clean(self) -> None:
"""
Clean the memory by removing all the episodes

View File

@@ -182,20 +182,6 @@ class ExperienceReplay(Memory):
"""
self.remove_transition(transition_index, lock)
def update_last_transition_info(self, info: Dict[str, Any]) -> None:
"""
Update the info of the last transition stored in the memory
:param info: the new info to append to the existing info
:return: None
"""
self.reader_writer_lock.lock_writing_and_reading()
if self.length() == 0:
raise ValueError("There are no transition in the replay buffer")
self.transitions[-1].info.update(info)
self.reader_writer_lock.release_writing_and_reading()
def clean(self, lock: bool=True) -> None:
"""
Clean the memory by removing all the episodes