Skip to content

Commit a9f4989

Browse files
brillstfx-copybara
authored andcommitted
Deprecated tfdv.{DecodeCSV,DecodeTFExample}.
PiperOrigin-RevId: 354351169
1 parent 15b0dd1 commit a9f4989

4 files changed

Lines changed: 13 additions & 2 deletions

File tree

RELEASE.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,10 @@
2222

2323
## Deprecations
2424

25+
* `tfdv.DecodeCSV` and `tfdv.DecodeTFExample` are deprecated. Use
26+
`tfx_bsl.public.tfxio.CsvTFXIO` and `tfx_bsl.public.tfxio.TFExampleRecord`
27+
instead.
28+
2529
# Version 0.26.0
2630

2731
## Major Features and Improvements

tensorflow_data_validation/__init__.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,10 @@
3232
from tensorflow_data_validation.api.validation_api import validate_instance
3333
from tensorflow_data_validation.api.validation_api import validate_statistics
3434

35-
# Import coders.
35+
# DecodeCSV is deprecated. Please use tfx_bsl.public.tfxio.CsvTFXIO instead.
3636
from tensorflow_data_validation.coders.csv_decoder import DecodeCSV
37+
# DecodeTFExample is deprecated. Please use tfx_bsl.public.tfxio.TFExampleRecord
38+
# instead.
3739
from tensorflow_data_validation.coders.tf_example_decoder import DecodeTFExample
3840

3941
# Import stats generators.

tensorflow_data_validation/coders/csv_decoder.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,10 @@
3232
@beam.typehints.with_input_types(Text)
3333
@beam.typehints.with_output_types(pa.RecordBatch)
3434
class DecodeCSV(beam.PTransform):
35-
"""Decodes CSV records into Arrow RecordBatches."""
35+
"""Decodes CSV records into Arrow RecordBatches.
36+
37+
DEPRECATED: please use tfx_bsl.public.CsvTFXIO instead.
38+
"""
3639

3740
def __init__(self,
3841
column_names: List[types.FeatureName],

tensorflow_data_validation/coders/tf_example_decoder.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,8 @@ def DecodeTFExample(
3434
) -> beam.pvalue.PCollection: # pylint: disable=invalid-name
3535
"""Decodes serialized TF examples into Arrow RecordBatches.
3636
37+
DEPRECATED: please use tfx_bsl.public.TFExampleRecord instead.
38+
3739
Args:
3840
examples: A PCollection of strings representing serialized TF examples.
3941
desired_batch_size: Batch size. The output Arrow RecordBatches will have as

0 commit comments

Comments
 (0)