Skip to content

Commit 42197b2

Browse files
zoyahavtfx-copybara
authored andcommitted
Updating documentation:
* Switching to using `RecordBatchToExamplesEncoder` * Utilizing `tft.DatasetMetadata.from_feature_spec` PiperOrigin-RevId: 523723569
1 parent 7875e9e commit 42197b2

File tree

1 file changed

+4
-11
lines changed

1 file changed

+4
-11
lines changed

docs/get_started.ipynb

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -422,12 +422,7 @@
422422
"\n",
423423
"The previous code examples used this format. The metadata contains the schema that defines the layout of the data and how it is read from and written to various formats. Even this in-memory format is not self-describing and requires the schema in order to be interpreted as tensors.\n",
424424
"\n",
425-
"Again, here is the definition of the schema for the example data:\n",
426-
"\n",
427-
"\u003c!--\n",
428-
"TODO(b/223384488): Switch to `tft.DatasetMetadata.from_feature_spec` once\n",
429-
"version 1.8 is released.\n",
430-
"--\u003e"
425+
"Again, here is the definition of the schema for the example data:"
431426
]
432427
},
433428
{
@@ -438,15 +433,13 @@
438433
},
439434
"outputs": [],
440435
"source": [
441-
"from tensorflow_transform.tf_metadata import dataset_metadata\n",
442-
"from tensorflow_transform.tf_metadata import schema_utils\n",
436+
"import tensorflow_transform as tft\n",
443437
"\n",
444-
"raw_data_metadata = dataset_metadata.DatasetMetadata(\n",
445-
" schema_utils.schema_from_feature_spec({\n",
438+
"raw_data_metadata = tft.DatasetMetadata.from_feature_spec({\n",
446439
" 's': tf.io.FixedLenFeature([], tf.string),\n",
447440
" 'y': tf.io.FixedLenFeature([], tf.float32),\n",
448441
" 'x': tf.io.FixedLenFeature([], tf.float32),\n",
449-
" }))"
442+
" })"
450443
]
451444
},
452445
{

0 commit comments

Comments
 (0)