Class TritonModelMetadata

java.lang.Object
com.gencior.triton.core.pojo.TritonModelMetadata

public final class TritonModelMetadata extends Object
Encapsulates metadata information about a Triton model.

This class represents model-level metadata including the model name, available versions, platform type, and the schema for input and output tensors. This information describes the expected interface for communicating with a specific model deployed on Triton.

This is an immutable object that wraps the gRPC message ModelMetadataResponse.

Typical Usage:


 TritonModelMetadata metadata = client.modelMetadata("inception_v3");
 System.out.println("Model: " + metadata.getName());
 System.out.println("Platform: " + metadata.getPlatform());
 System.out.println("Inputs: " + metadata.getInputs());
 System.out.println("Outputs: " + metadata.getOutputs());
 
Since:
1.0.0
Author:
sachachoumiloff
  • Method Details

    • fromProto

      public static TritonModelMetadata fromProto(GrpcService.ModelMetadataResponse response)
    • getName

      public String getName()
      Returns the name of the model.
      Returns:
      the model name
    • getVersions

      public List<String> getVersions()
      Returns an unmodifiable list of available model versions.

      The returned list is immutable and cannot be modified.

      Returns:
      an immutable list of version strings
    • getPlatform

      public String getPlatform()
      Returns the platform type of the model (e.g., "tensorflow_savedmodel", "tensorrt_plan").
      Returns:
      the model platform type
    • getInputs

      public List<TritonTensorMetadata> getInputs()
      Returns an unmodifiable list of input tensor metadata.

      Each element describes the expected schema of an input tensor including its name, shape, and data type.

      The returned list is immutable and cannot be modified.

      Returns:
      an immutable list of input tensor metadata
    • getOutputs

      public List<TritonTensorMetadata> getOutputs()
      Returns an unmodifiable list of output tensor metadata.

      Each element describes the schema of an output tensor including its name, shape, and data type.

      The returned list is immutable and cannot be modified.

      Returns:
      an immutable list of output tensor metadata
    • toString

      public String toString()
      Overrides:
      toString in class Object