5b2fa49f9ee24bd079ab0c8d5373a3bfcfcc60b4,tensorflow_transform/tf_metadata/dataset_schema.py,,_from_parse_feature,#Any#,381

Before Change


  if isinstance(parse_feature, tf.SparseFeature):
    sparse_shape = LogicalShape(
        axes=[Axis(parse_feature.size)])
    logical = LogicalColumnSchema(
        domain=_dtype_to_domain(parse_feature.dtype),
        shape=sparse_shape)
    index_field = SparseIndexField(name=parse_feature.index_key,
                                   is_sorted=parse_feature.already_sorted)
    representation = SparseColumnRepresentation(
        value_field_name=parse_feature.value_key,
        index_fields=[index_field])
    return ColumnSchema(logical, representation)

  raise ValueError("Cannot interpret feature spec: {}".format(parse_feature))

After Change


    representation = SparseColumnRepresentation(
        value_field_name=parse_feature.value_key,
        index_fields=[index_field])
    return ColumnSchema(parse_feature.dtype, [parse_feature.size],
                        representation)

  raise ValueError("Cannot interpret feature spec: {}".format(parse_feature))

Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 3

Instances


Project Name: tensorflow/transform
Commit Name: 5b2fa49f9ee24bd079ab0c8d5373a3bfcfcc60b4
Time: 2017-03-07
Author: no-reply@google.com
File Name: tensorflow_transform/tf_metadata/dataset_schema.py
Class Name:
Method Name: _from_parse_feature


Project Name: tensorflow/transform
Commit Name: 687e31d276db17b4ac7bea08b01c1e5401168ca9
Time: 2019-01-23
Author: tf-transform-dev@google.com
File Name: tensorflow_transform/schema_inference.py
Class Name:
Method Name: infer_feature_schema


Project Name: tensorflow/transform
Commit Name: 687e31d276db17b4ac7bea08b01c1e5401168ca9
Time: 2019-01-23
Author: tf-transform-dev@google.com
File Name: tensorflow_transform/tf_metadata/metadata_io.py
Class Name:
Method Name: _column_schema_from_json