Skip to content

Commit

Permalink
fix features (mapped ex iterable
Browse files Browse the repository at this point in the history
  • Loading branch information
alex-hh committed Oct 16, 2024
1 parent 68bfa39 commit 38f78d2
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/datasets/iterable_dataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -975,7 +975,7 @@ def __init__(
self.input_columns = input_columns
self.fn_kwargs = fn_kwargs or {}
self.formatting = formatting # required for iter_arrow
self.features = features
self._features = features
# sanity checks
if formatting and formatting.format_type == "arrow":
# batch_size should match for iter_arrow
Expand All @@ -999,6 +999,10 @@ def iter_arrow(self):
def is_typed(self):
return self.features is not None # user has extracted features

@property
def features(self):
return self._features

def _init_state_dict(self) -> dict:
self._state_dict = {
"ex_iterable": self.ex_iterable._init_state_dict(),
Expand Down

0 comments on commit 38f78d2

Please sign in to comment.