4a9e3bb71b9b706d5b664805afcc9a6811d12d04,tensorflow_datasets/testing/test_utils.py,DummyDatasetSharedGenerator,_split_generators,#DummyDatasetSharedGenerator#Any#,306

Before Change


    // Split the 30 examples from the generator into 2 train shards and 1 test
    // shard.
    del dl_manager
    return [
        splits.SplitGenerator(
            name=splits.Split.TRAIN,
            gen_kwargs={"range_": range(20)}),
        splits.SplitGenerator(
            name=splits.Split.TEST,
            gen_kwargs={"range_": range(20, 30)}),
    ]

  def _generate_examples(self, range_):
    for i in range_:
      yield i, {"x": i}

After Change


    // Split the 30 examples from the generator into 2 train shards and 1 test
    // shard.
    del dl_manager
    return {
        "train": self._generate_examples(range_=range(20)),
        "test": self._generate_examples(range_=range(20, 30)),
    }

  def _generate_examples(self, range_):
    for i in range_:
      yield i, {"x": i}
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 10

Instances


Project Name: tensorflow/datasets
Commit Name: 4a9e3bb71b9b706d5b664805afcc9a6811d12d04
Time: 2020-10-30
Author: epot@google.com
File Name: tensorflow_datasets/testing/test_utils.py
Class Name: DummyDatasetSharedGenerator
Method Name: _split_generators


Project Name: tensorflow/datasets
Commit Name: 4a9e3bb71b9b706d5b664805afcc9a6811d12d04
Time: 2020-10-30
Author: epot@google.com
File Name: tensorflow_datasets/testing/test_utils.py
Class Name: DummyMnist
Method Name: _split_generators


Project Name: tensorflow/datasets
Commit Name: 4a9e3bb71b9b706d5b664805afcc9a6811d12d04
Time: 2020-10-30
Author: epot@google.com
File Name: tensorflow_datasets/core/dataset_builder_test.py
Class Name: DummyDatasetWithConfigs
Method Name: _split_generators