Skip to content

Commit

Permalink
Internal change.
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 712462394
  • Loading branch information
Grain Team authored and copybara-github committed Jan 13, 2025
1 parent 10fdd0d commit 86a8f1b
Show file tree
Hide file tree
Showing 4 changed files with 755 additions and 624 deletions.
12 changes: 12 additions & 0 deletions grain/_src/python/dataset/transformations/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,17 @@ py_test(
deps = ["//grain/_src/python/dataset"],
)

py_library(
name = "testing_util",
testonly = 1,
srcs = ["testing_util.py"],
srcs_version = "PY3",
deps = [
":packing",
"//grain/_src/python/dataset",
],
)

py_library(
name = "flatmap",
srcs = ["flatmap.py"],
Expand Down Expand Up @@ -116,6 +127,7 @@ py_test(
srcs_version = "PY3",
deps = [
":packing",
":testing_util",
"//grain/_src/python/dataset",
],
)
Expand Down
2 changes: 1 addition & 1 deletion grain/_src/python/dataset/transformations/packing.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
from collections.abc import Sequence
import copy
from typing import Any, Optional
from absl import logging
from grain._src.python.dataset import dataset
from grain._src.python.dataset import stats as dataset_stats
from grain._src.python.dataset.transformations import packing_packed_batch
Expand Down Expand Up @@ -324,7 +325,6 @@ def __iter__(self) -> dataset.DatasetIterator:
num_packing_bins=self._num_packing_bins,
length_struct=self._length_struct,
shuffle_bins=self._shuffle_bins,
shuffle_bins_group_by_feature=self._shuffle_bins_group_by_feature,
meta_features=self._meta_features,
)

Expand Down
Loading

0 comments on commit 86a8f1b

Please sign in to comment.