code: def benchmark(
      benchmarking_config: Union[Dict[str, Any], str]
  ) -> Dict[str, Tuple[BenchmarkingResult, Exception]]:
      """Launch benchmarking suite from a benchmarking config.
  
      Args:
          benchmarking_config: config or config path for the benchmarking tool. Specifies datasets and their
              corresponding Ludwig configs, as well as export options.
      """
      if isinstance(benchmarking_config, str):
          benchmarking_config = load_yaml(benchmarking_config)
      validate_benchmarking_config(benchmarking_config)
      benchmarking_config = populate_benchmarking_config_with_defaults(
          benchmarking_config
      )
      benchmarking_config = propagate_global_parameters(
          benchmarking_config
      )
  
      experiment_artifacts = {}
      for experiment_idx, experiment in enumerate(
          benchmarking_config["experiments"]
      ):
          dataset_name = experiment["dataset_name"]
          try:
              benchmark_one(experiment)
              experiment_artifacts[dataset_name] = (
                  build_benchmarking_result(
                      benchmarking_config, experiment_idx
                  ),
                  None,
              )
          except Exception as e:
              logger.exception(
                  f"Experiment *{experiment['experiment_name']}* on dataset *{experiment['dataset_name']}* failed"
              )
              experiment_artifacts[dataset_name] = (None, e)
          finally:
              if benchmarking_config["export"]["export_artifacts"]:
                  export_base_path = benchmarking_config["export"][
                      "export_base_path"
                  ]
                  export_artifacts(
                      experiment,
                      experiment["experiment_name"],
                      export_base_path,
                  )
      return experiment_artifacts
  
file_path: ludwig/ludwig/benchmarking/benchmark.py
imports: import argparse
  import importlib
  import logging
  import os
  import shutil
  from typing import Any, Dict, Tuple, Union
  import ludwig.datasets
  from ludwig.api import LudwigModel
  from ludwig.benchmarking.artifacts import BenchmarkingResult, build_benchmarking_result
  from ludwig.benchmarking.profiler_callbacks import LudwigProfilerCallback
  from ludwig.benchmarking.utils import create_default_config, delete_hyperopt_outputs, delete_model_checkpoints, export_artifacts, load_from_module, populate_benchmarking_config_with_defaults, propagate_global_parameters, save_yaml, validate_benchmarking_config
  from ludwig.contrib import add_contrib_callback_args
  from ludwig.hyperopt.run import hyperopt
  from ludwig.utils.data_utils import load_yaml
label_desc: Use image node_id 3 for calling a global function with example usage: benchmark(benchmarking_config) and returns: experiment_artifacts