pub struct ModelInferRequest {
pub model_name: String,
pub model_version: String,
pub id: String,
pub parameters: HashMap<String, InferParameter>,
pub inputs: Vec<InferInputTensor>,
pub outputs: Vec<InferRequestedOutputTensor>,
pub raw_input_contents: Vec<Vec<u8>>,
}
Expand description
@@ @@.. cpp:var:: message ModelInferRequest @@ @@ Request message for ModelInfer. @@
Fields§
§model_name: String
@@ .. cpp:var:: string model_name @@ @@ The name of the model to use for inferencing. @@
model_version: String
@@ .. cpp:var:: string model_version @@ @@ The version of the model to use for inference. If not @@ given the latest/most-recent version of the model is used. @@
id: String
@@ .. cpp:var:: string id @@ @@ Optional identifier for the request. If specified will be @@ returned in the response. @@
parameters: HashMap<String, InferParameter>
@@ .. cpp:var:: map<string,InferParameter> parameters @@ @@ Optional inference parameters. @@
inputs: Vec<InferInputTensor>
@@ @@ .. cpp:var:: InferInputTensor inputs (repeated) @@ @@ The input tensors for the inference. @@
outputs: Vec<InferRequestedOutputTensor>
@@ @@ .. cpp:var:: InferRequestedOutputTensor outputs (repeated) @@ @@ The requested output tensors for the inference. Optional, if not @@ specified all outputs specified in the model config will be @@ returned. @@
raw_input_contents: Vec<Vec<u8>>
@@ @@ .. cpp:var:: bytes raw_input_contents @@ @@ The data contained in an input tensor can be represented in @@ “raw” bytes form or in the repeated type that matches the @@ tensor’s data type. Using the “raw” bytes form will @@ typically allow higher performance due to the way protobuf @@ allocation and reuse interacts with GRPC. For example, see @@ https://github.com/grpc/grpc/issues/23231. @@ @@ To use the raw representation ‘raw_input_contents’ must be @@ initialized with data for each tensor in the same order as @@ ‘inputs’. For each tensor, the size of this content must @@ match what is expected by the tensor’s shape and data @@ type. The raw data must be the flattened, one-dimensional, @@ row-major order of the tensor elements without any stride @@ or padding between the elements. Note that the FP16 and BF16 data @@ types must be represented as raw content as there is no @@ specific data type for a 16-bit float type. @@ @@ If this field is specified then InferInputTensor::contents @@ must not be specified for any input tensor. @@
Trait Implementations§
Source§impl Clone for ModelInferRequest
impl Clone for ModelInferRequest
Source§fn clone(&self) -> ModelInferRequest
fn clone(&self) -> ModelInferRequest
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Debug for ModelInferRequest
impl Debug for ModelInferRequest
Source§impl Default for ModelInferRequest
impl Default for ModelInferRequest
Source§impl Message for ModelInferRequest
impl Message for ModelInferRequest
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 ModelInferRequest
impl PartialEq for ModelInferRequest
impl StructuralPartialEq for ModelInferRequest
Auto Trait Implementations§
impl Freeze for ModelInferRequest
impl RefUnwindSafe for ModelInferRequest
impl Send for ModelInferRequest
impl Sync for ModelInferRequest
impl Unpin for ModelInferRequest
impl UnwindSafe for ModelInferRequest
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