Gets the current global evaluation result.

        Returns
        -------
        names : list of str
           Name of the metrics.
        values : list of float
           Value of the evaluations.
974259
def get_global(self):
        
        if self._has_global_stats:
            if self.global_num_inst == 0:
                return (self.name, float('nan'))
            else:
                return (self.name, self.global_sum_metric / self.global_num_inst)
        else:
            return self.get()
818294
def _get_all_constants():
    
    return [
        key for key in globals().keys()
        if all([
            not key.startswith("_"),          # publicly accesible
            key.upper() == key,               # uppercase
            type(globals()[key]) in _ALLOWED  # and with type from _ALLOWED
        ])
    ]
753789
def get_values(self, data, filter_values):
        
        out = []
        for bucket in data.buckets:
            key = self.get_value(bucket)
            out.append((
                key,
                self.get_metric(bucket),
                self.is_filtered(key, filter_values)
            ))
        return out
86638
def get_global_sources(self):
        
        sources = []
        if self.sources:
            for source in self.sources:
                if None in source.streams:
                    sources.append(source.streams[None])
        return sources
259667
def get_current_name_scope():
  """"""
  # pylint: disable=protected-access
  g = tf.get_default_graph()
  # TODO(eiderman): Remove this hack once TF update is released.
  if isinstance(g._name_stack, tuple):
    return g._name_stack[0] + '/'
  else:
    return g._name_stack + '/'
49394
async def get_metrics(self):
        
        metrics = await self.model.get_metrics(self.tag)
        return metrics[self.name]
260005
def get_output_values(self):
        
        # Handle primitive values here and implicitly convert them to a dict because
        # it allows the API to be simpler.

        # Also influxDB mandates that each value also has a name so the default name
        # for any non-dict value is "value"
        if not isinstance(self.values, dict):
            metric_values = {'value': self.values}
        else:
            metric_values = self.values

        # Sort the values in lexicographically by value name
        sorted_values = sorted(metric_values.items())

        # Remove None values
        sorted_values = [(k, v) for k, v in sorted_values if v is not None]

        return u",".join(u"{0}={1}".format(format_string(k), format_value(v)) for k, v in sorted_values)
1205238
function(results) {
    var globalScoreSum = 0;
    var globalScoreCount = 0;

    var rulesScoresSum = {};
    var rulesScoresCount = {};
    var rulesValuesSum = {};
    var rulesValuesCount = {};


    results.forEach(function(result) {
        
        // Global score
        globalScoreSum += result.scoreProfiles.generic.globalScore;
        globalScoreCount ++;

        // Rules
        for (var ruleName in result.rules) {
            if (!rulesScoresCount[ruleName]) {
                rulesScoresSum[ruleName] = 0;
                rulesScoresCount[ruleName] = 0;
                rulesValuesSum[ruleName] = 0;
                rulesValuesCount[ruleName] = 0;
            }

            rulesScoresSum[ruleName] += result.rules[ruleName].score;
            rulesScoresCount[ruleName] ++;
            rulesValuesSum[ruleName] += result.rules[ruleName].value;
            rulesValuesCount[ruleName] ++;
        }
    });

    // Calculate averages
    var averageObject = {
        scoreProfiles: {
            generic: {
                globalScore: globalScoreSum / globalScoreCount
            }
        },
        rules: {}
    };

    for (var ruleName in rulesScoresCount) {
        var score = rulesScoresSum[ruleName] / rulesScoresCount[ruleName];
        var value = rulesValuesSum[ruleName] / rulesValuesCount[ruleName];

        averageObject.rules[ruleName] = {
            score: score
        };

        if (!isNaN(value)) {
            averageObject.rules[ruleName].value = value;
        }
    }

    return averageObject;
}
374018
def get_name(self, **values) -> str:
        
        if not values and self.name:
            return self.name
        if values:
            # if values are provided, solve compounds that may be affected
            for ck, cvs in _sorted_items(self.compounds):
                if ck in cvs and ck in values:  # redefined compound name to outer scope e.g. fifth = (fifth, sixth)
                    continue
                comp_values = [values.pop(cv, getattr(self, cv)) for cv in cvs]
                if None not in comp_values:
                    values[ck] = ''.join(rf'{v}' for v in comp_values)
        return self._get_nice_name(**values)
