parameters: (self, features, labels, params)
return_statement: return eval_step, captured_eval_metric_fn, captured_scaffold_fn
docstring: Creates a single step of evaluation for xla.compile().
docstring_summary: Creates a single step of evaluation for xla.compile().
docstring_tokens: Creates a single step of evaluation for xla . compile () .
function: def _make_eval_step(self, features, labels, params):
      """Creates a single step of evaluation for xla.compile()."""
      captured_eval_metric_fn = _CapturedObject()
      captured_scaffold_fn = _CapturedObject()
  
      def eval_step():
        """A single step of evaluation."""
        estimator_spec = self._call_model_fn(features, labels,
                                             model_fn_lib.ModeKeys.EVAL, params)
  
        try:
          captured_scaffold_fn.capture(estimator_spec.scaffold_fn)
        except AttributeError:
          captured_scaffold_fn.capture(None)
  
        eval_metric_fn = None
        eval_metric_fn_tensors = []
        try:
          if estimator_spec.eval_metrics:
            (eval_metric_fn, eval_metric_fn_tensors) = estimator_spec.eval_metrics
        except AttributeError:
          pass
  
        # If a dictionary is provided, we need to convert it into a list sorted
        # according to order of eval_metric_fn positional arguments.
        if isinstance(eval_metric_fn_tensors, dict):
          eval_metric_fn_args = function_utils.fn_args(eval_metric_fn)
          eval_metric_fn_tensors = [
              eval_metric_fn_tensors[i] for i in eval_metric_fn_args
          ]
  
        captured_eval_metric_fn.capture(eval_metric_fn)
  
        return tuple([estimator_spec.loss] + eval_metric_fn_tensors)
  
      return eval_step, captured_eval_metric_fn, captured_scaffold_fn
function_tokens: def _make_eval_step ( self , features , labels , params ) : captured_eval_metric_fn = _CapturedObject ( ) captured_scaffold_fn = _CapturedObject ( ) def eval_step ( ) : """A single step of evaluation.""" estimator_spec = self . _call_model_fn ( features , labels , model_fn_lib . ModeKeys . EVAL , params ) try : captured_scaffold_fn . capture ( estimator_spec . scaffold_fn ) except AttributeError : captured_scaffold_fn . capture ( None ) eval_metric_fn = None eval_metric_fn_tensors = [ ] try : if estimator_spec . eval_metrics : ( eval_metric_fn , eval_metric_fn_tensors ) = estimator_spec . eval_metrics except AttributeError : pass # If a dictionary is provided, we need to convert it into a list sorted # according to order of eval_metric_fn positional arguments. if isinstance ( eval_metric_fn_tensors , dict ) : eval_metric_fn_args = function_utils . fn_args ( eval_metric_fn ) eval_metric_fn_tensors = [ eval_metric_fn_tensors [ i ] for i in eval_metric_fn_args ] captured_eval_metric_fn . capture ( eval_metric_fn ) return tuple ( [ estimator_spec . loss ] + eval_metric_fn_tensors ) return eval_step , captured_eval_metric_fn , captured_scaffold_fn