Skip to content
This repository has been archived by the owner on Dec 11, 2022. It is now read-only.

Fix type annotation #485

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions rl_coach/memories/non_episodic/experience_replay.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
# limitations under the License.
#

from typing import List, Tuple, Union
from typing import List, Tuple, Union, Generator
import pickle
import random
import math
Expand Down Expand Up @@ -92,7 +92,7 @@ def sample(self, size: int) -> List[Transition]:
self.reader_writer_lock.release_writing()
return batch

def get_shuffled_training_data_generator(self, size: int) -> List[Transition]:
def get_shuffled_training_data_generator(self, size: int) -> Generator[List[Transition], None, None]:
"""
Get an generator for iterating through the shuffled replay buffer, for processing the data in epochs.
If the requested size is larger than the number of samples available in the replay buffer then the batch will
Expand Down