class_docstr: Runner of Bayesian optimization loop. This class wraps the optimization loop around the different handlers.
  :param model: GPyOpt model class.
  :param space: GPyOpt space class.
  :param objective: GPyOpt objective class.
  :param acquisition: GPyOpt acquisition class.
  :param evaluator: GPyOpt evaluator class.
  :param X_init: 2d numpy array containing the initial inputs (one per row) of the model.
  :param Y_init: 2d numpy array containing the initial outputs (one per row) of the model.
  :param cost: GPyOpt cost class (default, none).
  :param normalize_Y: whether to normalize the outputs before performing any optimization (default, True).
  :param model_update_interval: interval of collected observations after which the model is updated (default, 1).
  :param de_duplication: GPyOpt DuplicateManager class. Avoids re-evaluating the objective at previous, pending or infeasible locations (default, False).
docstr: Saves model parameters at each iteration of the optimization
  
  :param models_file: name of the file or a file buffer, in which the results are saved.
docstr_tok: ["Saves","model","parameters","at","each","iteration","of","the","optimization",":","param","models_file",":","name","of","the","file","or","a","file","buffer",",","in","which","the","results","are","saved","."]
code: def save_models(self, models_file):
      """
      Saves model parameters at each iteration of the optimization
  
      :param models_file: name of the file or a file buffer, in which the results are saved.
      """
      if self.model_parameters_iterations is None:
          raise ValueError(
              "No iterations have been carried out yet and hence no iterations of the BO can be saved"
          )
  
      iterations = np.array(
          range(1, self.model_parameters_iterations.shape[0] + 1)
      )[:, None]
      results = np.hstack(
          (iterations, self.model_parameters_iterations)
      )
      header = ["Iteration"] + self.model.get_model_parameters_names()
  
      data = [header] + results.tolist()
      self._write_csv(models_file, data)
  
imports: import GPyOpt
  import collections
  import numpy
  import time
  import csv
  import logging
  from ..util.general import best_value, normalize
  from ..util.duplicate_manager import DuplicateManager
  from ..core.errors import InvalidConfigError
  from ..core.task.cost import CostModel
  from ..optimization.acquisition_optimizer import ContextManager
label_desc: Use image node_id 17 for calling the BO obj's underlying member method code with example usage: obj.save_models(models_file) without return types