mirror of
https://github.com/gryf/coach.git
synced 2026-04-19 22:23:32 +02:00
Adding initial interface for backend and redis pubsub (#19)
* Adding initial interface for backend and redis pubsub * Addressing comments, adding super in all memories * Removing distributed experience replay
This commit is contained in:
committed by
zach dwiel
parent
a54ef2757f
commit
6b2de6ba6d
@@ -160,6 +160,8 @@ class EpisodicExperienceReplay(Memory):
|
||||
:param transition: a transition to store
|
||||
:return: None
|
||||
"""
|
||||
# Calling super.store() so that in case a memory backend is used, the memory backend can store this transition.
|
||||
super().store(transition)
|
||||
self.reader_writer_lock.lock_writing_and_reading()
|
||||
|
||||
if len(self._buffer) == 0:
|
||||
@@ -181,6 +183,9 @@ class EpisodicExperienceReplay(Memory):
|
||||
:param episode: the new episode to store
|
||||
:return: None
|
||||
"""
|
||||
# Calling super.store() so that in case a memory backend is used, the memory backend can store this episode.
|
||||
super().store(episode)
|
||||
|
||||
if lock:
|
||||
self.reader_writer_lock.lock_writing_and_reading()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user