Class ModelServerConfigOuterClass.ModelConfig

java.lang.Object
com.google.protobuf.AbstractMessageLite
com.google.protobuf.AbstractMessage
com.google.protobuf.GeneratedMessageV3
tensorflow.serving.ModelServerConfigOuterClass.ModelConfig
All Implemented Interfaces:
com.google.protobuf.Message, com.google.protobuf.MessageLite, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, Serializable, ModelServerConfigOuterClass.ModelConfigOrBuilder
Enclosing class:
ModelServerConfigOuterClass

public static final class ModelServerConfigOuterClass.ModelConfig extends com.google.protobuf.GeneratedMessageV3 implements ModelServerConfigOuterClass.ModelConfigOrBuilder
 Common configuration for loading a model being served.
 
Protobuf type tensorflow.serving.ModelConfig
See Also:
  • Field Details

    • NAME_FIELD_NUMBER

      public static final int NAME_FIELD_NUMBER
      See Also:
    • BASE_PATH_FIELD_NUMBER

      public static final int BASE_PATH_FIELD_NUMBER
      See Also:
    • MODEL_TYPE_FIELD_NUMBER

      public static final int MODEL_TYPE_FIELD_NUMBER
      See Also:
    • MODEL_PLATFORM_FIELD_NUMBER

      public static final int MODEL_PLATFORM_FIELD_NUMBER
      See Also:
    • MODEL_VERSION_POLICY_FIELD_NUMBER

      public static final int MODEL_VERSION_POLICY_FIELD_NUMBER
      See Also:
    • VERSION_LABELS_FIELD_NUMBER

      public static final int VERSION_LABELS_FIELD_NUMBER
      See Also:
    • LOGGING_CONFIG_FIELD_NUMBER

      public static final int LOGGING_CONFIG_FIELD_NUMBER
      See Also:
  • Method Details

    • newInstance

      protected Object newInstance(com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter unused)
      Overrides:
      newInstance in class com.google.protobuf.GeneratedMessageV3
    • getDescriptor

      public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
    • internalGetMapFieldReflection

      protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection(int number)
      Overrides:
      internalGetMapFieldReflection in class com.google.protobuf.GeneratedMessageV3
    • internalGetFieldAccessorTable

      protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
      Specified by:
      internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessageV3
    • getName

      public String getName()
       Name of the model.
       
      string name = 1;
      Specified by:
      getName in interface ModelServerConfigOuterClass.ModelConfigOrBuilder
      Returns:
      The name.
    • getNameBytes

      public com.google.protobuf.ByteString getNameBytes()
       Name of the model.
       
      string name = 1;
      Specified by:
      getNameBytes in interface ModelServerConfigOuterClass.ModelConfigOrBuilder
      Returns:
      The bytes for name.
    • getBasePath

      public String getBasePath()
       Base path to the model, excluding the version directory.
       E.g> for a model at /foo/bar/my_model/123, where 123 is the version, the
       base path is /foo/bar/my_model.
      
       (This can be changed once a model is in serving, *if* the underlying data
       remains the same. Otherwise there are no guarantees about whether the old
       or new data will be used for model versions currently loaded.)
       
      string base_path = 2;
      Specified by:
      getBasePath in interface ModelServerConfigOuterClass.ModelConfigOrBuilder
      Returns:
      The basePath.
    • getBasePathBytes

      public com.google.protobuf.ByteString getBasePathBytes()
       Base path to the model, excluding the version directory.
       E.g> for a model at /foo/bar/my_model/123, where 123 is the version, the
       base path is /foo/bar/my_model.
      
       (This can be changed once a model is in serving, *if* the underlying data
       remains the same. Otherwise there are no guarantees about whether the old
       or new data will be used for model versions currently loaded.)
       
      string base_path = 2;
      Specified by:
      getBasePathBytes in interface ModelServerConfigOuterClass.ModelConfigOrBuilder
      Returns:
      The bytes for basePath.
    • getModelTypeValue

      @Deprecated public int getModelTypeValue()
      Deprecated.
      tensorflow.serving.ModelConfig.model_type is deprecated. See tensorflow_serving/config/model_server_config.proto;l=50
       Type of model.
       TODO(b/31336131): DEPRECATED. Please use 'model_platform' instead.
       
      .tensorflow.serving.ModelType model_type = 3 [deprecated = true];
      Specified by:
      getModelTypeValue in interface ModelServerConfigOuterClass.ModelConfigOrBuilder
      Returns:
      The enum numeric value on the wire for modelType.
    • getModelType

      Deprecated.
      tensorflow.serving.ModelConfig.model_type is deprecated. See tensorflow_serving/config/model_server_config.proto;l=50
       Type of model.
       TODO(b/31336131): DEPRECATED. Please use 'model_platform' instead.
       
      .tensorflow.serving.ModelType model_type = 3 [deprecated = true];
      Specified by:
      getModelType in interface ModelServerConfigOuterClass.ModelConfigOrBuilder
      Returns:
      The modelType.
    • getModelPlatform

      public String getModelPlatform()
       Type of model (e.g. "tensorflow").
      
       (This cannot be changed once a model is in serving.)
       
      string model_platform = 4;
      Specified by:
      getModelPlatform in interface ModelServerConfigOuterClass.ModelConfigOrBuilder
      Returns:
      The modelPlatform.
    • getModelPlatformBytes

      public com.google.protobuf.ByteString getModelPlatformBytes()
       Type of model (e.g. "tensorflow").
      
       (This cannot be changed once a model is in serving.)
       
      string model_platform = 4;
      Specified by:
      getModelPlatformBytes in interface ModelServerConfigOuterClass.ModelConfigOrBuilder
      Returns:
      The bytes for modelPlatform.
    • hasModelVersionPolicy

      public boolean hasModelVersionPolicy()
       Version policy for the model indicating which version(s) of the model to
       load and make available for serving simultaneously.
       The default option is to serve only the latest version of the model.
      
       (This can be changed once a model is in serving.)
       
      .tensorflow.serving.FileSystemStoragePathSourceConfig.ServableVersionPolicy model_version_policy = 7;
      Specified by:
      hasModelVersionPolicy in interface ModelServerConfigOuterClass.ModelConfigOrBuilder
      Returns:
      Whether the modelVersionPolicy field is set.
    • getModelVersionPolicy

       Version policy for the model indicating which version(s) of the model to
       load and make available for serving simultaneously.
       The default option is to serve only the latest version of the model.
      
       (This can be changed once a model is in serving.)
       
      .tensorflow.serving.FileSystemStoragePathSourceConfig.ServableVersionPolicy model_version_policy = 7;
      Specified by:
      getModelVersionPolicy in interface ModelServerConfigOuterClass.ModelConfigOrBuilder
      Returns:
      The modelVersionPolicy.
    • getModelVersionPolicyOrBuilder

       Version policy for the model indicating which version(s) of the model to
       load and make available for serving simultaneously.
       The default option is to serve only the latest version of the model.
      
       (This can be changed once a model is in serving.)
       
      .tensorflow.serving.FileSystemStoragePathSourceConfig.ServableVersionPolicy model_version_policy = 7;
      Specified by:
      getModelVersionPolicyOrBuilder in interface ModelServerConfigOuterClass.ModelConfigOrBuilder
    • getVersionLabelsCount

      public int getVersionLabelsCount()
      Description copied from interface: ModelServerConfigOuterClass.ModelConfigOrBuilder
       String labels to associate with versions of the model, allowing inference
       queries to refer to versions by label instead of number. Multiple labels
       can map to the same version, but not vice-versa.
      
       An envisioned use-case for these labels is canarying tentative versions.
       For example, one can assign labels "stable" and "canary" to two specific
       versions. Perhaps initially "stable" is assigned to version 0 and "canary"
       to version 1. Once version 1 passes canary, one can shift the "stable"
       label to refer to version 1 (at that point both labels map to the same
       version -- version 1 -- which is fine). Later once version 2 is ready to
       canary one can move the "canary" label to version 2. And so on.
       
      map<string, int64> version_labels = 8;
      Specified by:
      getVersionLabelsCount in interface ModelServerConfigOuterClass.ModelConfigOrBuilder
    • containsVersionLabels

      public boolean containsVersionLabels(String key)
       String labels to associate with versions of the model, allowing inference
       queries to refer to versions by label instead of number. Multiple labels
       can map to the same version, but not vice-versa.
      
       An envisioned use-case for these labels is canarying tentative versions.
       For example, one can assign labels "stable" and "canary" to two specific
       versions. Perhaps initially "stable" is assigned to version 0 and "canary"
       to version 1. Once version 1 passes canary, one can shift the "stable"
       label to refer to version 1 (at that point both labels map to the same
       version -- version 1 -- which is fine). Later once version 2 is ready to
       canary one can move the "canary" label to version 2. And so on.
       
      map<string, int64> version_labels = 8;
      Specified by:
      containsVersionLabels in interface ModelServerConfigOuterClass.ModelConfigOrBuilder
    • getVersionLabels

      @Deprecated public Map<String,Long> getVersionLabels()
      Deprecated.
      Specified by:
      getVersionLabels in interface ModelServerConfigOuterClass.ModelConfigOrBuilder
    • getVersionLabelsMap

      public Map<String,Long> getVersionLabelsMap()
       String labels to associate with versions of the model, allowing inference
       queries to refer to versions by label instead of number. Multiple labels
       can map to the same version, but not vice-versa.
      
       An envisioned use-case for these labels is canarying tentative versions.
       For example, one can assign labels "stable" and "canary" to two specific
       versions. Perhaps initially "stable" is assigned to version 0 and "canary"
       to version 1. Once version 1 passes canary, one can shift the "stable"
       label to refer to version 1 (at that point both labels map to the same
       version -- version 1 -- which is fine). Later once version 2 is ready to
       canary one can move the "canary" label to version 2. And so on.
       
      map<string, int64> version_labels = 8;
      Specified by:
      getVersionLabelsMap in interface ModelServerConfigOuterClass.ModelConfigOrBuilder
    • getVersionLabelsOrDefault

      public long getVersionLabelsOrDefault(String key, long defaultValue)
       String labels to associate with versions of the model, allowing inference
       queries to refer to versions by label instead of number. Multiple labels
       can map to the same version, but not vice-versa.
      
       An envisioned use-case for these labels is canarying tentative versions.
       For example, one can assign labels "stable" and "canary" to two specific
       versions. Perhaps initially "stable" is assigned to version 0 and "canary"
       to version 1. Once version 1 passes canary, one can shift the "stable"
       label to refer to version 1 (at that point both labels map to the same
       version -- version 1 -- which is fine). Later once version 2 is ready to
       canary one can move the "canary" label to version 2. And so on.
       
      map<string, int64> version_labels = 8;
      Specified by:
      getVersionLabelsOrDefault in interface ModelServerConfigOuterClass.ModelConfigOrBuilder
    • getVersionLabelsOrThrow

      public long getVersionLabelsOrThrow(String key)
       String labels to associate with versions of the model, allowing inference
       queries to refer to versions by label instead of number. Multiple labels
       can map to the same version, but not vice-versa.
      
       An envisioned use-case for these labels is canarying tentative versions.
       For example, one can assign labels "stable" and "canary" to two specific
       versions. Perhaps initially "stable" is assigned to version 0 and "canary"
       to version 1. Once version 1 passes canary, one can shift the "stable"
       label to refer to version 1 (at that point both labels map to the same
       version -- version 1 -- which is fine). Later once version 2 is ready to
       canary one can move the "canary" label to version 2. And so on.
       
      map<string, int64> version_labels = 8;
      Specified by:
      getVersionLabelsOrThrow in interface ModelServerConfigOuterClass.ModelConfigOrBuilder
    • hasLoggingConfig

      public boolean hasLoggingConfig()
       Configures logging requests and responses, to the model.
      
       (This can be changed once a model is in serving.)
       
      .tensorflow.serving.LoggingConfig logging_config = 6;
      Specified by:
      hasLoggingConfig in interface ModelServerConfigOuterClass.ModelConfigOrBuilder
      Returns:
      Whether the loggingConfig field is set.
    • getLoggingConfig

      public LoggingConfigOuterClass.LoggingConfig getLoggingConfig()
       Configures logging requests and responses, to the model.
      
       (This can be changed once a model is in serving.)
       
      .tensorflow.serving.LoggingConfig logging_config = 6;
      Specified by:
      getLoggingConfig in interface ModelServerConfigOuterClass.ModelConfigOrBuilder
      Returns:
      The loggingConfig.
    • getLoggingConfigOrBuilder

      public LoggingConfigOuterClass.LoggingConfigOrBuilder getLoggingConfigOrBuilder()
       Configures logging requests and responses, to the model.
      
       (This can be changed once a model is in serving.)
       
      .tensorflow.serving.LoggingConfig logging_config = 6;
      Specified by:
      getLoggingConfigOrBuilder in interface ModelServerConfigOuterClass.ModelConfigOrBuilder
    • isInitialized

      public final boolean isInitialized()
      Specified by:
      isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
      Overrides:
      isInitialized in class com.google.protobuf.GeneratedMessageV3
    • writeTo

      public void writeTo(com.google.protobuf.CodedOutputStream output) throws IOException
      Specified by:
      writeTo in interface com.google.protobuf.MessageLite
      Overrides:
      writeTo in class com.google.protobuf.GeneratedMessageV3
      Throws:
      IOException
    • getSerializedSize

      public int getSerializedSize()
      Specified by:
      getSerializedSize in interface com.google.protobuf.MessageLite
      Overrides:
      getSerializedSize in class com.google.protobuf.GeneratedMessageV3
    • equals

      public boolean equals(Object obj)
      Specified by:
      equals in interface com.google.protobuf.Message
      Overrides:
      equals in class com.google.protobuf.AbstractMessage
    • hashCode

      public int hashCode()
      Specified by:
      hashCode in interface com.google.protobuf.Message
      Overrides:
      hashCode in class com.google.protobuf.AbstractMessage
    • parseFrom

      public static ModelServerConfigOuterClass.ModelConfig parseFrom(ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static ModelServerConfigOuterClass.ModelConfig parseFrom(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static ModelServerConfigOuterClass.ModelConfig parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static ModelServerConfigOuterClass.ModelConfig parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static ModelServerConfigOuterClass.ModelConfig parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static ModelServerConfigOuterClass.ModelConfig parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static ModelServerConfigOuterClass.ModelConfig parseFrom(InputStream input) throws IOException
      Throws:
      IOException
    • parseFrom

      public static ModelServerConfigOuterClass.ModelConfig parseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      Throws:
      IOException
    • parseDelimitedFrom

      public static ModelServerConfigOuterClass.ModelConfig parseDelimitedFrom(InputStream input) throws IOException
      Throws:
      IOException
    • parseDelimitedFrom

      public static ModelServerConfigOuterClass.ModelConfig parseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      Throws:
      IOException
    • parseFrom

      public static ModelServerConfigOuterClass.ModelConfig parseFrom(com.google.protobuf.CodedInputStream input) throws IOException
      Throws:
      IOException
    • parseFrom

      public static ModelServerConfigOuterClass.ModelConfig parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      Throws:
      IOException
    • newBuilderForType

      Specified by:
      newBuilderForType in interface com.google.protobuf.Message
      Specified by:
      newBuilderForType in interface com.google.protobuf.MessageLite
    • newBuilder

    • newBuilder

    • toBuilder

      Specified by:
      toBuilder in interface com.google.protobuf.Message
      Specified by:
      toBuilder in interface com.google.protobuf.MessageLite
    • newBuilderForType

      protected ModelServerConfigOuterClass.ModelConfig.Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)
      Specified by:
      newBuilderForType in class com.google.protobuf.GeneratedMessageV3
    • getDefaultInstance

      public static ModelServerConfigOuterClass.ModelConfig getDefaultInstance()
    • parser

      public static com.google.protobuf.Parser<ModelServerConfigOuterClass.ModelConfig> parser()
    • getParserForType

      public com.google.protobuf.Parser<ModelServerConfigOuterClass.ModelConfig> getParserForType()
      Specified by:
      getParserForType in interface com.google.protobuf.Message
      Specified by:
      getParserForType in interface com.google.protobuf.MessageLite
      Overrides:
      getParserForType in class com.google.protobuf.GeneratedMessageV3
    • getDefaultInstanceForType

      public ModelServerConfigOuterClass.ModelConfig getDefaultInstanceForType()
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuilder
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilder