MCPcopy
hub / github.com/huggingface/transformers / accumulate

Method accumulate

benchmark_v2/framework/data_classes.py:103–114  ·  view source on GitHub ↗
(
        self,
        e2e_latency: float,
        timestamps: list[float],
        shape_and_decoded_output: str,
        gpu_metrics: GPURawMetrics | None,
    )

Source from the content-addressed store, hash-verified

101 self.gpu_metrics = []
102
103 def accumulate(
104 self,
105 e2e_latency: float,
106 timestamps: list[float],
107 shape_and_decoded_output: str,
108 gpu_metrics: GPURawMetrics | None,
109 ) -> None:
110 self.e2e_latency.append(e2e_latency)
111 self._timestamps.append(timestamps)
112 self._accumulate_ttft_and_itl(timestamps)
113 self.shape_and_decoded_outputs.append(shape_and_decoded_output)
114 self.gpu_metrics.append(gpu_metrics)
115
116 def _accumulate_ttft_and_itl(self, timestamps: list[float]) -> None:
117 timestamps = np.array(timestamps)

Callers 13

run_benchmarkMethod · 0.95
mainFunction · 0.80
mainFunction · 0.80
mainFunction · 0.80
mainFunction · 0.80
mainFunction · 0.80
mainFunction · 0.80
mainFunction · 0.80
mainFunction · 0.80
mainFunction · 0.80
mainFunction · 0.80
mainFunction · 0.80

Calls 1

Tested by

no test coverage detected