Skip to content

Commit

Permalink
Migrate tf.data.experimental.RandomDataset to `tf.data.Dataset.rand…
Browse files Browse the repository at this point in the history
…om`.

PiperOrigin-RevId: 731366527
  • Loading branch information
yangustc07 authored and SeqIO committed Feb 26, 2025
1 parent f9b84ed commit bb079d8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion seqio/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -1472,7 +1472,7 @@ def __call__(self, dataset: tf.data.Dataset, *args, **kwargs):
random_ds_seeds = tuple(tuple(s) for s in random_ds_seeds)
_NEXT_MAP_SEED += 2 * self.num_seeds
seed_datasets = tf.nest.map_structure(
tf.data.experimental.RandomDataset, random_ds_seeds
tf.data.Dataset.random, random_ds_seeds
)

def map_fn(element, seeds):
Expand Down

0 comments on commit bb079d8

Please sign in to comment.