Record Class ModelMetadata

java.lang.Object
java.lang.Record
smile.onnx.ModelMetadata
Record Components:
producerName - the tool or framework that produced the model.
graphName - the name of the main computation graph.
graphDescription - a human-readable description of the graph.
domain - the model domain (e.g. "ai.onnx").
description - a human-readable description of the model.
version - the model version integer.
customMetadata - a map of user-defined string key-value pairs stored in the model.

public record ModelMetadata(String producerName, String graphName, String graphDescription, String domain, String description, long version, Map<String,String> customMetadata) extends Record
Metadata associated with an ONNX model. This includes producer information, graph description, domain, version, and any user-defined custom metadata key-value pairs embedded in the model.
  • Constructor Details

    • ModelMetadata

      public ModelMetadata(String producerName, String graphName, String graphDescription, String domain, String description, long version, Map<String,String> customMetadata)
      Creates an instance of a ModelMetadata record class.
      Parameters:
      producerName - the value for the producerName record component
      graphName - the value for the graphName record component
      graphDescription - the value for the graphDescription record component
      domain - the value for the domain record component
      description - the value for the description record component
      version - the value for the version record component
      customMetadata - the value for the customMetadata record component
  • Method Details

    • toString

      public String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared with Objects::equals(Object,Object); primitive components are compared with the compare method from their corresponding wrapper classes.
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • producerName

      public String producerName()
      Returns the value of the producerName record component.
      Returns:
      the value of the producerName record component
    • graphName

      public String graphName()
      Returns the value of the graphName record component.
      Returns:
      the value of the graphName record component
    • graphDescription

      public String graphDescription()
      Returns the value of the graphDescription record component.
      Returns:
      the value of the graphDescription record component
    • domain

      public String domain()
      Returns the value of the domain record component.
      Returns:
      the value of the domain record component
    • description

      public String description()
      Returns the value of the description record component.
      Returns:
      the value of the description record component
    • version

      public long version()
      Returns the value of the version record component.
      Returns:
      the value of the version record component
    • customMetadata

      public Map<String,String> customMetadata()
      Returns the value of the customMetadata record component.
      Returns:
      the value of the customMetadata record component