TF 2.0 is out! Get hands-on practice at TF World, Oct 28-31. Use code TF20 for 20% off select passes. Register now

tfds.core.SplitGenerator

View source

Class SplitGenerator

Defines the split information for the generator.

This should be used as returned value of GeneratorBasedBuilder._split_generators. See GeneratorBasedBuilder._split_generators for more info and example of usage.

__init__

View source

__init__(
    name,
    num_shards=1,
    gen_kwargs=None
)

Constructs a SplitGenerator.

Args:

  • name: str, name of the Split for which the generator will create the examples.
  • num_shards: int, number of shards between which the generated examples will be written.
  • gen_kwargs: dict, kwargs to forward to the _generate_examples() method of the builder.