Skip to content

Commit e812bef

Browse files
tf-transform-teamtfx-copybara
authored andcommitted
Updates TFT to ignore DERIVED lifecycle features (which are not available in input data) when producing a parsing spec.
PiperOrigin-RevId: 453453373
1 parent b32757d commit e812bef

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

tensorflow_transform/tf_metadata/schema_utils.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -517,15 +517,15 @@ def _fixed_shape_as_tf_shape(fixed_shape):
517517
return [int(dim.size) for dim in fixed_shape.dim]
518518

519519

520-
_DEPRECATED_LIFECYCLE_STAGES = [
520+
_IGNORED_LIFECYCLE_STAGES = [
521521
schema_pb2.DEPRECATED, schema_pb2.DISABLED, schema_pb2.PLANNED,
522-
schema_pb2.ALPHA, schema_pb2.DEBUG_ONLY
522+
schema_pb2.ALPHA, schema_pb2.DEBUG_ONLY, schema_pb2.VALIDATION_DERIVED,
523523
]
524524

525525

526526
def _include_in_parsing_spec(feature):
527527
return not (schema_utils_legacy.get_deprecated(feature) or
528-
feature.lifecycle_stage in _DEPRECATED_LIFECYCLE_STAGES)
528+
feature.lifecycle_stage in _IGNORED_LIFECYCLE_STAGES)
529529

530530

531531
def _legacy_schema_from_feature_spec(feature_spec, domains=None):

0 commit comments

Comments
 (0)