Skip to content

Commit 3fdd1a2

Browse files
sync changes.
sync changes.
2 parents 9e46a30 + 7c94c52 commit 3fdd1a2

File tree

117 files changed

+1406
-2341
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

117 files changed

+1406
-2341
lines changed

docs/add_dataset.md

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,8 @@ already added.
3030
* [3. Double-check the citation](#3-double-check-the-citation)
3131
* [4. Add a test](#4-add-a-test)
3232
* [5. Check your code style](#5-check-your-code-style)
33-
* [6. Send for review!](#6-send-for-review)
33+
* [6. Add release notes](#6-add-release-notes)
34+
* [7. Send for review!](#7-send-for-review)
3435
* [Large datasets and distributed generation](#large-datasets-and-distributed-generation)
3536
* [Testing `MyDataset`](#testing-mydataset)
3637

@@ -551,7 +552,13 @@ See
551552
[TensorFlow code style guide](https://www.tensorflow.org/community/contribute/code_style)
552553
for more information.
553554

554-
### 6. Send for review!
555+
### 6. Add release notes
556+
557+
Add the dataset to the
558+
[release notes](https://github.com/tensorflow/datasets/blob/master/docs/release_notes.md).
559+
The release note will be published for the next release.
560+
561+
### 7. Send for review!
555562

556563
Send the pull request for review.
557564

docs/api_docs/python/tfds.md

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -39,30 +39,32 @@ The main library entrypoints are:
3939

4040
[`file_adapter`](./tfds/file_adapter.md) module: <a href="./tfds/file_adapter/FileFormatAdapter.md"><code>tfds.file_adapter.FileFormatAdapter</code></a>s for GeneratorBasedBuilder.
4141

42-
[`units`](./tfds/units.md) module: Defines convenience constants/functions for converting various units.
43-
4442
[`testing`](./tfds/testing.md) module: Testing utilities.
4543

44+
[`units`](./tfds/units.md) module: Defines convenience constants/functions for
45+
converting various units.
46+
4647
## Classes
4748

4849
[`class GenerateMode`](./tfds/download/GenerateMode.md): `Enum` for how to treat pre-existing downloads and data.
4950

50-
[`class percent`](./tfds/percent.md): Syntactic sugar for defining slice subsplits: `tfds.percent[75:-5]`.
51-
5251
[`class Split`](./tfds/Split.md): `Enum` for dataset splits.
5352

53+
[`class percent`](./tfds/percent.md): Syntactic sugar for defining slice subsplits: `tfds.percent[75:-5]`.
54+
5455
## Functions
5556

5657
[`as_numpy(...)`](./tfds/as_numpy.md): Converts a `tf.data.Dataset` to an iterable of NumPy arrays.
5758

5859
[`builder(...)`](./tfds/builder.md): Fetches a <a href="./tfds/core/DatasetBuilder.md"><code>tfds.core.DatasetBuilder</code></a> by string name.
5960

60-
[`list_builders(...)`](./tfds/list_builders.md): Returns the string names of all <a href="./tfds/core/DatasetBuilder.md"><code>tfds.core.DatasetBuilder</code></a>s.
61-
62-
[`load(...)`](./tfds/load.md): Loads the named dataset into a `tf.data.Dataset`.
63-
6461
[`disable_progress_bar(...)`](./tfds/disable_progress_bar.md): Disabled Tqdm
6562
progress bar.
6663

6764
[`is_dataset_on_gcs(...)`](./tfds/is_dataset_on_gcs.md): If the dataset is
6865
available on the GCS bucket gs://tfds-data/datasets.
66+
67+
[`list_builders(...)`](./tfds/list_builders.md): Returns the string names of all <a href="./tfds/core/DatasetBuilder.md"><code>tfds.core.DatasetBuilder</code></a>s.
68+
69+
[`load(...)`](./tfds/load.md): Loads the named dataset into a `tf.data.Dataset`.
70+

docs/api_docs/python/tfds/Split.md

Lines changed: 4 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
<div itemscope itemtype="http://developers.google.com/ReferenceObject">
22
<meta itemprop="name" content="tfds.Split" />
33
<meta itemprop="path" content="Stable" />
4-
<meta itemprop="property" content="__new__"/>
54
<meta itemprop="property" content="ALL"/>
65
<meta itemprop="property" content="TEST"/>
76
<meta itemprop="property" content="TRAIN"/>
@@ -36,27 +35,9 @@ See the
3635
[guide on splits](https://github.com/tensorflow/datasets/tree/master/docs/splits.md)
3736
for more information.
3837

39-
<h2 id="__new__"><code>__new__</code></h2>
40-
41-
``` python
42-
@staticmethod
43-
__new__(
44-
cls,
45-
name
46-
)
47-
```
48-
49-
Create a custom split with tfds.Split('custom_name').
50-
51-
52-
5338
## Class Members
5439

55-
<h3 id="ALL"><code>ALL</code></h3>
56-
57-
<h3 id="TEST"><code>TEST</code></h3>
58-
59-
<h3 id="TRAIN"><code>TRAIN</code></h3>
60-
61-
<h3 id="VALIDATION"><code>VALIDATION</code></h3>
62-
40+
* `ALL` <a id="ALL"></a>
41+
* `TEST` <a id="TEST"></a>
42+
* `TRAIN` <a id="TRAIN"></a>
43+
* `VALIDATION` <a id="VALIDATION"></a>

docs/api_docs/python/tfds/_api_cache.json

Lines changed: 9 additions & 1188 deletions
Large diffs are not rendered by default.

docs/api_docs/python/tfds/as_numpy.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,5 +30,6 @@ and `tf.Tensor`s to iterables of NumPy arrays and NumPy arrays, respectively.
3030
* <b>`graph`</b>: `tf.Graph`, optional, explicitly set the graph to use.
3131

3232
#### Returns:
33+
3334
A structure matching `dataset` where `tf.data.Dataset`s are converted to
3435
generators of NumPy arrays and `tf.Tensor`s are converted to NumPy arrays.

docs/api_docs/python/tfds/core.md

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,19 +14,15 @@ Defined in [`core/__init__.py`](https://github.com/tensorflow/datasets/tree/mast
1414

1515
## Classes
1616

17-
[`class lazy_imports`](../tfds/core/lazy_imports.md): Lazy importer for heavy dependencies.
18-
1917
[`class BeamBasedBuilder`](../tfds/core/BeamBasedBuilder.md): Beam based Builder.
2018

2119
[`class BuilderConfig`](../tfds/core/BuilderConfig.md): Base class for `DatasetBuilder` data configuration.
2220

2321
[`class DatasetBuilder`](../tfds/core/DatasetBuilder.md): Abstract base class for all datasets.
2422

25-
[`class GeneratorBasedBuilder`](../tfds/core/GeneratorBasedBuilder.md): Base class for datasets with data generation based on dict generators.
26-
2723
[`class DatasetInfo`](../tfds/core/DatasetInfo.md): Information about a dataset.
2824

29-
[`class NamedSplit`](../tfds/core/NamedSplit.md): Descriptor corresponding to a named split (train, test, ...).
25+
[`class GeneratorBasedBuilder`](../tfds/core/GeneratorBasedBuilder.md): Base class for datasets with data generation based on dict generators.
3026

3127
[`class Metadata`](../tfds/core/Metadata.md): Abstract base class for
3228
DatasetInfo metadata container.
@@ -35,6 +31,8 @@ DatasetInfo metadata container.
3531
<a href="../tfds/core/Metadata.md"><code>tfds.core.Metadata</code></a> object
3632
that acts as a `dict`.
3733

34+
[`class NamedSplit`](../tfds/core/NamedSplit.md): Descriptor corresponding to a named split (train, test, ...).
35+
3836
[`class SplitBase`](../tfds/core/SplitBase.md): Abstract base class for Split compositionality.
3937

4038
[`class SplitDict`](../tfds/core/SplitDict.md): Split info object.
@@ -45,6 +43,9 @@ that acts as a `dict`.
4543

4644
[`class Version`](../tfds/core/Version.md): Dataset version MAJOR.MINOR.PATCH.
4745

46+
[`class lazy_imports`](../tfds/core/lazy_imports.md): Lazy importer for heavy
47+
dependencies.
48+
4849
## Functions
4950

5051
[`get_tfds_path(...)`](../tfds/core/get_tfds_path.md): Returns absolute path to file given path relative to tfds root.

docs/api_docs/python/tfds/core/BeamBasedBuilder.md

Lines changed: 13 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
<meta itemprop="property" content="BUILDER_CONFIGS"/>
1111
<meta itemprop="property" content="GOOGLE_DISABLED"/>
1212
<meta itemprop="property" content="IN_DEVELOPMENT"/>
13+
<meta itemprop="property" content="SUPPORTED_VERSIONS"/>
1314
<meta itemprop="property" content="VERSION"/>
1415
<meta itemprop="property" content="builder_configs"/>
1516
<meta itemprop="property" content="name"/>
@@ -37,6 +38,7 @@ __init__(
3738
```
3839

3940
Constructs a DatasetBuilder.
41+
4042
Callers must pass arguments as keyword arguments.
4143

4244
#### Args:
@@ -50,7 +52,7 @@ Callers must pass arguments as keyword arguments.
5052
subdirectories and versions.
5153
* <b>`version`</b>: `str`. Optional version at which to load the dataset. An
5254
error is raised if specified version cannot be satisfied. Eg: '1.2.3',
53-
'1.2.*'. Note that only the currently defined version can be loaded.
55+
'1.2.*'.
5456

5557
## Properties
5658

@@ -60,14 +62,10 @@ Callers must pass arguments as keyword arguments.
6062

6163
<h3 id="data_dir"><code>data_dir</code></h3>
6264

63-
64-
6565
<h3 id="info"><code>info</code></h3>
6666

6767
<a href="../../tfds/core/DatasetInfo.md"><code>tfds.core.DatasetInfo</code></a> for this builder.
6868

69-
70-
7169
## Methods
7270

7371
<h3 id="as_dataset"><code>as_dataset</code></h3>
@@ -77,12 +75,12 @@ as_dataset(
7775
split=None,
7876
batch_size=1,
7977
shuffle_files=None,
80-
as_supervised=False,
81-
in_memory=None
78+
as_supervised=False
8279
)
8380
```
8481

8582
Constructs a `tf.data.Dataset`.
83+
8684
Callers must pass arguments as keyword arguments.
8785

8886
#### Args:
@@ -102,13 +100,9 @@ Callers must pass arguments as keyword arguments.
102100
will have a 2-tuple structure `(input, label)` according to
103101
`builder.info.supervised_keys`. If `False`, the default, the returned
104102
`tf.data.Dataset` will have a dictionary with all the features.
105-
* <b>`in_memory`</b>: `bool`, if `True`, loads the dataset in memory which
106-
increases iteration speeds. Note that if `True` and the dataset has unknown
107-
dimensions, the features will be padded to the maximum size across the
108-
dataset. By default (when `None`), will load the dataset in memory if the
109-
size is <1GB and all feature dimensions are statically known.
110103

111104
#### Returns:
105+
112106
`tf.data.Dataset`, or if `split=None`, `dict<key: tfds.Split, value:
113107
tfds.data.Dataset>`.
114108

@@ -142,15 +136,10 @@ Downloads and prepares dataset for reading.
142136

143137
## Class Members
144138

145-
<h3 id="BUILDER_CONFIGS"><code>BUILDER_CONFIGS</code></h3>
146-
147-
<h3 id="GOOGLE_DISABLED"><code>GOOGLE_DISABLED</code></h3>
148-
149-
<h3 id="IN_DEVELOPMENT"><code>IN_DEVELOPMENT</code></h3>
150-
151-
<h3 id="VERSION"><code>VERSION</code></h3>
152-
153-
<h3 id="builder_configs"><code>builder_configs</code></h3>
154-
155-
<h3 id="name"><code>name</code></h3>
156-
139+
* `BUILDER_CONFIGS` <a id="BUILDER_CONFIGS"></a>
140+
* `GOOGLE_DISABLED = False` <a id="GOOGLE_DISABLED"></a>
141+
* `IN_DEVELOPMENT = False` <a id="IN_DEVELOPMENT"></a>
142+
* `SUPPORTED_VERSIONS` <a id="SUPPORTED_VERSIONS"></a>
143+
* `VERSION = None` <a id="VERSION"></a>
144+
* `builder_configs` <a id="builder_configs"></a>
145+
* `name = 'beam_based_builder'` <a id="name"></a>

docs/api_docs/python/tfds/core/BuilderConfig.md

Lines changed: 4 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
<meta itemprop="path" content="Stable" />
44
<meta itemprop="property" content="description"/>
55
<meta itemprop="property" content="name"/>
6+
<meta itemprop="property" content="supported_versions"/>
67
<meta itemprop="property" content="version"/>
78
<meta itemprop="property" content="__init__"/>
89
</div>
@@ -22,31 +23,21 @@ DatasetBuilder subclasses with data configuration options should subclass
2223

2324
<h2 id="__init__"><code>__init__</code></h2>
2425

25-
``` python
26+
```python
2627
__init__(
2728
name,
2829
version=None,
30+
supported_versions=None,
2931
description=None
3032
)
3133
```
3234

33-
34-
35-
36-
3735
## Properties
3836

3937
<h3 id="description"><code>description</code></h3>
4038

41-
42-
4339
<h3 id="name"><code>name</code></h3>
4440

45-
41+
<h3 id="supported_versions"><code>supported_versions</code></h3>
4642

4743
<h3 id="version"><code>version</code></h3>
48-
49-
50-
51-
52-

docs/api_docs/python/tfds/core/DatasetBuilder.md

Lines changed: 13 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
<meta itemprop="property" content="BUILDER_CONFIGS"/>
1111
<meta itemprop="property" content="GOOGLE_DISABLED"/>
1212
<meta itemprop="property" content="IN_DEVELOPMENT"/>
13+
<meta itemprop="property" content="SUPPORTED_VERSIONS"/>
1314
<meta itemprop="property" content="VERSION"/>
1415
<meta itemprop="property" content="builder_configs"/>
1516
<meta itemprop="property" content="name"/>
@@ -68,6 +69,7 @@ __init__(
6869
```
6970

7071
Constructs a DatasetBuilder.
72+
7173
Callers must pass arguments as keyword arguments.
7274

7375
#### Args:
@@ -81,7 +83,7 @@ Callers must pass arguments as keyword arguments.
8183
subdirectories and versions.
8284
* <b>`version`</b>: `str`. Optional version at which to load the dataset. An
8385
error is raised if specified version cannot be satisfied. Eg: '1.2.3',
84-
'1.2.*'. Note that only the currently defined version can be loaded.
86+
'1.2.*'.
8587

8688
## Properties
8789

@@ -91,14 +93,10 @@ Callers must pass arguments as keyword arguments.
9193

9294
<h3 id="data_dir"><code>data_dir</code></h3>
9395

94-
95-
9696
<h3 id="info"><code>info</code></h3>
9797

9898
<a href="../../tfds/core/DatasetInfo.md"><code>tfds.core.DatasetInfo</code></a> for this builder.
9999

100-
101-
102100
## Methods
103101

104102
<h3 id="as_dataset"><code>as_dataset</code></h3>
@@ -108,12 +106,12 @@ as_dataset(
108106
split=None,
109107
batch_size=1,
110108
shuffle_files=None,
111-
as_supervised=False,
112-
in_memory=None
109+
as_supervised=False
113110
)
114111
```
115112

116113
Constructs a `tf.data.Dataset`.
114+
117115
Callers must pass arguments as keyword arguments.
118116

119117
#### Args:
@@ -133,13 +131,9 @@ Callers must pass arguments as keyword arguments.
133131
will have a 2-tuple structure `(input, label)` according to
134132
`builder.info.supervised_keys`. If `False`, the default, the returned
135133
`tf.data.Dataset` will have a dictionary with all the features.
136-
* <b>`in_memory`</b>: `bool`, if `True`, loads the dataset in memory which
137-
increases iteration speeds. Note that if `True` and the dataset has unknown
138-
dimensions, the features will be padded to the maximum size across the
139-
dataset. By default (when `None`), will load the dataset in memory if the
140-
size is <1GB and all feature dimensions are statically known.
141134

142135
#### Returns:
136+
143137
`tf.data.Dataset`, or if `split=None`, `dict<key: tfds.Split, value:
144138
tfds.data.Dataset>`.
145139

@@ -173,15 +167,10 @@ Downloads and prepares dataset for reading.
173167

174168
## Class Members
175169

176-
<h3 id="BUILDER_CONFIGS"><code>BUILDER_CONFIGS</code></h3>
177-
178-
<h3 id="GOOGLE_DISABLED"><code>GOOGLE_DISABLED</code></h3>
179-
180-
<h3 id="IN_DEVELOPMENT"><code>IN_DEVELOPMENT</code></h3>
181-
182-
<h3 id="VERSION"><code>VERSION</code></h3>
183-
184-
<h3 id="builder_configs"><code>builder_configs</code></h3>
185-
186-
<h3 id="name"><code>name</code></h3>
187-
170+
* `BUILDER_CONFIGS` <a id="BUILDER_CONFIGS"></a>
171+
* `GOOGLE_DISABLED = False` <a id="GOOGLE_DISABLED"></a>
172+
* `IN_DEVELOPMENT = False` <a id="IN_DEVELOPMENT"></a>
173+
* `SUPPORTED_VERSIONS` <a id="SUPPORTED_VERSIONS"></a>
174+
* `VERSION = None` <a id="VERSION"></a>
175+
* `builder_configs` <a id="builder_configs"></a>
176+
* `name = 'dataset_builder'` <a id="name"></a>

0 commit comments

Comments
 (0)