class_docstr: Component that checks whether fine-tuning is possible.
  
  This is a component at the beginning of the graph which receives all training data
  and raises an exception in case `is_finetuning` is `True` and finetuning is not
  possible (e.g. because new labels were added).
  In case we are doing a regular training (and not finetuning) this persists the
  necessary information extracted from the training data to be able to validate when
  initialized via load whether we can finetune.
  
  Finetuning is possible if, compared to the initial training phase, it holds that
  1. the configuration (except for "epoch" keys) does not change
  2. the domain (except for e.g. "responses") does not change - or we're not
     finetuning the core part
  3. the intents, entities, entity groups, entity roles, and action names that
     appeared in the original NLU training data, appear in the NLU training data
     used for finetuning, and no new such items (i.e. intents, entities, entity
     groups, entity roles, or action names) have been added, compared to the original
     training data - or we're not finetuning the nlu part.
  Note that even though conditions 2. and 3. differ based on which part we finetune,
  condition 1. always covers both parts, i.e. NLU and Core.
class_docstr_tok: ["Component","that","checks","whether","fine-tuning","is","possible",".","This","is","a","component","at","the","beginning","of","the","graph","which","receives","all","training","data","and","raises","an","exception","in","case","`","is_finetuning","`","is","`","True","`","and","finetuning","is","not","possible","(","e.g",".","because","new","labels","were","added",")",".","In","case","we","are","doing","a","regular","training","(","and","not","finetuning",")","this","persists","the","necessary","information","extracted","from","the","training","data","to","be","able","to","validate","when","initialized","via","load","whether","we","can","finetune",".","Finetuning","is","possible","if",",","compared","to","the","initial","training","phase",",","it","holds","that","1.","the","configuration","(","except","for","``","epoch","''","keys",")","does","not","change","2.","the","domain","(","except","for","e.g",".","``","responses","''",")","does","not","change","-","or","we","'re","not","finetuning","the","core","part","3.","the","intents",",","entities",",","entity","groups",",","entity","roles",",","and","action","names","that","appeared","in","the","original","NLU","training","data",",","appear","in","the","NLU","training","data","used","for","finetuning",",","and","no","new","such","items","(","i.e",".","intents",",","entities",",","entity","groups",",","entity","roles",",","or","action","names",")","have","been","added",",","compared","to","the","original","training","data","-","or","we","'re","not","finetuning","the","nlu","part",".","Note","that","even","though","conditions","2.","and","3.","differ","based","on","which","part","we","finetune",",","condition","1.","always","covers","both","parts",",","i.e",".","NLU","and","Core","."]
docstr: Instantiates a `FineTuningValidator`.
  
  Args:
      model_storage: Storage which graph components can use to persist and load
          themselves.
      resource: Resource locator for this component which can be used to persist
          and load itself from the `model_storage`.
      execution_context: Information about the current graph run.
      fingerprints: a dictionary of fingerprints generated by a
          `FineTuningValidator`
docstr_tok: ["Instantiates","a","`","FineTuningValidator","`",".","Args",":","model_storage",":","Storage","which","graph","components","can","use","to","persist","and","load","themselves",".","resource",":","Resource","locator","for","this","component","which","can","be","used","to","persist","and","load","itself","from","the","`","model_storage","`",".","execution_context",":","Information","about","the","current","graph","run",".","fingerprints",":","a","dictionary","of","fingerprints","generated","by","a","`","FineTuningValidator","`"]
code: def __init__(
      self,
      config: Dict[Text, Any],
      model_storage: ModelStorage,
      resource: Resource,
      execution_context: ExecutionContext,
      fingerprints: Optional[Dict[Text, Text]] = None,
  ) -> None:
      """Instantiates a `FineTuningValidator`.
  
      Args:
          model_storage: Storage which graph components can use to persist and load
              themselves.
          resource: Resource locator for this component which can be used to persist
              and load itself from the `model_storage`.
          execution_context: Information about the current graph run.
          fingerprints: a dictionary of fingerprints generated by a
              `FineTuningValidator`
      """
      self._is_finetuning = execution_context.is_finetuning
      self._execution_context = execution_context
      self._model_storage = model_storage
      self._resource = resource
      self._fingerprints: Dict[Text, Text] = fingerprints or {}
  
      self._core = config["validate_core"]
      self._nlu = config["validate_nlu"]
  
imports: from __future__ import annotations
  from typing import Dict, Text, Any, Optional
  import copy
  import logging
  from packaging import version
  from rasa.constants import MINIMUM_COMPATIBLE_VERSION
  from rasa.engine.graph import GraphComponent, ExecutionContext
  from rasa.engine.storage.storage import ModelStorage
  from rasa.engine.storage.resource import Resource
  from rasa.shared.exceptions import InvalidConfigException
  from rasa.shared.core.domain import Domain
  from rasa.shared.importers.importer import TrainingDataImporter
  import rasa.shared.utils.io
  from rasa.utils.tensorflow.constants import EPOCHS
  from rasa.graph_components.providers.domain_for_core_training_provider import DomainForCoreTrainingProvider
label_desc: Use image node_id 2 to create a new FinetuningValidator object from inherited base classes: GraphComponent with example: obj = FinetuningValidator(config, model_storage, resource, execution_context, fingerprints)