class_docstr: An object that represents a single run of a generator.
  
  This object is created each time the ``gen`` method of a generator is
  called. It stores the arms and (optionally) weights that were
  generated by the run. When we add a generator run to a trial, its
  arms and weights will be merged with those from previous generator
  runs that were already attached to the trial.
class_docstr_tok: ["An","object","that","represents","a","single","run","of","a","generator",".","This","object","is","created","each","time","the","``","gen","``","method","of","a","generator","is","called",".","It","stores","the","arms","and","(","optionally",")","weights","that","were","generated","by","the","run",".","When","we","add","a","generator","run","to","a","trial",",","its","arms","and","weights","will","be","merged","with","those","from","previous","generator","runs","that","were","already","attached","to","the","trial","."]
docstr: Return a deep copy of a GeneratorRun.
docstr_tok: ["Return","a","deep","copy","of","a","GeneratorRun","."]
code: def clone(self) -> GeneratorRun:
      """Return a deep copy of a GeneratorRun."""
      cand_metadata = self.candidate_metadata_by_arm_signature
      generator_run = GeneratorRun(
          arms=[a.clone() for a in self.arms],
          weights=self.weights[:] if self.weights is not None else None,
          optimization_config=self.optimization_config.clone()
          if self.optimization_config is not None
          else None,
          search_space=self.search_space.clone()
          if self.search_space is not None
          else None,
          model_predictions=copy.deepcopy(self.model_predictions),
          best_arm_predictions=copy.deepcopy(self.best_arm_predictions),
          type=self.generator_run_type,
          fit_time=self.fit_time,
          gen_time=self.gen_time,
          model_key=self._model_key,
          model_kwargs=self._model_kwargs,
          bridge_kwargs=self._bridge_kwargs,
          gen_metadata=self._gen_metadata,
          model_state_after_gen=self._model_state_after_gen,
          generation_step_index=self._generation_step_index,
          candidate_metadata_by_arm_signature=cand_metadata,
          generation_node_name=self._generation_node_name,
      )
      generator_run._time_created = self._time_created
      generator_run._index = self._index
      generator_run._model_key = self._model_key
      generator_run._model_kwargs = (
          self._model_kwargs.copy()
          if self._model_kwargs is not None
          else None
      )
      generator_run._bridge_kwargs = (
          self._bridge_kwargs.copy()
          if self._bridge_kwargs is not None
          else None
      )
      generator_run._model_state_after_gen = (
          self._model_state_after_gen.copy()
          if self._model_state_after_gen is not None
          else None
      )
      return generator_run
  
imports: from __future__ import annotations
  import copy
  from collections import OrderedDict
  from dataclasses import dataclass
  from datetime import datetime
  from enum import Enum
  from logging import Logger
  from typing import Any, Dict, List, MutableMapping, Optional, Set, Tuple
  import pandas
  from ax.core.arm import Arm
  from ax.core.optimization_config import OptimizationConfig
  from ax.core.search_space import SearchSpace
  from ax.core.types import TCandidateMetadata, TGenMetadata, TModelPredict, TModelPredictArm
  from ax.exceptions.core import UnsupportedError
  from ax.utils.common.base import Base, SortableBase
  from ax.utils.common.logger import get_logger
  from ax.utils.common.typeutils import not_none
label_desc: Use image node_id 20 for calling the GeneratorRun obj's underlying member method code with example usage: obj.clone() and returns: generator_run