Skip to content

Commit c8ee7f1

Browse files
tf-transform-teamzoyahav
authored andcommitted
Project import generated by Copybara.
PiperOrigin-RevId: 219664000
1 parent 88f209c commit c8ee7f1

File tree

10 files changed

+75
-18
lines changed

10 files changed

+75
-18
lines changed

docs/api_docs/python/tft/coders/CsvCoder.md

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,9 @@ Initializes CsvCoder.
3535
* <b>`delimiter`</b>: A one-character string used to separate fields.
3636
* <b>`secondary_delimiter`</b>: A one-character string used to separate values within
3737
the same field.
38-
* <b>`multivalent_columns`</b>: A list of names for multivalent columns that need
39-
to be split based on secondary delimiter.
38+
* <b>`multivalent_columns`</b>: A list of names for multivalent columns that need to
39+
be split based on secondary delimiter.
40+
4041

4142
#### Raises:
4243

@@ -56,14 +57,15 @@ Decodes the given string record according to the schema.
5657

5758
Missing value handling is as follows:
5859

59-
1.a) If FixedLenFeature and has a default value, use that value for missing
60-
entries.
61-
1.b) If FixedLenFeature and doesn't has default value throw an Exception on
62-
missing entries.
60+
1. For FixedLenFeature:
61+
1. If FixedLenFeature and has a default value, use that value for
62+
missing entries.
63+
2. If FixedLenFeature and doesn't have default value throw an Exception
64+
on missing entries.
6365

64-
2) For VarLenFeature return an empty array.
66+
2. For VarLenFeature return an empty array.
6567

66-
3) For SparseFeature throw an Exception if only one of the indices or values
68+
3. For SparseFeature throw an Exception if only one of the indices or values
6769
has a missing entry. If both indices and values are missing, return
6870
a tuple of 2 empty arrays.
6971

@@ -98,8 +100,8 @@ Encode a tf.transform encoded dict to a csv-formatted string.
98100

99101
#### Args:
100102

101-
* <b>`instance`</b>: A python dictionary where the keys are the column names and
102-
the values are fixed len or var len encoded features.
103+
* <b>`instance`</b>: A python dictionary where the keys are the column names and the
104+
values are fixed len or var len encoded features.
103105

104106

105107
#### Returns:

docs/api_docs/python/tft/compute_and_apply_vocabulary.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,4 +69,4 @@ zero. String value not in the vocabulary is assigned default_value.
6969

7070
#### Raises:
7171

72-
* <b>`ValueError`</b>: If `top_k` or `frequency_threshold` is negative.
72+
* <b>`ValueError`</b>: If `top_k` or `frequency_threshold` is negative.

docs/api_docs/python/tft/vocabulary.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,4 +72,4 @@ The path name for the vocabulary file containing the unique values of `x`.
7272

7373
#### Raises:
7474

75-
* <b>`ValueError`</b>: If `top_k` or `frequency_threshold` is negative.
75+
* <b>`ValueError`</b>: If `top_k` or `frequency_threshold` is negative.

