Skip to content

Commit

Permalink
Setting mixture_or_task variable correctly.
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 706690426
  • Loading branch information
agutkin committed Dec 16, 2024
1 parent e95b255 commit 14dd9a1
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions protoscribe/pmmx/utils/seqio_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
# limitations under the License.

"""General utility functions for t5x."""

import time
from typing import Any, Callable, Optional, Type

Expand Down Expand Up @@ -87,6 +88,11 @@ def get_dataset(
cfg.mixture_or_task_name not in mixtures):
define_task_fn(cfg.mixture_or_task_name)

if isinstance(cfg.mixture_or_task_name, seqio.DatasetProviderBase):
mixture_or_task = cfg.mixture_or_task_name
else:
mixture_or_task = seqio.get_mixture_or_task(cfg.mixture_or_task_name)

shard_info = seqio.ShardInfo(index=shard_id, num_shards=num_shards)

if cfg.seed is None:
Expand Down

0 comments on commit 14dd9a1

Please sign in to comment.