Skip to content

Commit

Permalink
Fix pytype error
Browse files Browse the repository at this point in the history
pytype error is caused by upstream change on DatasetBuilder

PiperOrigin-RevId: 704330938
  • Loading branch information
luckyrandom authored and copybara-github committed Dec 9, 2024
1 parent 81a2e2e commit 5ba0edf
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions uncertainty_baselines/datasets/toxic_comments.py
Original file line number Diff line number Diff line change
Expand Up @@ -252,11 +252,14 @@ def _download_and_prepare(self, dl_manager, download_config=None):
return self._tfds_dataset_builder._download_and_prepare( # pylint: disable=protected-access
dl_manager, download_config)

def _as_dataset(self,
split: tfds.Split,
decoders=None,
read_config=None,
shuffle_files=False) -> tf.data.Dataset:
def _as_dataset(
self,
split: tfds.Split,
decoders=None,
read_config=None,
shuffle_files=False,
file_format: str | tfds.core.FileFormat | None = None,
) -> tf.data.Dataset:
raise NotImplementedError

# Note that we override `as_dataset` instead of `_as_dataset` to avoid any
Expand Down

0 comments on commit 5ba0edf

Please sign in to comment.