class_docstr: The result of a benchmark test, or series of replications. Scalar data present
  in the BenchmarkResult is here represented as (mean, sem) pairs.
class_docstr_tok: ["The","result","of","a","benchmark","test",",","or","series","of","replications",".","Scalar","data","present","in","the","BenchmarkResult","is","here","represented","as","(","mean",",","sem",")","pairs","."]
docstr: Aggregrates a list of BenchmarkResults. For various reasons (timeout, errors,
  etc.) each BenchmarkResult may have a different number of trials; aggregated
  traces and statistics are computed with and truncated to the minimum trial count
  to ensure each replication is included.
docstr_tok: ["Aggregrates","a","list","of","BenchmarkResults",".","For","various","reasons","(","timeout",",","errors",",","etc",".",")","each","BenchmarkResult","may","have","a","different","number","of","trials",";","aggregated","traces","and","statistics","are","computed","with","and","truncated","to","the","minimum","trial","count","to","ensure","each","replication","is","included","."]
code: def from_benchmark_results(
      cls,
      results: List[BenchmarkResult],
  ) -> "AggregatedBenchmarkResult":
      """Aggregrates a list of BenchmarkResults. For various reasons (timeout, errors,
      etc.) each BenchmarkResult may have a different number of trials; aggregated
      traces and statistics are computed with and truncated to the minimum trial count
      to ensure each replication is included.
      """
      # Extract average wall times and standard errors thereof
      fit_time, gen_time = (
          [nanmean(Ts), float(sem(Ts, ddof=1, nan_policy="propagate"))]
          for Ts in zip(
              *((res.fit_time, res.gen_time) for res in results)
          )
      )
  
      # Compute some statistics for each trace
      trace_stats = {}
      for name in ("optimization_trace", "score_trace"):
          step_data = zip(*(getattr(res, name) for res in results))
          stats = _get_stats(
              step_data=step_data, percentiles=PERCENTILES
          )
          trace_stats[name] = stats
  
      # Return aggregated results
      return cls(
          name=results[0].name,
          results=results,
          fit_time=fit_time,
          gen_time=gen_time,
          **{
              name: DataFrame(stats)
              for name, stats in trace_stats.items()
          },
      )
  
file_path: Ax/ax/benchmark/benchmark_result.py
imports: from dataclasses import dataclass
  from typing import Dict, Iterable, List, Optional
  import numpy
  from ax.core.experiment import Experiment
  from ax.utils.common.base import Base
  from numpy import nanmean, nanquantile, ndarray
  from pandas import DataFrame
  from scipy.stats import sem
label_desc: Use image node_id 2 for calling the AggregatedBenchmarkResult obj's underlying member method code with example usage: obj.from_benchmark_results(cls, results) and returns: cls