Struct ModelConfig

Source
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. @@

§metric_tags: HashMap<String, String>

@@ .. 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

Source§

fn clone(&self) -> ModelConfig

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for ModelConfig

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for ModelConfig

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl Message for ModelConfig

Source§

fn encoded_len(&self) -> usize

Returns the encoded length of the message without a length delimiter.
Source§

fn clear(&mut self)

Clears the message, resetting all fields to their default.
Source§

fn encode<B>(&self, buf: &mut B) -> Result<(), EncodeError>
where B: BufMut, Self: Sized,

Encodes the message to a buffer. Read more
Source§

fn encode_to_vec(&self) -> Vec<u8>
where Self: Sized,

Encodes the message to a newly allocated buffer.
Source§

fn encode_length_delimited<B>(&self, buf: &mut B) -> Result<(), EncodeError>
where B: BufMut, Self: Sized,

Encodes the message with a length-delimiter to a buffer. Read more
Source§

fn encode_length_delimited_to_vec(&self) -> Vec<u8>
where Self: Sized,

Encodes the message with a length-delimiter to a newly allocated buffer.
Source§

fn decode<B>(buf: B) -> Result<Self, DecodeError>
where B: Buf, Self: Default,

Decodes an instance of the message from a buffer. Read more
Source§

fn decode_length_delimited<B>(buf: B) -> Result<Self, DecodeError>
where B: Buf, Self: Default,

Decodes a length-delimited instance of the message from the buffer.
Source§

fn merge<B>(&mut self, buf: B) -> Result<(), DecodeError>
where B: Buf, Self: Sized,

Decodes an instance of the message from a buffer, and merges it into self. Read more
Source§

fn merge_length_delimited<B>(&mut self, buf: B) -> Result<(), DecodeError>
where B: Buf, Self: Sized,

Decodes a length-delimited instance of the message from buffer, and merges it into self.
Source§

impl PartialEq for ModelConfig

Source§

fn eq(&self, other: &ModelConfig) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl StructuralPartialEq for ModelConfig

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoRequest<T> for T

Source§

fn into_request(self) -> Request<T>

Wrap the input message T in a tonic::Request
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more