code: def simple_evaluate(
      model,
      model_args=None,
      tasks=[],
      num_fewshot=0,
      batch_size=None,
      device=None,
      no_cache=False,
      limit=None,
      bootstrap_iters=100000,
      description_dict=None,
      check_integrity=False,
      decontamination_ngrams_path=None,
      verbose=False,
  ):
      """Instantiate and evaluate a model on a list of tasks.
  
      :param model: Union[str, LM]
          Name of model or LM object, see lm_eval.models.get_model
      :param model_args: Optional[str]
          String arguments for each model class, see LM.create_from_arg_string.
          Ignored if `model` argument is a LM object.
      :param tasks: list[Union[str, Task]]
          List of task names or Task objects. Task objects will be taken to have name task.EVAL_HARNESS_NAME if defined and type(task).__name__ otherwise.
      :param num_fewshot: int or list of int
          Number of examples in few-shot context
      :param batch_size: int, optional
          Batch size for model
      :param device: str, optional
          PyTorch device (e.g. "cpu" or "cuda:0") for running models
      :param no_cache: bool
          Whether or not to cache
      :param limit: int or list of int, optional
          Limit the number of examples per task (only use this for testing)
      :param bootstrap_iters:
          Number of iterations for bootstrap statistics
      :param description_dict: dict[str, str]
          Dictionary of custom task descriptions of the form: `task_name: description`
      :param check_integrity: bool
          Whether to run the relevant part of the test suite for the tasks
      :return
          Dictionary of results
      """
      random.seed(1234)
      np.random.seed(1234)
  
      assert tasks != [], "No tasks specified"
  
      if isinstance(model, str):
          if model_args is None:
              model_args = ""
          lm = lm_eval.models.get_model(model).create_from_arg_string(
              model_args, {"batch_size": batch_size, "device": device}
          )
      else:
          assert isinstance(model, lm_eval.base.LM)
          lm = model
  
      if not no_cache:
          lm = lm_eval.base.CachingLM(
              lm,
              "lm_cache/"
              + model
              + "_"
              + model_args.replace("=", "-")
              .replace(",", "_")
              .replace("/", "-")
              + ".db",
          )
  
      task_dict = lm_eval.tasks.get_task_dict(tasks)
  
      if check_integrity:
          run_task_tests(task_list=tasks)
  
      results = evaluate(
          lm=lm,
          task_dict=task_dict,
          num_fewshot=num_fewshot,
          limit=limit,
          bootstrap_iters=bootstrap_iters,
          description_dict=description_dict,
          decontamination_ngrams_path=decontamination_ngrams_path,
          verbose=verbose,
      )
  
      # add info about the model and few shot config
      results["config"] = {
          "model": model,
          "model_args": model_args,
          "num_fewshot": num_fewshot,
          "batch_size": batch_size,
          "device": device,
          "no_cache": no_cache,
          "limit": limit,
          "bootstrap_iters": bootstrap_iters,
          "description_dict": description_dict,
      }
  
      return results
  
file_path: lm-evaluation-harness/lm_eval/evaluator.py
imports: import collections
  import itertools
  import numpy
  import random
  import lm_eval.metrics
  import lm_eval.models
  import lm_eval.tasks
  import lm_eval.base
  from lm_eval.utils import positional_deprecated, run_task_tests
label_desc: Use image node_id 1 for calling a global function with example usage: simple_evaluate(model, model_args, tasks, num_fewshot, batch_size, device, no_cache, limit, bootstrap_iters, description_dict, check_integrity, decontamination_ngrams_path, verbose) and returns: results