class_docstr: A :py:class:`~ray.train.Checkpoint` with TensorFlow-specific functionality.
docstr: Create a :py:class:`~ray.train.Checkpoint` that stores a Keras
  model from H5 format.
  
  The checkpoint generated by this method contains all the information needed.
  Thus no `model` is needed to be supplied when using this checkpoint.
  
  Args:
      file_path: The path to the .h5 file to load model from. This is the
          same path that is used for ``model.save(path)``.
      preprocessor: A fitted preprocessor to be applied before inference.
  
  Returns:
      A :py:class:`TensorflowCheckpoint` converted from h5 format.
docstr_tok: ["Create","a",":","py",":","class",":","`","~ray.train.Checkpoint","`","that","stores","a","Keras","model","from","H5","format",".","The","checkpoint","generated","by","this","method","contains","all","the","information","needed",".","Thus","no","`","model","`","is","needed","to","be","supplied","when","using","this","checkpoint",".","Args",":","file_path",":","The","path","to","the",".h5","file","to","load","model","from",".","This","is","the","same","path","that","is","used","for","``","model.save","(","path",")","``",".","preprocessor",":","A","fitted","preprocessor","to","be","applied","before","inference",".","Returns",":","A",":","py",":","class",":","`","TensorflowCheckpoint","`","converted","from","h5","format","."]
code: def from_h5(
      cls,
      file_path: str,
      *,
      preprocessor: Optional["Preprocessor"] = None,
  ) -> "TensorflowCheckpoint":
      """Create a :py:class:`~ray.train.Checkpoint` that stores a Keras
      model from H5 format.
  
      The checkpoint generated by this method contains all the information needed.
      Thus no `model` is needed to be supplied when using this checkpoint.
  
      Args:
          file_path: The path to the .h5 file to load model from. This is the
              same path that is used for ``model.save(path)``.
          preprocessor: A fitted preprocessor to be applied before inference.
  
      Returns:
          A :py:class:`TensorflowCheckpoint` converted from h5 format.
  
      """
      if not os.path.isfile(file_path) or not file_path.endswith(".h5"):
          raise ValueError(
              "Please supply a h5 file path to `TensorflowCheckpoint.from_h5()`."
          )
      tempdir = tempfile.mkdtemp()
      filename = os.path.basename(file_path)
      new_checkpoint_file = os.path.join(tempdir, filename)
      shutil.copy(file_path, new_checkpoint_file)
  
      checkpoint = cls.from_directory(tempdir)
      if preprocessor:
          checkpoint.set_preprocessor(preprocessor)
      checkpoint.update_metadata({cls.MODEL_FILENAME_KEY: filename})
      return checkpoint
  
file_path: ray/python/ray/train/tensorflow/tensorflow_checkpoint.py
imports: import os
  import shutil
  import tempfile
  from typing import TYPE_CHECKING, Optional
  import tensorflow
  from tensorflow import keras
  from ray.train._internal.framework_checkpoint import FrameworkCheckpoint
  from ray.util.annotations import PublicAPI
label_desc: Use image node_id 2 for calling the TensorflowCheckpoint obj's underlying member method code with example usage: obj.from_h5(cls, file_path) and returns: checkpoint