parameters: (output_dir, eval_results, current_global_step)
docstring: Writes eval results into summary file in given dir.
docstring_summary: Writes eval results into summary file in given dir.
docstring_tokens: Writes eval results into summary file in given dir .
function: def _write_summary_results(output_dir, eval_results, current_global_step):
    """Writes eval results into summary file in given dir."""
    logging.info('Saving evaluation summary for step %d: %s', current_global_step,
                 _eval_results_to_str(eval_results))
    summary_writer = get_summary_writer(output_dir)
    summary = summary_pb2.Summary()
    for key in eval_results:
      if eval_results[key] is None:
        continue
      value = summary.value.add()
      value.tag = key
      if (isinstance(eval_results[key], np.float32) or
          isinstance(eval_results[key], float)):
        value.simple_value = float(eval_results[key])
      else:
        logging.warn('Skipping summary for %s, must be a float or np.float32.',
                     key)
    summary_writer.add_summary(summary, current_global_step)
    summary_writer.flush()
function_tokens: def _write_summary_results ( output_dir , eval_results , current_global_step ) : logging . info ( 'Saving evaluation summary for step %d: %s' , current_global_step , _eval_results_to_str ( eval_results ) ) summary_writer = get_summary_writer ( output_dir ) summary = summary_pb2 . Summary ( ) for key in eval_results : if eval_results [ key ] is None : continue value = summary . value . add ( ) value . tag = key if ( isinstance ( eval_results [ key ] , np . float32 ) or isinstance ( eval_results [ key ] , float ) ) : value . simple_value = float ( eval_results [ key ] ) else : logging . warn ( 'Skipping summary for %s, must be a float or np.float32.' , key ) summary_writer . add_summary ( summary , current_global_step ) summary_writer . flush ( )