third_party/tflite_support/src/tensorflow_lite_support/metadata/python/metadata.py
def load_metadata_file(self, metadata_file):
    """Loads the metadata file to be populated.

    Args:
      metadata_file: path to the metadata file to be populated.

    Raises:
      IOError: File not found.
      ValueError: The metadata to be populated is empty.
      ValueError: The metadata does not have the expected flatbuffer identifer.
      ValueError: Cannot get minimum metadata parser version.
      ValueError: The number of SubgraphMetadata is not 1.
      ValueError: The number of input/output tensors does not match the number
        of input/output tensor metadata.
    """
    _assert_file_exist(metadata_file)
    with open(metadata_file, "rb") as f:
      metadata_buf = f.read()
    self.load_metadata_buffer(bytearray(metadata_buf))
Loads the metadata file to be populated.

    Args:
      metadata_file: path to the metadata file to be populated.

    Raises:
      IOError: File not found.
      ValueError: The metadata to be populated is empty.
      ValueError: The metadata does not have the expected flatbuffer identifer.
      ValueError: Cannot get minimum metadata parser version.
      ValueError: The number of SubgraphMetadata is not 1.
      ValueError: The number of input/output tensors does not match the number
        of input/output tensor metadata.
    
Loads the metadata file to be populated.
Loads the metadata file to be populated .
def load_metadata_file(self, metadata_file):
    _assert_file_exist(metadata_file)
    with open(metadata_file, "rb") as f:
      metadata_buf = f.read()
    self.load_metadata_buffer(bytearray(metadata_buf))
def load_metadata_file ( self , metadata_file ) : _assert_file_exist ( metadata_file ) with open ( metadata_file , "rb" ) as f : metadata_buf = f . read ( ) self . load_metadata_buffer ( bytearray ( metadata_buf ) )
Loads the metadata file to be populated.
Loads the metadata file to be populated .
"""Loads the metadata file to be populated.

    Args:
      metadata_file: path to the metadata file to be populated.

    Raises:
      IOError: File not found.
      ValueError: The metadata to be populated is empty.
      ValueError: The metadata does not have the expected flatbuffer identifer.
      ValueError: Cannot get minimum metadata parser version.
      ValueError: The number of SubgraphMetadata is not 1.
      ValueError: The number of input/output tensors does not match the number
        of input/output tensor metadata.
    """
File not found.
File not found .
IOError
The metadata to be populated is empty.
The metadata to be populated is empty .
ValueError
The metadata does not have the expected flatbuffer identifer.
The metadata does not have the expected flatbuffer identifer .
ValueError
Cannot get minimum metadata parser version.
Cannot get minimum metadata parser version .
ValueError
The number of SubgraphMetadata is not 1.
The number of SubgraphMetadata is not 1 .
ValueError
The number of input/output tensors does not match the number
of input/output tensor metadata.
The number of input / output tensors does not match the number of input / output tensor metadata .
ValueError
self
metadata_file
path to the metadata file to be populated.
path to the metadata file to be populated .