c4f3799d5713d467ca577a6d0593f242076c9540,tensorflow_datasets/core/test_utils.py,FeatureExpectationsTestCase,test_encode_decode,#FeatureExpectationsTestCase#,65
Before Change
@tf.contrib.eager.run_test_in_graph_and_eager_modes()
def test_encode_decode(self):
expectations = self.expectations
fdict = features.FeaturesDict(
{exp.name: exp.feature for exp in expectations})
decoded_sample = features_encode_decode(
fdict, dict([(exp.name, exp.value) for exp in expectations]))
for exp in expectations:
self.assertAllEqual(decoded_sample[exp.name], exp.expected)
// TODO(rsepassi): test shape and dtype against exp.feature
After Change
// Maybe should try to use metaclass instead and dynamically generate one
// method per feature expectation.
for exp in self.expectations:
tf.logging.info("Testing feature %s", exp.name)
// Check the shape/dtype
self.assertEqual(exp.feature.shape, exp.shape)
self.assertEqual(exp.feature.dtype, exp.dtype)
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 6
Instances Project Name: tensorflow/datasets
Commit Name: c4f3799d5713d467ca577a6d0593f242076c9540
Time: 2018-11-14
Author: epot@google.com
File Name: tensorflow_datasets/core/test_utils.py
Class Name: FeatureExpectationsTestCase
Method Name: test_encode_decode
Project Name: dask/distributed
Commit Name: 0c8918b5e6ff63857f89c76468a5ec2d2aa005ae
Time: 2019-04-24
Author: delgadom@users.noreply.github.com
File Name: distributed/deploy/adaptive.py
Class Name: Adaptive
Method Name: needs_cpu
Project Name: etal/cnvkit
Commit Name: 329549bdbbe0caefddf68f8bdba90ac8953116a3
Time: 2019-03-20
Author: etalevich@dnanexus.com
File Name: cnvlib/segmentation/hmm.py
Class Name:
Method Name: segment_hmm