Returns a summary proto buffer holding this experiment.
484658
def create_experiment_summary():
  """"""

  # Convert TEMPERATURE_LIST to google.protobuf.ListValue
  temperature_list = struct_pb2.ListValue()
  temperature_list.extend(TEMPERATURE_LIST)
  materials = struct_pb2.ListValue()
  materials.extend(HEAT_COEFFICIENTS.keys())
  return summary.experiment_pb(
      hparam_infos=[
          api_pb2.HParamInfo(name='initial_temperature',
                             display_name='Initial temperature',
                             type=api_pb2.DATA_TYPE_FLOAT64,
                             domain_discrete=temperature_list),
          api_pb2.HParamInfo(name='ambient_temperature',
                             display_name='Ambient temperature',
                             type=api_pb2.DATA_TYPE_FLOAT64,
                             domain_discrete=temperature_list),
          api_pb2.HParamInfo(name='material',
                             display_name='Material',
                             type=api_pb2.DATA_TYPE_STRING,
                             domain_discrete=materials)
      ],
      metric_infos=[
          api_pb2.MetricInfo(
              name=api_pb2.MetricName(
                  tag='temperature/current/scalar_summary'),
              display_name='Current Temp.'),
          api_pb2.MetricInfo(
              name=api_pb2.MetricName(
                  tag='temperature/difference_to_ambient/scalar_summary'),
              display_name='Difference To Ambient Temp.'),
          api_pb2.MetricInfo(
              name=api_pb2.MetricName(
                  tag='delta/scalar_summary'),
              display_name='Delta T')
      ]
  )
374733
def summary():
    '''
    
    '''

    puppet = _Puppet()

    try:
        with salt.utils.files.fopen(puppet.lastrunfile, 'r') as fp_:
            report = salt.utils.yaml.safe_load(fp_)
        result = {}

        if 'time' in report:
            try:
                result['last_run'] = datetime.datetime.fromtimestamp(
                    int(report['time']['last_run'])).isoformat()
            except (TypeError, ValueError, KeyError):
                result['last_run'] = 'invalid or missing timestamp'

            result['time'] = {}
            for key in ('total', 'config_retrieval'):
                if key in report['time']:
                    result['time'][key] = report['time'][key]

        if 'resources' in report:
            result['resources'] = report['resources']

    except salt.utils.yaml.YAMLError as exc:
        raise CommandExecutionError(
            'YAML error parsing puppet run summary: {0}'.format(exc)
        )
    except IOError as exc:
        raise CommandExecutionError(
            'Unable to read puppet run summary: {0}'.format(exc)
        )

    return result
394499
public SummaryTable[] showSummary(){
        int cont = 0;
        int algorithmSize = this.streams.get(0).algorithm.size();
        int streamSize = this.streams.size();
        int measureSize = this.streams.get(0).algorithm.get(0).measures.size();
        summary = new SummaryTable[measureSize];
        while (cont != measureSize) {
           
            summary[cont] = new SummaryTable();
            summary[cont].measureName = this.streams.get(0).algorithm.get(0).measures.get(cont).getName();
            summary[cont].algNames = new String[algorithmSize+1];
            summary[cont].algNames[0] ="Algorithm";
            summary[cont].value = new Object[streamSize][algorithmSize+1];
           
            for (int i = 0; i < algorithmSize; i++) {
              
                summary[cont].algNames[i+1] = this.streams.get(0).algorithm.get(i).name;
            }
            for (int i = 0; i < streamSize; i++) {
                List<Algorithm> alg = this.streams.get(i).algorithm;
                 summary[cont].value[i][0] = this.streams.get(i).name;  
                for (int j = 0; j < algorithmSize; j++) {
                    if (alg.get(j).measures.get(cont).isType()) {
                        summary[cont].value[i][j+1] = Algorithm.format(alg.get(j).measures.get(cont).getValue())+"±"+
                                    Algorithm.format(alg.get(j).measures.get(cont).getStd());
                    } else {
                        summary[cont].value[i][j+1] = Algorithm.format1(alg.get(j).measures.get(cont).getValue());
                       
                    }
                }
               
            }
                   
            cont++;
        }
        return summary;
    }
737172
def summary(self):
        
        self.detach()
        if self._summary is None:
            self._summary = BoltStatementResultSummary(**self._metadata)
        return self._summary
528183
def get_summary(self):
        
        graph_vector_summary = OrderedDict()
        graph_vector_summary[self.get_source_name()] = (
            '[' + self.measurement_unit + ']')
        graph_vector_summary.update(self.get_sensors_summary())
        return graph_vector_summary
164943
def read_proto_object(fobj, klass):
    """"""
    log.debug('%s chunk', klass.__name__)
    obj = klass()
    obj.ParseFromString(read_block(fobj))
    log.debug('Header: %s', str(obj))
    return obj
