MCPcopy
hub / github.com/GPflow/GPflow / group

Function group

benchmark/grouping.py:123–141  ·  view source on GitHub ↗

Group the given data according to the given specification.

(
    metrics_df: pd.DataFrame,
    plotters: Collection[Plotter],
    metadata: Collection[BenchmarkMetadata],
    spec: GroupingSpec,
)

Source from the content-addressed store, hash-verified

121
122
123def group(
124 metrics_df: pd.DataFrame,
125 plotters: Collection[Plotter],
126 metadata: Collection[BenchmarkMetadata],
127 spec: GroupingSpec,
128) -> Sequence[Tuple[Tuple[str, ...], pd.DataFrame, Collection[Plotter]]]:
129 """
130 Group the given data according to the given specification.
131 """
132 result = _group(metrics_df, plotters, metadata, spec.by)
133
134 if spec.minimise:
135 # Terribly inefficient, but it's probably fast enough.
136 for candidate_by in _iter_by(spec.by):
137 candidate_result = _group(metrics_df, plotters, metadata, candidate_by)
138 if len(result) == len(candidate_result):
139 return candidate_result
140
141 return result
142
143
144def _group(

Callers 6

metrics_box_plotFunction · 0.90
time_lineFunction · 0.90
plotFunction · 0.90
test_groupFunction · 0.90
__call__Method · 0.85

Calls 2

_groupFunction · 0.85
_iter_byFunction · 0.85

Tested by 2

test_groupFunction · 0.72

Used in the wild real call sites across dependent graphs

searching dependent graphs…