380823
def _get_globals():
    """"""
    if _get_globals_callback is not None:
        return _get_globals_callback()
    else:
        try:
            from __main__ import __dict__ as namespace
        except ImportError:
            try:
                # The import fails on IronPython
                import __main__
                namespace = __main__.__dict__
            except:
                namespace
        shell = namespace.get('__ipythonshell__')
        if shell is not None and hasattr(shell, 'user_ns'):
            # IPython 0.12+ kernel
            return shell.user_ns
        else:
            # Python interpreter
            return namespace
        return namespace
931172
def _get_caller_globals_and_locals():
    
    caller_frame = inspect.stack()[2]
    myglobals = caller_frame[0].f_globals
    mylocals = caller_frame[0].f_locals
    return myglobals, mylocals
809978
def get_all(self):
        
        with mutex:
            items = self.values.items()

        result = []
        for k, v in items:
            # Check if is a single value dict (custom empty key)
            if not k or k == MetricDict.EMPTY_KEY:
                key = None
            else:
                key = decoder.decode(k)
            result.append((key, self.get(k)))

        return result
257899
def evaluate(self, verbose=False, decode=True, passes=None, num_threads=1, apply_experimental=True):
        
        evaluated_data = [v.evaluate(verbose, decode, passes, num_threads, apply_experimental) for v in self.values]

        return MultiIndex(evaluated_data, self.names)
1146105
def evaluate_result(self, m):
        ''''''
        # ok, figure the fixed fields we've pulled out and type convert them
        fixed_fields = list(m.groups())
        for n in self._fixed_fields:
            if n in self._type_conversions:
                fixed_fields[n] = self._type_conversions[n](fixed_fields[n], m)
        fixed_fields = tuple(fixed_fields[n] for n in self._fixed_fields)

        # grab the named fields, converting where requested
        groupdict = m.groupdict()
        named_fields = {}
        name_map = {}
        for k in self._named_fields:
            korig = self._group_to_name_map[k]
            name_map[korig] = k
            if k in self._type_conversions:
                value = self._type_conversions[k](groupdict[k], m)
            else:
                value = groupdict[k]

            named_fields[korig] = value

        # now figure the match spans
        spans = dict((n, m.span(name_map[n])) for n in named_fields)
        spans.update((i, m.span(n + 1))
            for i, n in enumerate(self._fixed_fields))

        # and that's our result
        return Result(fixed_fields, self._expand_named_fields(named_fields), spans)
337867
def GetResults(self):
    
    results = []
    for hasher in self._hashers:
      logger.debug('Processing results for hasher {0:s}'.format(hasher.NAME))
      result = analyzer_result.AnalyzerResult()
      result.analyzer_name = self.NAME
      result.attribute_name = '{0:s}_hash'.format(hasher.NAME)
      result.attribute_value = hasher.GetStringDigest()
      results.append(result)
    return results
1265542
def _build_session_metric_values(self, session_name):
    """"""

    # result is a list of api_pb2.MetricValue instances.
    result = []
    metric_infos = self._experiment.metric_infos
    for metric_info in metric_infos:
      metric_name = metric_info.name
      try:
        metric_eval = metrics.last_metric_eval(
            self._context.multiplexer,
            session_name,
            metric_name)
      except KeyError:
        # It's ok if we don't find the metric in the session.
        # We skip it here. For filtering and sorting purposes its value is None.
        continue

      # metric_eval is a 3-tuple of the form [wall_time, step, value]
      result.append(api_pb2.MetricValue(name=metric_name,
                                        wall_time_secs=metric_eval[0],
                                        training_step=metric_eval[1],
                                        value=metric_eval[2]))
    return result
133653
def getNamedActionValue(self, name):
        
        actions = self._actions

        if (type (actions) is list):
            for a in actions:
                if a.get('name', 'NoValue') == name:
                    dict =a
        else:
            dict = actions
        return dict.get('value', 'NoValue')