class_docstr: Trains a model using a graph schema.
class_docstr_tok: ["Trains","a","model","using","a","graph","schema","."]
docstr: Initializes a `GraphTrainer`.
  
  Args:
      model_storage: Storage which graph components can use to persist and load.
          Also used for packaging the trained model.
      cache: Cache used to store fingerprints and outputs.
      graph_runner_class: The class to instantiate the runner from.
docstr_tok: ["Initializes","a","`","GraphTrainer","`",".","Args",":","model_storage",":","Storage","which","graph","components","can","use","to","persist","and","load",".","Also","used","for","packaging","the","trained","model",".","cache",":","Cache","used","to","store","fingerprints","and","outputs",".","graph_runner_class",":","The","class","to","instantiate","the","runner","from","."]
code: def __init__(
      self,
      model_storage: ModelStorage,
      cache: TrainingCache,
      graph_runner_class: Type[GraphRunner],
  ) -> None:
      """Initializes a `GraphTrainer`.
  
      Args:
          model_storage: Storage which graph components can use to persist and load.
              Also used for packaging the trained model.
          cache: Cache used to store fingerprints and outputs.
          graph_runner_class: The class to instantiate the runner from.
      """
      self._model_storage = model_storage
      self._cache = cache
      self._graph_runner_class = graph_runner_class
  
file_path: rasa/rasa/engine/training/graph_trainer.py
imports: import copy
  import logging
  from pathlib import Path
  from typing import Any, Dict, Text, Type, Union
  from rasa.engine.caching import TrainingCache
  from rasa.engine.graph import ExecutionContext, GraphSchema, GraphModelConfiguration
  from rasa.engine.constants import PLACEHOLDER_IMPORTER
  from rasa.engine.runner.interface import GraphRunner
  from rasa.engine.storage.storage import ModelStorage, ModelMetadata
  from rasa.engine.training.components import PrecomputedValueProvider, FingerprintComponent, FingerprintStatus
  from rasa.engine.training.hooks import TrainingHook, LoggingHook
  from rasa.shared.importers.importer import TrainingDataImporter
label_desc: Use image node_id 1 to create a new GraphTrainer object  with example: obj = GraphTrainer(model_storage, cache, graph_runner_class)