1075600
def write_summaries(self, tagged_data, experiment_name, run_name):
    
    logger.debug('Writing summaries for %s tags', len(tagged_data))
    # Connection used as context manager for auto commit/rollback on exit.
    # We still need an explicit BEGIN, because it doesn't do one on enter,
    # it waits until the first DML command - which is totally broken.
    # See: https://stackoverflow.com/a/44448465/1179226
    with self._db:
      self._db.execute('BEGIN TRANSACTION')
      run_id = self._maybe_init_run(experiment_name, run_name)
      tag_to_metadata = {
          tag: tagdata.metadata for tag, tagdata in six.iteritems(tagged_data)
      }
      tag_to_id = self._maybe_init_tags(run_id, tag_to_metadata)
      tensor_values = []
      for tag, tagdata in six.iteritems(tagged_data):
        tag_id = tag_to_id[tag]
        for step, wall_time, tensor_proto in tagdata.values:
          dtype = tensor_proto.dtype
          shape = ','.join(str(d.size) for d in tensor_proto.tensor_shape.dim)
          # Use tensor_proto.tensor_content if it's set, to skip relatively
          # expensive extraction into intermediate ndarray.
          data = self._make_blob(
              tensor_proto.tensor_content or
              tensor_util.make_ndarray(tensor_proto).tobytes())
          tensor_values.append((tag_id, step, wall_time, dtype, shape, data))
      self._db.executemany(
          """
          INSERT OR REPLACE INTO Tensors (
            series, step, computed_time, dtype, shape, data
          ) VALUES (?, ?, ?, ?, ?, ?)
          """,
          tensor_values)
329181
def to_protobuf(self) -> LinkItemProto:
        
        result = LinkItemProto()
        result.name = self._name
        result.time.CopyFrom(datetime_to_timestamp(self._time))
        return result
725472
def buffer(self):
        '''
        
        '''
        return buffer(self._input, self._start_pos,
                      (self._end_pos - self._start_pos))
791980
def summary(self):
    
    with tf.name_scope(self._name + '/summary'):
      mean_summary = tf.cond(
          self._count > 0, lambda: self._summary('mean', self._mean), str)
      std_summary = tf.cond(
          self._count > 1, lambda: self._summary('stddev', self._std()), str)
      return tf.summary.merge([mean_summary, std_summary])
700904
def summary(self):
        
        if self._summary is None:
            self._summary = CallSummaryList(self)
        return self._summary
11557
@SuppressWarnings("unchecked")
  private P byteBufferToPage(ByteBuffer buffer) {
    try (InputStream bais = new ByteBufferInputStream(buffer);
        ObjectInputStream ois = new ObjectInputStream(bais)) {
      int type = ois.readInt();
      if (type == EMPTY_PAGE) {
        return null;
      } else if (type == FILLED_PAGE) {
        return (P) ois.readObject();
      } else {
        throw new IllegalArgumentException("Unknown type: " + type);
      }
    } catch (IOException|ClassNotFoundException e) {
      LoggingUtil.exception(e);
      return null;
    }
  }
1202610
def summary(self):
        
        if self.hasSummary:
            return GaussianMixtureSummary(super(GaussianMixtureModel, self).summary)
        else:
            raise RuntimeError("No training summary available for this %s" %
                               self.__class__.__name__)
211560
def summary(self):
        """"""
        return "== Model %s did not complete test %s due to error '%s'. ==" %\
               (str(self.model), str(self.test), str(self.score))
1029596
def get_summary(self):
        """"""
        if not self.analysis_finished:
            return []
        summary = {'times_summary': []}
        for i in range(len(self.runs[self.current_run].steps) - 1):
            step = self.runs[self.current_run].steps[i]
            begin = parse(step['when'])
            end = parse(self.runs[self.current_run].steps[i + 1]['when'])
            duration = end - begin
            summary['times_summary'].append((step['step'], duration.seconds))
        return summary
49637
def print_summary(self, result, time_taken):
        
        if hasattr(result, "separator2"):
            self.stream.writeln(result.separator2)

        self.stream.writeln("Ran {number_of_tests} test{s} in {time:.3f}s\n".format(
            number_of_tests=result.testsRun, s="s" if result.testsRun != 1 else "", time=time_taken
        ))

        info = []
        if not result.wasSuccessful():
            self.stream.write("FAILED")

            if result.failures:
                info.append("failures={}".format(len(result.failures)))
            if result.errors:
                info.append("errors={}".format(len(result.errors)))
        else:
            self.stream.write("OK")

        if result.skipped:
            info.append("skipped={}".format(len(result.skipped)))
        if result.expectedFailures:
            info.append("expected failures={}".format(len(result.expectedFailures)))
        if result.unexpectedSuccesses:
            info.append("unexpected successes={}".format(len(result.unexpectedSuccesses)))

        if info:
            self.stream.writeln(" ({})".format(", ".join(info)))
        else:
            self.stream.write("\n")
1276465
def pipeline_summary(data):
    
    data = utils.to_single_data(data)
    work_bam = dd.get_align_bam(data) or dd.get_work_bam(data)
    if not work_bam or not work_bam.endswith(".bam"):
        work_bam = None
    if dd.get_ref_file(data):
        if work_bam or (tz.get_in(["config", "algorithm", "kraken"], data)):  # kraken doesn't need bam
            logger.info("QC: %s %s" % (dd.get_sample_name(data), ", ".join(dd.get_algorithm_qc(data))))
            work_data = cwlutils.unpack_tarballs(utils.deepish_copy(data), data)
            data["summary"] = _run_qc_tools(work_bam, work_data)
            if (len(dd.get_algorithm_qc(data)) == 1 and "output_cwl_keys" in data):
                data["summary"]["qc"] = data["summary"]["qc"].get(dd.get_algorithm_qc(data)[0])
    return [[data]]