docs/api_docs/python/tft_beam/AnalyzeAndTransformDataset.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
<meta itemprop="property" content="infer_output_type"/>
2121
<meta itemprop="property" content="next"/>
2222
<meta itemprop="property" content="register_urn"/>
23+
<meta itemprop="property" content="runner_api_requires_keyed_input"/>
2324
<meta itemprop="property" content="to_runner_api"/>
2425
<meta itemprop="property" content="to_runner_api_parameter"/>
2526
<meta itemprop="property" content="to_runner_api_pickled"/>
@@ -255,6 +256,14 @@ register_urn(
255256

256257

257258

259+
<h3 id="runner_api_requires_keyed_input"><code>runner_api_requires_keyed_input</code></h3>
260+
261+
``` python
262+
runner_api_requires_keyed_input()
263+
```
264+
265+
266+
258267
<h3 id="to_runner_api"><code>to_runner_api</code></h3>
259268

260269
``` python

docs/api_docs/python/tft_beam/AnalyzeDataset.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
<meta itemprop="property" content="infer_output_type"/>
2121
<meta itemprop="property" content="next"/>
2222
<meta itemprop="property" content="register_urn"/>
23+
<meta itemprop="property" content="runner_api_requires_keyed_input"/>
2324
<meta itemprop="property" content="to_runner_api"/>
2425
<meta itemprop="property" content="to_runner_api_parameter"/>
2526
<meta itemprop="property" content="to_runner_api_pickled"/>
@@ -255,6 +256,14 @@ register_urn(
255256

256257

257258

259+
<h3 id="runner_api_requires_keyed_input"><code>runner_api_requires_keyed_input</code></h3>
260+
261+
``` python
262+
runner_api_requires_keyed_input()
263+
```
264+
265+
266+
258267
<h3 id="to_runner_api"><code>to_runner_api</code></h3>
259268

260269
``` python

docs/api_docs/python/tft_beam/ReadTransformFn.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
<meta itemprop="property" content="infer_output_type"/>
2121
<meta itemprop="property" content="next"/>
2222
<meta itemprop="property" content="register_urn"/>
23+
<meta itemprop="property" content="runner_api_requires_keyed_input"/>
2324
<meta itemprop="property" content="to_runner_api"/>
2425
<meta itemprop="property" content="to_runner_api_parameter"/>
2526
<meta itemprop="property" content="to_runner_api_pickled"/>
@@ -230,6 +231,14 @@ register_urn(
230231

231232

232233

234+
<h3 id="runner_api_requires_keyed_input"><code>runner_api_requires_keyed_input</code></h3>
235+
236+
``` python
237+
runner_api_requires_keyed_input()
238+
```
239+
240+
241+
233242
<h3 id="to_runner_api"><code>to_runner_api</code></h3>
234243

235244
``` python

docs/api_docs/python/tft_beam/TransformDataset.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
<meta itemprop="property" content="infer_output_type"/>
2121
<meta itemprop="property" content="next"/>
2222
<meta itemprop="property" content="register_urn"/>
23+
<meta itemprop="property" content="runner_api_requires_keyed_input"/>
2324
<meta itemprop="property" content="to_runner_api"/>
2425
<meta itemprop="property" content="to_runner_api_parameter"/>
2526
<meta itemprop="property" content="to_runner_api_pickled"/>
@@ -247,6 +248,14 @@ register_urn(
247248

248249

249250

251+
<h3 id="runner_api_requires_keyed_input"><code>runner_api_requires_keyed_input</code></h3>
252+
253+
``` python
254+
runner_api_requires_keyed_input()
255+
```
256+
257+
258+
250259
<h3 id="to_runner_api"><code>to_runner_api</code></h3>
251260

252261
``` python

docs/api_docs/python/tft_beam/WriteMetadata.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
<meta itemprop="property" content="infer_output_type"/>
2121
<meta itemprop="property" content="next"/>
2222
<meta itemprop="property" content="register_urn"/>
23+
<meta itemprop="property" content="runner_api_requires_keyed_input"/>
2324
<meta itemprop="property" content="to_runner_api"/>
2425
<meta itemprop="property" content="to_runner_api_parameter"/>
2526
<meta itemprop="property" content="to_runner_api_pickled"/>
@@ -235,6 +236,14 @@ register_urn(
235236

236237

237238

239+
<h3 id="runner_api_requires_keyed_input"><code>runner_api_requires_keyed_input</code></h3>
240+
241+
``` python
242+
runner_api_requires_keyed_input()
243+
```
244+
245+
246+
238247
<h3 id="to_runner_api"><code>to_runner_api</code></h3>
239248

240249
``` python

docs/api_docs/python/tft_beam/WriteTransformFn.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
<meta itemprop="property" content="infer_output_type"/>
2121
<meta itemprop="property" content="next"/>
2222
<meta itemprop="property" content="register_urn"/>
23+
<meta itemprop="property" content="runner_api_requires_keyed_input"/>
2324
<meta itemprop="property" content="to_runner_api"/>
2425
<meta itemprop="property" content="to_runner_api_parameter"/>
2526
<meta itemprop="property" content="to_runner_api_pickled"/>
@@ -235,6 +236,14 @@ register_urn(
235236

236237

237238

239+
<h3 id="runner_api_requires_keyed_input"><code>runner_api_requires_keyed_input</code></h3>
240+
241+
``` python
242+
runner_api_requires_keyed_input()
243+
```
244+
245+
246+
238247
<h3 id="to_runner_api"><code>to_runner_api</code></h3>
239248

240249
``` python

tensorflow_transform/coders/csv_coder.py

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -504,14 +504,15 @@ def decode(self, csv_string):
504504
505505
Missing value handling is as follows:
506506
507-
1.a) If FixedLenFeature and has a default value, use that value for missing
508-
entries.
509-
1.b) If FixedLenFeature and doesn't have default value throw an Exception on
510-
missing entries.
507+
1. For FixedLenFeature:
508+
1. If FixedLenFeature and has a default value, use that value for
509+
missing entries.
510+
2. If FixedLenFeature and doesn't have default value throw an Exception
511+
on missing entries.
511512
512-
2) For VarLenFeature return an empty array.
513+
2. For VarLenFeature return an empty array.
513514
514-
3) For SparseFeature throw an Exception if only one of the indices or values
515+
3. For SparseFeature throw an Exception if only one of the indices or values
515516
has a missing entry. If both indices and values are missing, return
516517
a tuple of 2 empty arrays.
517518

0 commit comments

Comments
 (0)