e291b70775f2a025056a6125ee11758757206c26,tensorflow_datasets/core/dataset_builder_beam_test.py,DummyBeamDataset,_build_pcollection,#DummyBeamDataset#Any#Any#,70
Before Change
def _build_pcollection(self, pipeline, num_examples):
Generate examples as dicts.
return (
pipeline
| beam.Create(range(num_examples))
| beam.Map(_gen_example)
)
def _gen_example(x):
return {
After Change
| beam.Map(_gen_example)
)
self.info.metadata["label_sum_%d" % num_examples] = (
examples
| beam.Map(lambda x: x["label"])
| beam.CombineGlobally(sum))
self.info.metadata["id_mean_%d" % num_examples] = (
examples
| beam.Map(lambda x: x["id"])
| beam.CombineGlobally(beam.combiners.MeanCombineFn()))
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 4
Instances
Project Name: tensorflow/datasets
Commit Name: e291b70775f2a025056a6125ee11758757206c26
Time: 2019-10-15
Author: adarob@google.com
File Name: tensorflow_datasets/core/dataset_builder_beam_test.py
Class Name: DummyBeamDataset
Method Name: _build_pcollection
Project Name: tensorflow/transform
Commit Name: 12f1b34f75c7b96376de42998984640e834a1253
Time: 2017-10-06
Author: tf-transform-dev@google.com
File Name: tensorflow_transform/beam/impl.py
Class Name: _ComputeTensorValues
Method Name: expand
Project Name: tensorflow/transform
Commit Name: 96e4af6e86e93da021c29a4273dcdfaeab8fdfcf
Time: 2017-08-07
Author: tf-transform-dev@google.com
File Name: tensorflow_transform/beam/tft_beam_io/transform_fn_io.py
Class Name: WriteTransformFn
Method Name: expand