Ejemplo n.º 1
0
 def _makeEvalResults(self):
   result_a = model_eval_lib.EvalResult(
       slicing_metrics=self._makeTestData(),
       plots=None,
       config=config.EvalConfig(),
       data_location=self.data_location_1,
       file_format='tfrecords',
       model_location=self.model_location_1)
   result_b = model_eval_lib.EvalResult(
       slicing_metrics=[self.result_c2],
       plots=None,
       config=config.EvalConfig(),
       data_location=self.full_data_location_2,
       file_format='tfrecords',
       model_location=self.full_model_location_2)
   return model_eval_lib.EvalResults([result_a, result_b],
                                     constants.MODEL_CENTRIC_MODE)
Ejemplo n.º 2
0
    def _makeEvalResults(self):
        result_a = model_eval_lib.EvalResult(
            slicing_metrics=self._makeTestData(),
            plots=None,
            config=model_eval_lib.EvalConfig(
                example_weight_metric_key=None,
                slice_spec=None,
                data_location=self.data_location_1,
                model_location=self.model_location_1))

        result_b = model_eval_lib.EvalResult(
            slicing_metrics=[self.result_c2],
            plots=None,
            config=model_eval_lib.EvalConfig(
                example_weight_metric_key=None,
                slice_spec=None,
                data_location=self.full_data_location_2,
                model_location=self.full_model_location_2))
        return model_eval_lib.EvalResults([result_a, result_b],
                                          constants.MODEL_CENTRIC_MODE)
Ejemplo n.º 3
0
    def _makeEvalResult(self,
                        slices=((), (('slice', '1'), )),
                        metrics_names=('metrics1', 'metrics2')):
        metrics = {'': {'': {}}}
        for metrics_name in metrics_names:
            metrics[''][''][metrics_name] = {'double_value': {'value': 0.5}}

        slicing_metrics = [(s, metrics) for s in slices]
        return model_eval_lib.EvalResult(slicing_metrics=slicing_metrics,
                                         plots=None,
                                         config=None)
Ejemplo n.º 4
0
 def _makeEvalResults(self):
     result_a = model_eval_lib.EvalResult(
         slicing_metrics=self._makeTestData(),
         plots=None,
         config=config.EvalConfig(
             input_data_specs=[
                 config.InputDataSpec(location=self.data_location_1)
             ],
             model_specs=[config.ModelSpec(location=self.model_location_1)
                          ]))
     result_b = model_eval_lib.EvalResult(
         slicing_metrics=[self.result_c2],
         plots=None,
         config=config.EvalConfig(
             input_data_specs=[
                 config.InputDataSpec(location=self.full_data_location_2)
             ],
             model_specs=[
                 config.ModelSpec(location=self.full_model_location_2)
             ]))
     return model_eval_lib.EvalResults([result_a, result_b],
                                       constants.MODEL_CENTRIC_MODE)