1715fe645f8f86e5a05deae0a0611bef895e2aec,tensorflow_transform/beam/analysis_graph_builder_test.py,,_preprocessing_fn_with_table,#Any#,82
Before Change
def _preprocessing_fn_with_table(inputs):
x = inputs["x"]
x_vocab = tft.vocabulary(x, name="x")
table = tf.contrib.lookup.index_table_from_file(x_vocab)
x_integerized = table.lookup(x)
return {"x_integerized": x_integerized}
After Change
def _preprocessing_fn_with_table(inputs):
x = inputs["x"]
x_vocab = tft.vocabulary(x, name="x")
initializer = tf.lookup.TextFileInitializer(
x_vocab,
key_dtype=tf.string,
key_index=tf.lookup.TextFileIndex.WHOLE_LINE,
value_dtype=tf.int64,
value_index=tf.lookup.TextFileIndex.LINE_NUMBER,
delimiter=" ")
table = tf.lookup.StaticHashTable(initializer, default_value=-1)
x_integerized = table.lookup(x)
return {"x_integerized": x_integerized}
In pattern: SUPERPATTERN
Frequency: 4
Non-data size: 8
Instances
Project Name: tensorflow/transform
Commit Name: 1715fe645f8f86e5a05deae0a0611bef895e2aec
Time: 2019-06-12
Author: tf-transform-dev@google.com
File Name: tensorflow_transform/beam/analysis_graph_builder_test.py
Class Name:
Method Name: _preprocessing_fn_with_table
Project Name: tensorflow/transform
Commit Name: 249cd01eccb5c787779c69292d6262b514c0df8b
Time: 2019-05-31
Author: tf-transform-dev@google.com
File Name: tensorflow_transform/graph_tools_test.py
Class Name:
Method Name: _create_graph_with_table_initialized_by_table_output
Project Name: tensorflow/transform
Commit Name: 1715fe645f8f86e5a05deae0a0611bef895e2aec
Time: 2019-06-12
Author: tf-transform-dev@google.com
File Name: tensorflow_transform/beam/analysis_graph_builder_test.py
Class Name:
Method Name: _preprocessing_fn_with_table
Project Name: tensorflow/transform
Commit Name: 1715fe645f8f86e5a05deae0a0611bef895e2aec
Time: 2019-06-12
Author: tf-transform-dev@google.com
File Name: tensorflow_transform/graph_tools_test.py
Class Name:
Method Name: _create_graph_with_table_initialized_by_table_output
Project Name: tensorflow/transform
Commit Name: 249cd01eccb5c787779c69292d6262b514c0df8b
Time: 2019-05-31
Author: tf-transform-dev@google.com
File Name: tensorflow_transform/beam/analysis_graph_builder_test.py
Class Name:
Method Name: _preprocessing_fn_with_table