Skip to content

Commit

Permalink
Fix mypy issues
Browse files Browse the repository at this point in the history
  • Loading branch information
SvenDS9 committed Feb 15, 2023
1 parent eee76b3 commit 181f2f6
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions torchdata/datapipes/iter/util/converter.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,7 @@
# LICENSE file in the root directory of this source tree.

import warnings

from typing import Callable, Dict, Optional
from typing import Callable, Dict, Iterator, Optional

from torch.utils.data import IterDataPipe, MapDataPipe
from torch.utils.data.datapipes.utils.common import _check_unpickable_fn, DILL_AVAILABLE
Expand Down Expand Up @@ -59,6 +58,8 @@ class IterToMapConverterMapDataPipe(MapDataPipe):
key_value_fn: Optional[Callable]
_map: Optional[Dict]
_length: int
_itr: Optional[Iterator]
_depleted: bool

def __init__(self, datapipe: IterDataPipe, key_value_fn: Optional[Callable] = None):
if not isinstance(datapipe, IterDataPipe):
Expand Down

0 comments on commit 181f2f6

Please sign in to comment.