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

Standardize inheritance of DatasetProviderBase. This is mostly trying to align the inherited function get_dataset for all dataset providers. #21

Open
wants to merge 1 commit into
base: main
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
7 changes: 6 additions & 1 deletion optformer/data/tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
import seqio
import t5.data
import tensorflow as tf
import tensorflow_datasets as tfds

Study = converters.Study

Expand Down Expand Up @@ -272,10 +273,14 @@ def supports_arbitrary_sharding(self) -> bool:

def get_dataset(
self,
split: str,
split: str = tfds.Split.TRAIN,
shuffle: bool = True,
seed: Optional[int] = None,
shard_info: Optional[seqio.ShardInfo] = None,
*,
sequence_length: Optional[Mapping[str, int]] = None, # Unused
use_cached: bool = False, # Unused
num_epochs: Optional[int] = 1, # Unused
) -> tf.data.Dataset:
raise NotImplementedError

Expand Down