class_docstr: Trains Keras models.
class_docstr_tok: ["Trains","Keras","models","."]
docstr: Initializes a KerasTrainerPhase.
  
  Args:
    models: A list of `tf.keras.Model` instances or a list of callables that
      return `tf.keras.Model` instances.
    storage: A `Storage` instance.
docstr_tok: ["Initializes","a","KerasTrainerPhase",".","Args",":","models",":","A","list","of","`","tf.keras.Model","`","instances","or","a","list","of","callables","that","return","`","tf.keras.Model","`","instances",".","storage",":","A","`","Storage","`","instance","."]
code: def __init__(
      self,
      models: Union[
          Iterable[tf.keras.Model],
          Callable[[], Iterable[tf.keras.Model]],
      ],
      storage: Storage = InMemoryStorage(),
  ):
      """Initializes a KerasTrainerPhase.
  
      Args:
        models: A list of `tf.keras.Model` instances or a list of callables that
          return `tf.keras.Model` instances.
        storage: A `Storage` instance.
      """
      # TODO: Consume arbitary fit inputs.
      # Dataset should be wrapped inside a work unit.
      # For instance when you create KerasTrainer work unit the dataset is
      # encapsulated inside that work unit.
      # What if you want to run on different (parts of the) datasets
      # what if a work units consumes numpy arrays?
      super().__init__(storage)
      self._models = models
  
file_path: adanet/adanet/experimental/phases/keras_trainer_phase.py
imports: from typing import Callable, Iterable, Iterator, Union
  from adanet.experimental.phases.phase import DatasetProvider
  from adanet.experimental.phases.phase import ModelProvider
  from adanet.experimental.storages.in_memory_storage import InMemoryStorage
  from adanet.experimental.storages.storage import Storage
  from adanet.experimental.work_units.keras_trainer_work_unit import KerasTrainerWorkUnit
  from adanet.experimental.work_units.work_unit import WorkUnit
  import tensorflow.compat.v2
label_desc: Use image node_id 1 to create a new KerasTrainerPhase object from inherited base classes: DatasetProvider, ModelProvider with example: obj = KerasTrainerPhase(models, storage)