from tensorflow.contrib.learn.python.learn.estimators import test_data


  def _assertCommonMetrics(self, metrics):
    estimator_test_utils.assert_in_range(_ITERS, _ITERS + 5, 'global_step',
                                         metrics)
    estimator_test_utils.assert_in_range(0.9, 1.0, 'accuracy', metrics)
    estimator_test_utils.assert_in_range(0.0, 0.2, 'loss', metrics)
    self.report_benchmark(
        iters=metrics['global_step'],
        extras={k: v
                for k, v in metrics.items() if k in _METRIC_KEYS})

  def benchmarkMatrixData(self):
    iris = test_data.prepare_iris_data_for_logistic_regression()
    cont_feature = feature_column.real_valued_column('feature', dimension=4)
    bucketized_feature = feature_column.bucketized_column(
        cont_feature, test_data.get_quantile_based_buckets(iris.data, 10))

    classifier = dnn_linear_combined.DNNLinearCombinedClassifier(
        model_dir=tempfile.mkdtemp(),
        linear_feature_columns=(bucketized_feature,),
        dnn_feature_columns=(cont_feature,),
        dnn_hidden_units=(3, 3))

    input_fn = test_data.iris_input_logistic_fn
    metrics = classifier.fit(input_fn=input_fn, steps=_ITERS).evaluate(
        input_fn=input_fn, steps=100)
    self._assertSingleClassMetrics(metrics)

  def benchmarkTensorData(self):

