code: def run_variations(
      algos,
      dataset_name,
      bench_rows,
      bench_dims,
      param_override_list=[{}],
      cuml_param_override_list=[{}],
      cpu_param_override_list=[{}],
      dataset_param_override_list=[{}],
      dtype=np.float32,
      input_type="numpy",
      test_fraction=0.1,
      run_cpu=True,
      device_list=("gpu",),
      raise_on_error=False,
      n_reps=1,
  ):
      """
      Runs each algo in `algos` once per
      `bench_rows X bench_dims X params_override_list X cuml_param_override_list`
      combination and returns a dataframe containing timing and accuracy data.
  
      Parameters
      ----------
      algos : str or list
        Name of algorithms to run and evaluate
      dataset_name : str
        Name of dataset to use
      bench_rows : list of int
        Dataset row counts to test
      bench_dims : list of int
        Dataset column counts to test
      param_override_list : list of dict
        Dicts containing parameters to pass to __init__.
        Each dict specifies parameters to override in one run of the algorithm.
      cuml_param_override_list : list of dict
        Dicts containing parameters to pass to __init__ of the cuml algo only.
      cpu_param_override_list : list of dict
        Dicts containing parameters to pass to __init__ of the cpu algo only.
      dataset_param_override_list : dict
        Dicts containing parameters to pass to dataset generator function
      dtype: [np.float32|np.float64]
        Specifies the dataset precision to be used for benchmarking.
      test_fraction : float
        The fraction of data to use for testing.
      run_cpu : boolean
        If True, run the cpu-based algorithm for comparison
      """
      print("Running: \n", "\n ".join([str(a.name) for a in algos]))
      runner = AccuracyComparisonRunner(
          bench_rows,
          bench_dims,
          dataset_name,
          input_type,
          test_fraction=test_fraction,
          n_reps=n_reps,
      )
      all_results = []
      for algo in algos:
          print("Running %s..." % (algo.name))
          for (
              overrides,
              cuml_overrides,
              cpu_overrides,
              dataset_overrides,
              device,
          ) in itertools.product(
              param_override_list,
              cuml_param_override_list,
              cpu_param_override_list,
              dataset_param_override_list,
              device_list,
          ):
              results = runner.run(
                  algo,
                  overrides,
                  cuml_param_overrides=cuml_overrides,
                  cpu_param_overrides=cpu_overrides,
                  dataset_param_overrides=dataset_overrides,
                  dtype=dtype,
                  run_cpu=run_cpu,
                  device=device,
                  raise_on_error=raise_on_error,
              )
              for r in results:
                  all_results.append(
                      {
                          "algo": algo.name,
                          "input": input_type,
                          "device": device,
                          **r,
                      }
                  )
  
      print("Finished all benchmark runs")
      results_df = pd.DataFrame.from_records(all_results)
      print(results_df)
  
      return results_df
  
file_path: cuml/python/cuml/benchmark/runners.py
imports: from cuml.internals.safe_imports import gpu_only_import_from
  from cuml.benchmark import datagen
  from cuml.common.device_selection import using_device_type
  import warnings
  import time
  import itertools
  from cuml.internals.safe_imports import cpu_only_import
label_desc: Use image node_id 1 for calling a global function with example usage: run_variations(algos, dataset_name, bench_rows, bench_dims, param_override_list, cuml_param_override_list, cpu_param_override_list, dataset_param_override_list, dtype, input_type, test_fraction, run_cpu, device_list, raise_on_error, n_reps) and returns: results_df