pub struct ModelConfig {Show 21 fields
pub name: String,
pub platform: String,
pub backend: String,
pub version_policy: Option<ModelVersionPolicy>,
pub max_batch_size: i32,
pub input: Vec<ModelInput>,
pub output: Vec<ModelOutput>,
pub batch_input: Vec<BatchInput>,
pub batch_output: Vec<BatchOutput>,
pub optimization: Option<ModelOptimizationPolicy>,
pub instance_group: Vec<ModelInstanceGroup>,
pub default_model_filename: String,
pub cc_model_filenames: HashMap<String, String>,
pub metric_tags: HashMap<String, String>,
pub parameters: HashMap<String, ModelParameter>,
pub model_warmup: Vec<ModelWarmup>,
pub model_operations: Option<ModelOperations>,
pub model_transaction_policy: Option<ModelTransactionPolicy>,
pub model_repository_agents: Option<ModelRepositoryAgents>,
pub response_cache: Option<ModelResponseCache>,
pub scheduling_choice: Option<SchedulingChoice>,
}
Expand description
@@ @@.. cpp:var:: message ModelConfig @@ @@ A model configuration. @@
Fields§
§name: String
@@ .. cpp:var:: string name @@ @@ The name of the model. @@
platform: String
@@ .. cpp:var:: string platform @@ @@ The framework for the model. Possible values are @@ “tensorrt_plan”, “tensorflow_graphdef”, @@ “tensorflow_savedmodel”, “onnxruntime_onnx”, @@ “pytorch_libtorch”. @@
backend: String
@@ .. cpp:var:: string backend @@ @@ The backend used by the model. @@
version_policy: Option<ModelVersionPolicy>
@@ .. cpp:var:: ModelVersionPolicy version_policy @@ @@ Policy indicating which version(s) of the model will be served. @@
max_batch_size: i32
@@ .. cpp:var:: int32 max_batch_size @@ @@ Maximum batch size allowed for inference. This can only decrease @@ what is allowed by the model itself. A max_batch_size value of 0 @@ indicates that batching is not allowed for the model and the @@ dimension/shape of the input and output tensors must exactly @@ match what is specified in the input and output configuration. A @@ max_batch_size value > 0 indicates that batching is allowed and @@ so the model expects the input tensors to have an additional @@ initial dimension for the batching that is not specified in the @@ input (for example, if the model supports batched inputs of @@ 2-dimensional tensors then the model configuration will specify @@ the input shape as [ X, Y ] but the model will expect the actual @@ input tensors to have shape [ N, X, Y ]). For max_batch_size > 0 @@ returned outputs will also have an additional initial dimension @@ for the batch. @@
input: Vec<ModelInput>
@@ .. cpp:var:: ModelInput input (repeated) @@ @@ The inputs request by the model. @@
output: Vec<ModelOutput>
@@ .. cpp:var:: ModelOutput output (repeated) @@ @@ The outputs produced by the model. @@
batch_input: Vec<BatchInput>
@@ .. cpp:var:: BatchInput batch_input (repeated) @@ @@ The model input(s) that the server should use to communicate @@ batch related values to the model. @@
batch_output: Vec<BatchOutput>
@@ .. cpp:var:: BatchOutput batch_output (repeated) @@ @@ The outputs produced by the model that requires special handling @@ by the model backend. @@
optimization: Option<ModelOptimizationPolicy>
@@ .. cpp:var:: ModelOptimizationPolicy optimization @@ @@ Optimization configuration for the model. If not specified @@ then default optimization policy is used. @@
instance_group: Vec<ModelInstanceGroup>
@@ .. cpp:var:: ModelInstanceGroup instance_group (repeated) @@ @@ Instances of this model. If not specified, one instance @@ of the model will be instantiated on each available GPU. @@
default_model_filename: String
@@ .. cpp:var:: string default_model_filename
@@
@@ Optional filename of the model file to use if a
@@ compute-capability specific model is not specified in
@@ :cpp:var:cc_model_filenames
. If not specified the default name
@@ is ‘model.graphdef’, ‘model.savedmodel’, ‘model.plan’ or
@@ ‘model.pt’ depending on the model type.
@@
cc_model_filenames: HashMap<String, String>
@@ .. cpp:var:: map<string,string> cc_model_filenames @@ @@ Optional map from CUDA compute capability to the filename of @@ the model that supports that compute capability. The filename @@ refers to a file within the model version directory. @@
@@ .. cpp:var:: map<string,string> metric_tags @@ @@ Optional metric tags. User-specific key-value pairs for metrics @@ reported for this model. These tags are applied to the metrics @@ reported on the HTTP metrics port. @@
parameters: HashMap<String, ModelParameter>
@@ .. cpp:var:: map<string,ModelParameter> parameters @@ @@ Optional model parameters. User-specified parameter values. @@
model_warmup: Vec<ModelWarmup>
@@ .. cpp:var:: ModelWarmup model_warmup (repeated) @@ @@ Warmup setting of this model. If specified, all instances @@ will be run with the request samples in sequence before @@ serving the model. @@ This field can only be specified if the model is not an ensemble @@ model. @@
model_operations: Option<ModelOperations>
@@ .. cpp:var:: ModelOperations model_operations @@ @@ Optional metadata of the libraries providing custom operations for @@ this model. @@
model_transaction_policy: Option<ModelTransactionPolicy>
@@ .. cpp:var:: ModelTransactionPolicy model_transaction_policy @@ @@ Optional specification that describes the nature of transactions @@ to be expected from the model. @@
model_repository_agents: Option<ModelRepositoryAgents>
@@ .. cpp:var:: ModelRepositoryAgents model_repository_agents @@ @@ Optional specification of the agent(s) that should be invoked @@ with repository actions are performed for this model. @@
response_cache: Option<ModelResponseCache>
@@ .. cpp:var:: ModelResponseCache response_cache @@ @@ Optional setting for utilizing the response cache for this @@ model. @@
scheduling_choice: Option<SchedulingChoice>
@@ .. cpp:var:: oneof scheduling_choice @@ @@ The scheduling policy for the model. If not specified the @@ default scheduling policy is used for the model. The default @@ policy is to execute each inference request independently. @@
Trait Implementations§
Source§impl Clone for ModelConfig
impl Clone for ModelConfig
Source§fn clone(&self) -> ModelConfig
fn clone(&self) -> ModelConfig
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Debug for ModelConfig
impl Debug for ModelConfig
Source§impl Default for ModelConfig
impl Default for ModelConfig
Source§impl Message for ModelConfig
impl Message for ModelConfig
Source§fn encoded_len(&self) -> usize
fn encoded_len(&self) -> usize
Source§fn encode<B>(&self, buf: &mut B) -> Result<(), EncodeError>
fn encode<B>(&self, buf: &mut B) -> Result<(), EncodeError>
Source§fn encode_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
fn encode_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
Source§fn encode_length_delimited<B>(&self, buf: &mut B) -> Result<(), EncodeError>
fn encode_length_delimited<B>(&self, buf: &mut B) -> Result<(), EncodeError>
Source§fn encode_length_delimited_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
fn encode_length_delimited_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
Source§fn decode<B>(buf: B) -> Result<Self, DecodeError>
fn decode<B>(buf: B) -> Result<Self, DecodeError>
Source§fn decode_length_delimited<B>(buf: B) -> Result<Self, DecodeError>
fn decode_length_delimited<B>(buf: B) -> Result<Self, DecodeError>
Source§fn merge<B>(&mut self, buf: B) -> Result<(), DecodeError>
fn merge<B>(&mut self, buf: B) -> Result<(), DecodeError>
self
. Read moreSource§fn merge_length_delimited<B>(&mut self, buf: B) -> Result<(), DecodeError>
fn merge_length_delimited<B>(&mut self, buf: B) -> Result<(), DecodeError>
self
.Source§impl PartialEq for ModelConfig
impl PartialEq for ModelConfig
impl StructuralPartialEq for ModelConfig
Auto Trait Implementations§
impl Freeze for ModelConfig
impl RefUnwindSafe for ModelConfig
impl Send for ModelConfig
impl Sync for ModelConfig
impl Unpin for ModelConfig
impl UnwindSafe for ModelConfig
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T
in a tonic::Request