Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix type annotation of ExperienceSource.__iter__ #645

Merged
merged 1 commit into from May 14, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 2 additions & 2 deletions pl_bolts/datamodules/experience_source.py
Expand Up @@ -4,7 +4,7 @@
"""
from abc import ABC
from collections import deque, namedtuple
from typing import Callable, Iterable, List, Tuple
from typing import Callable, Iterator, List, Tuple

import torch
from torch.utils.data import IterableDataset
Expand All @@ -30,7 +30,7 @@ class ExperienceSourceDataset(IterableDataset):
def __init__(self, generate_batch: Callable) -> None:
self.generate_batch = generate_batch

def __iter__(self) -> Iterable:
def __iter__(self) -> Iterator:
iterator = self.generate_batch()
return iterator

Expand Down