#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ModelRateLimiter {
#[prost(message, repeated, tag = "1")]
pub resources: ::prost::alloc::vec::Vec<model_rate_limiter::Resource>,
#[prost(uint32, tag = "2")]
pub priority: u32,
}
pub mod model_rate_limiter {
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Resource {
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
#[prost(bool, tag = "2")]
pub global: bool,
#[prost(uint32, tag = "3")]
pub count: u32,
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ModelInstanceGroup {
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
#[prost(enumeration = "model_instance_group::Kind", tag = "4")]
pub kind: i32,
#[prost(int32, tag = "2")]
pub count: i32,
#[prost(message, optional, tag = "6")]
pub rate_limiter: ::core::option::Option<ModelRateLimiter>,
#[prost(int32, repeated, tag = "3")]
pub gpus: ::prost::alloc::vec::Vec<i32>,
#[prost(message, repeated, tag = "8")]
pub secondary_devices: ::prost::alloc::vec::Vec<
model_instance_group::SecondaryDevice,
>,
#[prost(string, repeated, tag = "5")]
pub profile: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
#[prost(bool, tag = "7")]
pub passive: bool,
#[prost(string, tag = "9")]
pub host_policy: ::prost::alloc::string::String,
}
pub mod model_instance_group {
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SecondaryDevice {
#[prost(enumeration = "secondary_device::SecondaryDeviceKind", tag = "1")]
pub kind: i32,
#[prost(int64, tag = "2")]
pub device_id: i64,
}
pub mod secondary_device {
#[derive(
Clone,
Copy,
Debug,
PartialEq,
Eq,
Hash,
PartialOrd,
Ord,
::prost::Enumeration
)]
#[repr(i32)]
pub enum SecondaryDeviceKind {
KindNvdla = 0,
}
impl SecondaryDeviceKind {
pub fn as_str_name(&self) -> &'static str {
match self {
SecondaryDeviceKind::KindNvdla => "KIND_NVDLA",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"KIND_NVDLA" => Some(Self::KindNvdla),
_ => None,
}
}
}
}
#[derive(
Clone,
Copy,
Debug,
PartialEq,
Eq,
Hash,
PartialOrd,
Ord,
::prost::Enumeration
)]
#[repr(i32)]
pub enum Kind {
Auto = 0,
Gpu = 1,
Cpu = 2,
Model = 3,
}
impl Kind {
pub fn as_str_name(&self) -> &'static str {
match self {
Kind::Auto => "KIND_AUTO",
Kind::Gpu => "KIND_GPU",
Kind::Cpu => "KIND_CPU",
Kind::Model => "KIND_MODEL",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"KIND_AUTO" => Some(Self::Auto),
"KIND_GPU" => Some(Self::Gpu),
"KIND_CPU" => Some(Self::Cpu),
"KIND_MODEL" => Some(Self::Model),
_ => None,
}
}
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ModelTensorReshape {
#[prost(int64, repeated, tag = "1")]
pub shape: ::prost::alloc::vec::Vec<i64>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ModelInput {
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
#[prost(enumeration = "DataType", tag = "2")]
pub data_type: i32,
#[prost(enumeration = "model_input::Format", tag = "3")]
pub format: i32,
#[prost(int64, repeated, tag = "4")]
pub dims: ::prost::alloc::vec::Vec<i64>,
#[prost(message, optional, tag = "5")]
pub reshape: ::core::option::Option<ModelTensorReshape>,
#[prost(bool, tag = "6")]
pub is_shape_tensor: bool,
#[prost(bool, tag = "7")]
pub allow_ragged_batch: bool,
#[prost(bool, tag = "8")]
pub optional: bool,
}
pub mod model_input {
#[derive(
Clone,
Copy,
Debug,
PartialEq,
Eq,
Hash,
PartialOrd,
Ord,
::prost::Enumeration
)]
#[repr(i32)]
pub enum Format {
None = 0,
Nhwc = 1,
Nchw = 2,
}
impl Format {
pub fn as_str_name(&self) -> &'static str {
match self {
Format::None => "FORMAT_NONE",
Format::Nhwc => "FORMAT_NHWC",
Format::Nchw => "FORMAT_NCHW",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"FORMAT_NONE" => Some(Self::None),
"FORMAT_NHWC" => Some(Self::Nhwc),
"FORMAT_NCHW" => Some(Self::Nchw),
_ => None,
}
}
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ModelOutput {
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
#[prost(enumeration = "DataType", tag = "2")]
pub data_type: i32,
#[prost(int64, repeated, tag = "3")]
pub dims: ::prost::alloc::vec::Vec<i64>,
#[prost(message, optional, tag = "5")]
pub reshape: ::core::option::Option<ModelTensorReshape>,
#[prost(string, tag = "4")]
pub label_filename: ::prost::alloc::string::String,
#[prost(bool, tag = "6")]
pub is_shape_tensor: bool,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct BatchInput {
#[prost(enumeration = "batch_input::Kind", tag = "1")]
pub kind: i32,
#[prost(string, repeated, tag = "2")]
pub target_name: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
#[prost(enumeration = "DataType", tag = "3")]
pub data_type: i32,
#[prost(string, repeated, tag = "4")]
pub source_input: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
pub mod batch_input {
#[derive(
Clone,
Copy,
Debug,
PartialEq,
Eq,
Hash,
PartialOrd,
Ord,
::prost::Enumeration
)]
#[repr(i32)]
pub enum Kind {
BatchElementCount = 0,
BatchAccumulatedElementCount = 1,
BatchAccumulatedElementCountWithZero = 2,
BatchMaxElementCountAsShape = 3,
BatchItemShape = 4,
BatchItemShapeFlatten = 5,
}
impl Kind {
pub fn as_str_name(&self) -> &'static str {
match self {
Kind::BatchElementCount => "BATCH_ELEMENT_COUNT",
Kind::BatchAccumulatedElementCount => "BATCH_ACCUMULATED_ELEMENT_COUNT",
Kind::BatchAccumulatedElementCountWithZero => {
"BATCH_ACCUMULATED_ELEMENT_COUNT_WITH_ZERO"
}
Kind::BatchMaxElementCountAsShape => "BATCH_MAX_ELEMENT_COUNT_AS_SHAPE",
Kind::BatchItemShape => "BATCH_ITEM_SHAPE",
Kind::BatchItemShapeFlatten => "BATCH_ITEM_SHAPE_FLATTEN",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"BATCH_ELEMENT_COUNT" => Some(Self::BatchElementCount),
"BATCH_ACCUMULATED_ELEMENT_COUNT" => {
Some(Self::BatchAccumulatedElementCount)
}
"BATCH_ACCUMULATED_ELEMENT_COUNT_WITH_ZERO" => {
Some(Self::BatchAccumulatedElementCountWithZero)
}
"BATCH_MAX_ELEMENT_COUNT_AS_SHAPE" => {
Some(Self::BatchMaxElementCountAsShape)
}
"BATCH_ITEM_SHAPE" => Some(Self::BatchItemShape),
"BATCH_ITEM_SHAPE_FLATTEN" => Some(Self::BatchItemShapeFlatten),
_ => None,
}
}
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct BatchOutput {
#[prost(string, repeated, tag = "1")]
pub target_name: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
#[prost(enumeration = "batch_output::Kind", tag = "2")]
pub kind: i32,
#[prost(string, repeated, tag = "3")]
pub source_input: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
pub mod batch_output {
#[derive(
Clone,
Copy,
Debug,
PartialEq,
Eq,
Hash,
PartialOrd,
Ord,
::prost::Enumeration
)]
#[repr(i32)]
pub enum Kind {
BatchScatterWithInputShape = 0,
}
impl Kind {
pub fn as_str_name(&self) -> &'static str {
match self {
Kind::BatchScatterWithInputShape => "BATCH_SCATTER_WITH_INPUT_SHAPE",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"BATCH_SCATTER_WITH_INPUT_SHAPE" => {
Some(Self::BatchScatterWithInputShape)
}
_ => None,
}
}
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ModelVersionPolicy {
#[prost(oneof = "model_version_policy::PolicyChoice", tags = "1, 2, 3")]
pub policy_choice: ::core::option::Option<model_version_policy::PolicyChoice>,
}
pub mod model_version_policy {
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Latest {
#[prost(uint32, tag = "1")]
pub num_versions: u32,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct All {}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Specific {
#[prost(int64, repeated, tag = "1")]
pub versions: ::prost::alloc::vec::Vec<i64>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum PolicyChoice {
#[prost(message, tag = "1")]
Latest(Latest),
#[prost(message, tag = "2")]
All(All),
#[prost(message, tag = "3")]
Specific(Specific),
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ModelOptimizationPolicy {
#[prost(message, optional, tag = "1")]
pub graph: ::core::option::Option<model_optimization_policy::Graph>,
#[prost(enumeration = "model_optimization_policy::ModelPriority", tag = "2")]
pub priority: i32,
#[prost(message, optional, tag = "3")]
pub cuda: ::core::option::Option<model_optimization_policy::Cuda>,
#[prost(message, optional, tag = "4")]
pub execution_accelerators: ::core::option::Option<
model_optimization_policy::ExecutionAccelerators,
>,
#[prost(message, optional, tag = "5")]
pub input_pinned_memory: ::core::option::Option<
model_optimization_policy::PinnedMemoryBuffer,
>,
#[prost(message, optional, tag = "6")]
pub output_pinned_memory: ::core::option::Option<
model_optimization_policy::PinnedMemoryBuffer,
>,
#[prost(uint32, tag = "7")]
pub gather_kernel_buffer_threshold: u32,
#[prost(bool, tag = "8")]
pub eager_batching: bool,
}
pub mod model_optimization_policy {
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Graph {
#[prost(int32, tag = "1")]
pub level: i32,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Cuda {
#[prost(bool, tag = "1")]
pub graphs: bool,
#[prost(bool, tag = "2")]
pub busy_wait_events: bool,
#[prost(message, repeated, tag = "3")]
pub graph_spec: ::prost::alloc::vec::Vec<cuda::GraphSpec>,
#[prost(bool, tag = "4")]
pub output_copy_stream: bool,
}
pub mod cuda {
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GraphSpec {
#[prost(int32, tag = "1")]
pub batch_size: i32,
#[prost(map = "string, message", tag = "2")]
pub input: ::std::collections::HashMap<
::prost::alloc::string::String,
graph_spec::Shape,
>,
#[prost(message, optional, tag = "3")]
pub graph_lower_bound: ::core::option::Option<graph_spec::LowerBound>,
}
pub mod graph_spec {
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Shape {
#[prost(int64, repeated, tag = "1")]
pub dim: ::prost::alloc::vec::Vec<i64>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct LowerBound {
#[prost(int32, tag = "1")]
pub batch_size: i32,
#[prost(map = "string, message", tag = "2")]
pub input: ::std::collections::HashMap<
::prost::alloc::string::String,
Shape,
>,
}
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ExecutionAccelerators {
#[prost(message, repeated, tag = "1")]
pub gpu_execution_accelerator: ::prost::alloc::vec::Vec<
execution_accelerators::Accelerator,
>,
#[prost(message, repeated, tag = "2")]
pub cpu_execution_accelerator: ::prost::alloc::vec::Vec<
execution_accelerators::Accelerator,
>,
}
pub mod execution_accelerators {
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Accelerator {
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
#[prost(map = "string, string", tag = "2")]
pub parameters: ::std::collections::HashMap<
::prost::alloc::string::String,
::prost::alloc::string::String,
>,
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct PinnedMemoryBuffer {
#[prost(bool, tag = "1")]
pub enable: bool,
}
#[derive(
Clone,
Copy,
Debug,
PartialEq,
Eq,
Hash,
PartialOrd,
Ord,
::prost::Enumeration
)]
#[repr(i32)]
pub enum ModelPriority {
PriorityDefault = 0,
PriorityMax = 1,
PriorityMin = 2,
}
impl ModelPriority {
pub fn as_str_name(&self) -> &'static str {
match self {
ModelPriority::PriorityDefault => "PRIORITY_DEFAULT",
ModelPriority::PriorityMax => "PRIORITY_MAX",
ModelPriority::PriorityMin => "PRIORITY_MIN",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"PRIORITY_DEFAULT" => Some(Self::PriorityDefault),
"PRIORITY_MAX" => Some(Self::PriorityMax),
"PRIORITY_MIN" => Some(Self::PriorityMin),
_ => None,
}
}
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ModelQueuePolicy {
#[prost(enumeration = "model_queue_policy::TimeoutAction", tag = "1")]
pub timeout_action: i32,
#[prost(uint64, tag = "2")]
pub default_timeout_microseconds: u64,
#[prost(bool, tag = "3")]
pub allow_timeout_override: bool,
#[prost(uint32, tag = "4")]
pub max_queue_size: u32,
}
pub mod model_queue_policy {
#[derive(
Clone,
Copy,
Debug,
PartialEq,
Eq,
Hash,
PartialOrd,
Ord,
::prost::Enumeration
)]
#[repr(i32)]
pub enum TimeoutAction {
Reject = 0,
Delay = 1,
}
impl TimeoutAction {
pub fn as_str_name(&self) -> &'static str {
match self {
TimeoutAction::Reject => "REJECT",
TimeoutAction::Delay => "DELAY",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"REJECT" => Some(Self::Reject),
"DELAY" => Some(Self::Delay),
_ => None,
}
}
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ModelDynamicBatching {
#[prost(int32, repeated, tag = "1")]
pub preferred_batch_size: ::prost::alloc::vec::Vec<i32>,
#[prost(uint64, tag = "2")]
pub max_queue_delay_microseconds: u64,
#[prost(bool, tag = "3")]
pub preserve_ordering: bool,
#[prost(uint32, tag = "4")]
pub priority_levels: u32,
#[prost(uint32, tag = "5")]
pub default_priority_level: u32,
#[prost(message, optional, tag = "6")]
pub default_queue_policy: ::core::option::Option<ModelQueuePolicy>,
#[prost(map = "uint32, message", tag = "7")]
pub priority_queue_policy: ::std::collections::HashMap<u32, ModelQueuePolicy>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ModelSequenceBatching {
#[prost(uint64, tag = "1")]
pub max_sequence_idle_microseconds: u64,
#[prost(message, repeated, tag = "2")]
pub control_input: ::prost::alloc::vec::Vec<model_sequence_batching::ControlInput>,
#[prost(message, repeated, tag = "5")]
pub state: ::prost::alloc::vec::Vec<model_sequence_batching::State>,
#[prost(oneof = "model_sequence_batching::StrategyChoice", tags = "3, 4")]
pub strategy_choice: ::core::option::Option<model_sequence_batching::StrategyChoice>,
}
pub mod model_sequence_batching {
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Control {
#[prost(enumeration = "control::Kind", tag = "1")]
pub kind: i32,
#[prost(int32, repeated, tag = "2")]
pub int32_false_true: ::prost::alloc::vec::Vec<i32>,
#[prost(float, repeated, tag = "3")]
pub fp32_false_true: ::prost::alloc::vec::Vec<f32>,
#[prost(bool, repeated, tag = "5")]
pub bool_false_true: ::prost::alloc::vec::Vec<bool>,
#[prost(enumeration = "super::DataType", tag = "4")]
pub data_type: i32,
}
pub mod control {
#[derive(
Clone,
Copy,
Debug,
PartialEq,
Eq,
Hash,
PartialOrd,
Ord,
::prost::Enumeration
)]
#[repr(i32)]
pub enum Kind {
ControlSequenceStart = 0,
ControlSequenceReady = 1,
ControlSequenceEnd = 2,
ControlSequenceCorrid = 3,
}
impl Kind {
pub fn as_str_name(&self) -> &'static str {
match self {
Kind::ControlSequenceStart => "CONTROL_SEQUENCE_START",
Kind::ControlSequenceReady => "CONTROL_SEQUENCE_READY",
Kind::ControlSequenceEnd => "CONTROL_SEQUENCE_END",
Kind::ControlSequenceCorrid => "CONTROL_SEQUENCE_CORRID",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"CONTROL_SEQUENCE_START" => Some(Self::ControlSequenceStart),
"CONTROL_SEQUENCE_READY" => Some(Self::ControlSequenceReady),
"CONTROL_SEQUENCE_END" => Some(Self::ControlSequenceEnd),
"CONTROL_SEQUENCE_CORRID" => Some(Self::ControlSequenceCorrid),
_ => None,
}
}
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ControlInput {
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
#[prost(message, repeated, tag = "2")]
pub control: ::prost::alloc::vec::Vec<Control>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct InitialState {
#[prost(enumeration = "super::DataType", tag = "1")]
pub data_type: i32,
#[prost(int64, repeated, tag = "2")]
pub dims: ::prost::alloc::vec::Vec<i64>,
#[prost(string, tag = "5")]
pub name: ::prost::alloc::string::String,
#[prost(oneof = "initial_state::StateData", tags = "3, 4")]
pub state_data: ::core::option::Option<initial_state::StateData>,
}
pub mod initial_state {
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum StateData {
#[prost(bool, tag = "3")]
ZeroData(bool),
#[prost(string, tag = "4")]
DataFile(::prost::alloc::string::String),
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct State {
#[prost(string, tag = "1")]
pub input_name: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub output_name: ::prost::alloc::string::String,
#[prost(enumeration = "super::DataType", tag = "3")]
pub data_type: i32,
#[prost(int64, repeated, tag = "4")]
pub dims: ::prost::alloc::vec::Vec<i64>,
#[prost(message, repeated, tag = "5")]
pub initial_state: ::prost::alloc::vec::Vec<InitialState>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct StrategyDirect {
#[prost(uint64, tag = "1")]
pub max_queue_delay_microseconds: u64,
#[prost(float, tag = "2")]
pub minimum_slot_utilization: f32,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct StrategyOldest {
#[prost(int32, tag = "1")]
pub max_candidate_sequences: i32,
#[prost(int32, repeated, tag = "2")]
pub preferred_batch_size: ::prost::alloc::vec::Vec<i32>,
#[prost(uint64, tag = "3")]
pub max_queue_delay_microseconds: u64,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum StrategyChoice {
#[prost(message, tag = "3")]
Direct(StrategyDirect),
#[prost(message, tag = "4")]
Oldest(StrategyOldest),
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ModelEnsembling {
#[prost(message, repeated, tag = "1")]
pub step: ::prost::alloc::vec::Vec<model_ensembling::Step>,
}
pub mod model_ensembling {
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Step {
#[prost(string, tag = "1")]
pub model_name: ::prost::alloc::string::String,
#[prost(int64, tag = "2")]
pub model_version: i64,
#[prost(map = "string, string", tag = "3")]
pub input_map: ::std::collections::HashMap<
::prost::alloc::string::String,
::prost::alloc::string::String,
>,
#[prost(map = "string, string", tag = "4")]
pub output_map: ::std::collections::HashMap<
::prost::alloc::string::String,
::prost::alloc::string::String,
>,
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ModelParameter {
#[prost(string, tag = "1")]
pub string_value: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ModelWarmup {
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
#[prost(uint32, tag = "2")]
pub batch_size: u32,
#[prost(map = "string, message", tag = "3")]
pub inputs: ::std::collections::HashMap<
::prost::alloc::string::String,
model_warmup::Input,
>,
#[prost(uint32, tag = "4")]
pub count: u32,
}
pub mod model_warmup {
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Input {
#[prost(enumeration = "super::DataType", tag = "1")]
pub data_type: i32,
#[prost(int64, repeated, tag = "2")]
pub dims: ::prost::alloc::vec::Vec<i64>,
#[prost(oneof = "input::InputDataType", tags = "3, 4, 5")]
pub input_data_type: ::core::option::Option<input::InputDataType>,
}
pub mod input {
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum InputDataType {
#[prost(bool, tag = "3")]
ZeroData(bool),
#[prost(bool, tag = "4")]
RandomData(bool),
#[prost(string, tag = "5")]
InputDataFile(::prost::alloc::string::String),
}
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ModelOperations {
#[prost(string, repeated, tag = "1")]
pub op_library_filename: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ModelTransactionPolicy {
#[prost(bool, tag = "1")]
pub decoupled: bool,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ModelRepositoryAgents {
#[prost(message, repeated, tag = "1")]
pub agents: ::prost::alloc::vec::Vec<model_repository_agents::Agent>,
}
pub mod model_repository_agents {
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Agent {
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
#[prost(map = "string, string", tag = "2")]
pub parameters: ::std::collections::HashMap<
::prost::alloc::string::String,
::prost::alloc::string::String,
>,
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ModelResponseCache {
#[prost(bool, tag = "1")]
pub enable: bool,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ModelConfig {
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub platform: ::prost::alloc::string::String,
#[prost(string, tag = "17")]
pub backend: ::prost::alloc::string::String,
#[prost(message, optional, tag = "3")]
pub version_policy: ::core::option::Option<ModelVersionPolicy>,
#[prost(int32, tag = "4")]
pub max_batch_size: i32,
#[prost(message, repeated, tag = "5")]
pub input: ::prost::alloc::vec::Vec<ModelInput>,
#[prost(message, repeated, tag = "6")]
pub output: ::prost::alloc::vec::Vec<ModelOutput>,
#[prost(message, repeated, tag = "20")]
pub batch_input: ::prost::alloc::vec::Vec<BatchInput>,
#[prost(message, repeated, tag = "21")]
pub batch_output: ::prost::alloc::vec::Vec<BatchOutput>,
#[prost(message, optional, tag = "12")]
pub optimization: ::core::option::Option<ModelOptimizationPolicy>,
#[prost(message, repeated, tag = "7")]
pub instance_group: ::prost::alloc::vec::Vec<ModelInstanceGroup>,
#[prost(string, tag = "8")]
pub default_model_filename: ::prost::alloc::string::String,
#[prost(map = "string, string", tag = "9")]
pub cc_model_filenames: ::std::collections::HashMap<
::prost::alloc::string::String,
::prost::alloc::string::String,
>,
#[prost(map = "string, string", tag = "10")]
pub metric_tags: ::std::collections::HashMap<
::prost::alloc::string::String,
::prost::alloc::string::String,
>,
#[prost(map = "string, message", tag = "14")]
pub parameters: ::std::collections::HashMap<
::prost::alloc::string::String,
ModelParameter,
>,
#[prost(message, repeated, tag = "16")]
pub model_warmup: ::prost::alloc::vec::Vec<ModelWarmup>,
#[prost(message, optional, tag = "18")]
pub model_operations: ::core::option::Option<ModelOperations>,
#[prost(message, optional, tag = "19")]
pub model_transaction_policy: ::core::option::Option<ModelTransactionPolicy>,
#[prost(message, optional, tag = "23")]
pub model_repository_agents: ::core::option::Option<ModelRepositoryAgents>,
#[prost(message, optional, tag = "24")]
pub response_cache: ::core::option::Option<ModelResponseCache>,
#[prost(oneof = "model_config::SchedulingChoice", tags = "11, 13, 15")]
pub scheduling_choice: ::core::option::Option<model_config::SchedulingChoice>,
}
pub mod model_config {
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum SchedulingChoice {
#[prost(message, tag = "11")]
DynamicBatching(super::ModelDynamicBatching),
#[prost(message, tag = "13")]
SequenceBatching(super::ModelSequenceBatching),
#[prost(message, tag = "15")]
EnsembleScheduling(super::ModelEnsembling),
}
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum DataType {
TypeInvalid = 0,
TypeBool = 1,
TypeUint8 = 2,
TypeUint16 = 3,
TypeUint32 = 4,
TypeUint64 = 5,
TypeInt8 = 6,
TypeInt16 = 7,
TypeInt32 = 8,
TypeInt64 = 9,
TypeFp16 = 10,
TypeFp32 = 11,
TypeFp64 = 12,
TypeString = 13,
TypeBf16 = 14,
}
impl DataType {
pub fn as_str_name(&self) -> &'static str {
match self {
DataType::TypeInvalid => "TYPE_INVALID",
DataType::TypeBool => "TYPE_BOOL",
DataType::TypeUint8 => "TYPE_UINT8",
DataType::TypeUint16 => "TYPE_UINT16",
DataType::TypeUint32 => "TYPE_UINT32",
DataType::TypeUint64 => "TYPE_UINT64",
DataType::TypeInt8 => "TYPE_INT8",
DataType::TypeInt16 => "TYPE_INT16",
DataType::TypeInt32 => "TYPE_INT32",
DataType::TypeInt64 => "TYPE_INT64",
DataType::TypeFp16 => "TYPE_FP16",
DataType::TypeFp32 => "TYPE_FP32",
DataType::TypeFp64 => "TYPE_FP64",
DataType::TypeString => "TYPE_STRING",
DataType::TypeBf16 => "TYPE_BF16",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"TYPE_INVALID" => Some(Self::TypeInvalid),
"TYPE_BOOL" => Some(Self::TypeBool),
"TYPE_UINT8" => Some(Self::TypeUint8),
"TYPE_UINT16" => Some(Self::TypeUint16),
"TYPE_UINT32" => Some(Self::TypeUint32),
"TYPE_UINT64" => Some(Self::TypeUint64),
"TYPE_INT8" => Some(Self::TypeInt8),
"TYPE_INT16" => Some(Self::TypeInt16),
"TYPE_INT32" => Some(Self::TypeInt32),
"TYPE_INT64" => Some(Self::TypeInt64),
"TYPE_FP16" => Some(Self::TypeFp16),
"TYPE_FP32" => Some(Self::TypeFp32),
"TYPE_FP64" => Some(Self::TypeFp64),
"TYPE_STRING" => Some(Self::TypeString),
"TYPE_BF16" => Some(Self::TypeBf16),
_ => None,
}
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ServerLiveRequest {}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ServerLiveResponse {
#[prost(bool, tag = "1")]
pub live: bool,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ServerReadyRequest {}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ServerReadyResponse {
#[prost(bool, tag = "1")]
pub ready: bool,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ModelReadyRequest {
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub version: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ModelReadyResponse {
#[prost(bool, tag = "1")]
pub ready: bool,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ServerMetadataRequest {}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ServerMetadataResponse {
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub version: ::prost::alloc::string::String,
#[prost(string, repeated, tag = "3")]
pub extensions: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ModelMetadataRequest {
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub version: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ModelMetadataResponse {
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
#[prost(string, repeated, tag = "2")]
pub versions: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
#[prost(string, tag = "3")]
pub platform: ::prost::alloc::string::String,
#[prost(message, repeated, tag = "4")]
pub inputs: ::prost::alloc::vec::Vec<model_metadata_response::TensorMetadata>,
#[prost(message, repeated, tag = "5")]
pub outputs: ::prost::alloc::vec::Vec<model_metadata_response::TensorMetadata>,
}
pub mod model_metadata_response {
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct TensorMetadata {
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub datatype: ::prost::alloc::string::String,
#[prost(int64, repeated, tag = "3")]
pub shape: ::prost::alloc::vec::Vec<i64>,
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct InferParameter {
#[prost(oneof = "infer_parameter::ParameterChoice", tags = "1, 2, 3")]
pub parameter_choice: ::core::option::Option<infer_parameter::ParameterChoice>,
}
pub mod infer_parameter {
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum ParameterChoice {
#[prost(bool, tag = "1")]
BoolParam(bool),
#[prost(int64, tag = "2")]
Int64Param(i64),
#[prost(string, tag = "3")]
StringParam(::prost::alloc::string::String),
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct InferTensorContents {
#[prost(bool, repeated, tag = "1")]
pub bool_contents: ::prost::alloc::vec::Vec<bool>,
#[prost(int32, repeated, tag = "2")]
pub int_contents: ::prost::alloc::vec::Vec<i32>,
#[prost(int64, repeated, tag = "3")]
pub int64_contents: ::prost::alloc::vec::Vec<i64>,
#[prost(uint32, repeated, tag = "4")]
pub uint_contents: ::prost::alloc::vec::Vec<u32>,
#[prost(uint64, repeated, tag = "5")]
pub uint64_contents: ::prost::alloc::vec::Vec<u64>,
#[prost(float, repeated, tag = "6")]
pub fp32_contents: ::prost::alloc::vec::Vec<f32>,
#[prost(double, repeated, tag = "7")]
pub fp64_contents: ::prost::alloc::vec::Vec<f64>,
#[prost(bytes = "vec", repeated, tag = "8")]
pub bytes_contents: ::prost::alloc::vec::Vec<::prost::alloc::vec::Vec<u8>>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ModelInferRequest {
#[prost(string, tag = "1")]
pub model_name: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub model_version: ::prost::alloc::string::String,
#[prost(string, tag = "3")]
pub id: ::prost::alloc::string::String,
#[prost(map = "string, message", tag = "4")]
pub parameters: ::std::collections::HashMap<
::prost::alloc::string::String,
InferParameter,
>,
#[prost(message, repeated, tag = "5")]
pub inputs: ::prost::alloc::vec::Vec<model_infer_request::InferInputTensor>,
#[prost(message, repeated, tag = "6")]
pub outputs: ::prost::alloc::vec::Vec<
model_infer_request::InferRequestedOutputTensor,
>,
#[prost(bytes = "vec", repeated, tag = "7")]
pub raw_input_contents: ::prost::alloc::vec::Vec<::prost::alloc::vec::Vec<u8>>,
}
pub mod model_infer_request {
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct InferInputTensor {
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub datatype: ::prost::alloc::string::String,
#[prost(int64, repeated, tag = "3")]
pub shape: ::prost::alloc::vec::Vec<i64>,
#[prost(map = "string, message", tag = "4")]
pub parameters: ::std::collections::HashMap<
::prost::alloc::string::String,
super::InferParameter,
>,
#[prost(message, optional, tag = "5")]
pub contents: ::core::option::Option<super::InferTensorContents>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct InferRequestedOutputTensor {
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
#[prost(map = "string, message", tag = "2")]
pub parameters: ::std::collections::HashMap<
::prost::alloc::string::String,
super::InferParameter,
>,
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ModelInferResponse {
#[prost(string, tag = "1")]
pub model_name: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub model_version: ::prost::alloc::string::String,
#[prost(string, tag = "3")]
pub id: ::prost::alloc::string::String,
#[prost(map = "string, message", tag = "4")]
pub parameters: ::std::collections::HashMap<
::prost::alloc::string::String,
InferParameter,
>,
#[prost(message, repeated, tag = "5")]
pub outputs: ::prost::alloc::vec::Vec<model_infer_response::InferOutputTensor>,
#[prost(bytes = "vec", repeated, tag = "6")]
pub raw_output_contents: ::prost::alloc::vec::Vec<::prost::alloc::vec::Vec<u8>>,
}
pub mod model_infer_response {
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct InferOutputTensor {
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub datatype: ::prost::alloc::string::String,
#[prost(int64, repeated, tag = "3")]
pub shape: ::prost::alloc::vec::Vec<i64>,
#[prost(map = "string, message", tag = "4")]
pub parameters: ::std::collections::HashMap<
::prost::alloc::string::String,
super::InferParameter,
>,
#[prost(message, optional, tag = "5")]
pub contents: ::core::option::Option<super::InferTensorContents>,
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ModelStreamInferResponse {
#[prost(string, tag = "1")]
pub error_message: ::prost::alloc::string::String,
#[prost(message, optional, tag = "2")]
pub infer_response: ::core::option::Option<ModelInferResponse>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ModelConfigRequest {
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub version: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ModelConfigResponse {
#[prost(message, optional, tag = "1")]
pub config: ::core::option::Option<ModelConfig>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ModelStatisticsRequest {
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub version: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct StatisticDuration {
#[prost(uint64, tag = "1")]
pub count: u64,
#[prost(uint64, tag = "2")]
pub ns: u64,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct InferStatistics {
#[prost(message, optional, tag = "1")]
pub success: ::core::option::Option<StatisticDuration>,
#[prost(message, optional, tag = "2")]
pub fail: ::core::option::Option<StatisticDuration>,
#[prost(message, optional, tag = "3")]
pub queue: ::core::option::Option<StatisticDuration>,
#[prost(message, optional, tag = "4")]
pub compute_input: ::core::option::Option<StatisticDuration>,
#[prost(message, optional, tag = "5")]
pub compute_infer: ::core::option::Option<StatisticDuration>,
#[prost(message, optional, tag = "6")]
pub compute_output: ::core::option::Option<StatisticDuration>,
#[prost(message, optional, tag = "7")]
pub cache_hit: ::core::option::Option<StatisticDuration>,
#[prost(message, optional, tag = "8")]
pub cache_miss: ::core::option::Option<StatisticDuration>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct InferBatchStatistics {
#[prost(uint64, tag = "1")]
pub batch_size: u64,
#[prost(message, optional, tag = "2")]
pub compute_input: ::core::option::Option<StatisticDuration>,
#[prost(message, optional, tag = "3")]
pub compute_infer: ::core::option::Option<StatisticDuration>,
#[prost(message, optional, tag = "4")]
pub compute_output: ::core::option::Option<StatisticDuration>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ModelStatistics {
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub version: ::prost::alloc::string::String,
#[prost(uint64, tag = "3")]
pub last_inference: u64,
#[prost(uint64, tag = "4")]
pub inference_count: u64,
#[prost(uint64, tag = "5")]
pub execution_count: u64,
#[prost(message, optional, tag = "6")]
pub inference_stats: ::core::option::Option<InferStatistics>,
#[prost(message, repeated, tag = "7")]
pub batch_stats: ::prost::alloc::vec::Vec<InferBatchStatistics>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ModelStatisticsResponse {
#[prost(message, repeated, tag = "1")]
pub model_stats: ::prost::alloc::vec::Vec<ModelStatistics>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ModelRepositoryParameter {
#[prost(oneof = "model_repository_parameter::ParameterChoice", tags = "1, 2, 3, 4")]
pub parameter_choice: ::core::option::Option<
model_repository_parameter::ParameterChoice,
>,
}
pub mod model_repository_parameter {
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum ParameterChoice {
#[prost(bool, tag = "1")]
BoolParam(bool),
#[prost(int64, tag = "2")]
Int64Param(i64),
#[prost(string, tag = "3")]
StringParam(::prost::alloc::string::String),
#[prost(bytes, tag = "4")]
BytesParam(::prost::alloc::vec::Vec<u8>),
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct RepositoryIndexRequest {
#[prost(string, tag = "1")]
pub repository_name: ::prost::alloc::string::String,
#[prost(bool, tag = "2")]
pub ready: bool,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct RepositoryIndexResponse {
#[prost(message, repeated, tag = "1")]
pub models: ::prost::alloc::vec::Vec<repository_index_response::ModelIndex>,
}
pub mod repository_index_response {
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ModelIndex {
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub version: ::prost::alloc::string::String,
#[prost(string, tag = "3")]
pub state: ::prost::alloc::string::String,
#[prost(string, tag = "4")]
pub reason: ::prost::alloc::string::String,
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct RepositoryModelLoadRequest {
#[prost(string, tag = "1")]
pub repository_name: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub model_name: ::prost::alloc::string::String,
#[prost(map = "string, message", tag = "3")]
pub parameters: ::std::collections::HashMap<
::prost::alloc::string::String,
ModelRepositoryParameter,
>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct RepositoryModelLoadResponse {}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct RepositoryModelUnloadRequest {
#[prost(string, tag = "1")]
pub repository_name: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub model_name: ::prost::alloc::string::String,
#[prost(map = "string, message", tag = "3")]
pub parameters: ::std::collections::HashMap<
::prost::alloc::string::String,
ModelRepositoryParameter,
>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct RepositoryModelUnloadResponse {}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SystemSharedMemoryStatusRequest {
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SystemSharedMemoryStatusResponse {
#[prost(map = "string, message", tag = "1")]
pub regions: ::std::collections::HashMap<
::prost::alloc::string::String,
system_shared_memory_status_response::RegionStatus,
>,
}
pub mod system_shared_memory_status_response {
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct RegionStatus {
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub key: ::prost::alloc::string::String,
#[prost(uint64, tag = "3")]
pub offset: u64,
#[prost(uint64, tag = "4")]
pub byte_size: u64,
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SystemSharedMemoryRegisterRequest {
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub key: ::prost::alloc::string::String,
#[prost(uint64, tag = "3")]
pub offset: u64,
#[prost(uint64, tag = "4")]
pub byte_size: u64,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SystemSharedMemoryRegisterResponse {}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SystemSharedMemoryUnregisterRequest {
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SystemSharedMemoryUnregisterResponse {}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CudaSharedMemoryStatusRequest {
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CudaSharedMemoryStatusResponse {
#[prost(map = "string, message", tag = "1")]
pub regions: ::std::collections::HashMap<
::prost::alloc::string::String,
cuda_shared_memory_status_response::RegionStatus,
>,
}
pub mod cuda_shared_memory_status_response {
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct RegionStatus {
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
#[prost(uint64, tag = "2")]
pub device_id: u64,
#[prost(uint64, tag = "3")]
pub byte_size: u64,
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CudaSharedMemoryRegisterRequest {
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
#[prost(bytes = "vec", tag = "2")]
pub raw_handle: ::prost::alloc::vec::Vec<u8>,
#[prost(int64, tag = "3")]
pub device_id: i64,
#[prost(uint64, tag = "4")]
pub byte_size: u64,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CudaSharedMemoryRegisterResponse {}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CudaSharedMemoryUnregisterRequest {
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CudaSharedMemoryUnregisterResponse {}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct TraceSettingRequest {
#[prost(map = "string, message", tag = "1")]
pub settings: ::std::collections::HashMap<
::prost::alloc::string::String,
trace_setting_request::SettingValue,
>,
#[prost(string, tag = "2")]
pub model_name: ::prost::alloc::string::String,
}
pub mod trace_setting_request {
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SettingValue {
#[prost(string, repeated, tag = "1")]
pub value: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct TraceSettingResponse {
#[prost(map = "string, message", tag = "1")]
pub settings: ::std::collections::HashMap<
::prost::alloc::string::String,
trace_setting_response::SettingValue,
>,
}
pub mod trace_setting_response {
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SettingValue {
#[prost(string, repeated, tag = "1")]
pub value: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct LogSettingsRequest {
#[prost(map = "string, message", tag = "1")]
pub settings: ::std::collections::HashMap<
::prost::alloc::string::String,
log_settings_request::SettingValue,
>,
}
pub mod log_settings_request {
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SettingValue {
#[prost(oneof = "setting_value::ParameterChoice", tags = "1, 2, 3")]
pub parameter_choice: ::core::option::Option<setting_value::ParameterChoice>,
}
pub mod setting_value {
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum ParameterChoice {
#[prost(bool, tag = "1")]
BoolParam(bool),
#[prost(uint32, tag = "2")]
Uint32Param(u32),
#[prost(string, tag = "3")]
StringParam(::prost::alloc::string::String),
}
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct LogSettingsResponse {
#[prost(map = "string, message", tag = "1")]
pub settings: ::std::collections::HashMap<
::prost::alloc::string::String,
log_settings_response::SettingValue,
>,
}
pub mod log_settings_response {
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SettingValue {
#[prost(oneof = "setting_value::ParameterChoice", tags = "1, 2, 3")]
pub parameter_choice: ::core::option::Option<setting_value::ParameterChoice>,
}
pub mod setting_value {
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum ParameterChoice {
#[prost(bool, tag = "1")]
BoolParam(bool),
#[prost(uint32, tag = "2")]
Uint32Param(u32),
#[prost(string, tag = "3")]
StringParam(::prost::alloc::string::String),
}
}
}
pub mod grpc_inference_service_client {
#![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)]
use tonic::codegen::*;
use tonic::codegen::http::Uri;
#[derive(Debug, Clone)]
pub struct GrpcInferenceServiceClient<T> {
inner: tonic::client::Grpc<T>,
}
impl GrpcInferenceServiceClient<tonic::transport::Channel> {
pub async fn connect<D>(dst: D) -> Result<Self, tonic::transport::Error>
where
D: std::convert::TryInto<tonic::transport::Endpoint>,
D::Error: Into<StdError>,
{
let conn = tonic::transport::Endpoint::new(dst)?.connect().await?;
Ok(Self::new(conn))
}
}
impl<T> GrpcInferenceServiceClient<T>
where
T: tonic::client::GrpcService<tonic::body::BoxBody>,
T::Error: Into<StdError>,
T::ResponseBody: Body<Data = Bytes> + Send + 'static,
<T::ResponseBody as Body>::Error: Into<StdError> + Send,
{
pub fn new(inner: T) -> Self {
let inner = tonic::client::Grpc::new(inner);
Self { inner }
}
pub fn with_origin(inner: T, origin: Uri) -> Self {
let inner = tonic::client::Grpc::with_origin(inner, origin);
Self { inner }
}
pub fn with_interceptor<F>(
inner: T,
interceptor: F,
) -> GrpcInferenceServiceClient<InterceptedService<T, F>>
where
F: tonic::service::Interceptor,
T::ResponseBody: Default,
T: tonic::codegen::Service<
http::Request<tonic::body::BoxBody>,
Response = http::Response<
<T as tonic::client::GrpcService<tonic::body::BoxBody>>::ResponseBody,
>,
>,
<T as tonic::codegen::Service<
http::Request<tonic::body::BoxBody>,
>>::Error: Into<StdError> + Send + Sync,
{
GrpcInferenceServiceClient::new(InterceptedService::new(inner, interceptor))
}
#[must_use]
pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
self.inner = self.inner.send_compressed(encoding);
self
}
#[must_use]
pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
self.inner = self.inner.accept_compressed(encoding);
self
}
pub async fn server_live(
&mut self,
request: impl tonic::IntoRequest<super::ServerLiveRequest>,
) -> Result<tonic::Response<super::ServerLiveResponse>, tonic::Status> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/inference.GRPCInferenceService/ServerLive",
);
self.inner.unary(request.into_request(), path, codec).await
}
pub async fn server_ready(
&mut self,
request: impl tonic::IntoRequest<super::ServerReadyRequest>,
) -> Result<tonic::Response<super::ServerReadyResponse>, tonic::Status> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/inference.GRPCInferenceService/ServerReady",
);
self.inner.unary(request.into_request(), path, codec).await
}
pub async fn model_ready(
&mut self,
request: impl tonic::IntoRequest<super::ModelReadyRequest>,
) -> Result<tonic::Response<super::ModelReadyResponse>, tonic::Status> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/inference.GRPCInferenceService/ModelReady",
);
self.inner.unary(request.into_request(), path, codec).await
}
pub async fn server_metadata(
&mut self,
request: impl tonic::IntoRequest<super::ServerMetadataRequest>,
) -> Result<tonic::Response<super::ServerMetadataResponse>, tonic::Status> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/inference.GRPCInferenceService/ServerMetadata",
);
self.inner.unary(request.into_request(), path, codec).await
}
pub async fn model_metadata(
&mut self,
request: impl tonic::IntoRequest<super::ModelMetadataRequest>,
) -> Result<tonic::Response<super::ModelMetadataResponse>, tonic::Status> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/inference.GRPCInferenceService/ModelMetadata",
);
self.inner.unary(request.into_request(), path, codec).await
}
pub async fn model_infer(
&mut self,
request: impl tonic::IntoRequest<super::ModelInferRequest>,
) -> Result<tonic::Response<super::ModelInferResponse>, tonic::Status> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/inference.GRPCInferenceService/ModelInfer",
);
self.inner.unary(request.into_request(), path, codec).await
}
pub async fn model_stream_infer(
&mut self,
request: impl tonic::IntoStreamingRequest<Message = super::ModelInferRequest>,
) -> Result<
tonic::Response<tonic::codec::Streaming<super::ModelStreamInferResponse>>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/inference.GRPCInferenceService/ModelStreamInfer",
);
self.inner.streaming(request.into_streaming_request(), path, codec).await
}
pub async fn model_config(
&mut self,
request: impl tonic::IntoRequest<super::ModelConfigRequest>,
) -> Result<tonic::Response<super::ModelConfigResponse>, tonic::Status> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/inference.GRPCInferenceService/ModelConfig",
);
self.inner.unary(request.into_request(), path, codec).await
}
pub async fn model_statistics(
&mut self,
request: impl tonic::IntoRequest<super::ModelStatisticsRequest>,
) -> Result<tonic::Response<super::ModelStatisticsResponse>, tonic::Status> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/inference.GRPCInferenceService/ModelStatistics",
);
self.inner.unary(request.into_request(), path, codec).await
}
pub async fn repository_index(
&mut self,
request: impl tonic::IntoRequest<super::RepositoryIndexRequest>,
) -> Result<tonic::Response<super::RepositoryIndexResponse>, tonic::Status> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/inference.GRPCInferenceService/RepositoryIndex",
);
self.inner.unary(request.into_request(), path, codec).await
}
pub async fn repository_model_load(
&mut self,
request: impl tonic::IntoRequest<super::RepositoryModelLoadRequest>,
) -> Result<tonic::Response<super::RepositoryModelLoadResponse>, tonic::Status> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/inference.GRPCInferenceService/RepositoryModelLoad",
);
self.inner.unary(request.into_request(), path, codec).await
}
pub async fn repository_model_unload(
&mut self,
request: impl tonic::IntoRequest<super::RepositoryModelUnloadRequest>,
) -> Result<
tonic::Response<super::RepositoryModelUnloadResponse>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/inference.GRPCInferenceService/RepositoryModelUnload",
);
self.inner.unary(request.into_request(), path, codec).await
}
pub async fn system_shared_memory_status(
&mut self,
request: impl tonic::IntoRequest<super::SystemSharedMemoryStatusRequest>,
) -> Result<
tonic::Response<super::SystemSharedMemoryStatusResponse>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/inference.GRPCInferenceService/SystemSharedMemoryStatus",
);
self.inner.unary(request.into_request(), path, codec).await
}
pub async fn system_shared_memory_register(
&mut self,
request: impl tonic::IntoRequest<super::SystemSharedMemoryRegisterRequest>,
) -> Result<
tonic::Response<super::SystemSharedMemoryRegisterResponse>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/inference.GRPCInferenceService/SystemSharedMemoryRegister",
);
self.inner.unary(request.into_request(), path, codec).await
}
pub async fn system_shared_memory_unregister(
&mut self,
request: impl tonic::IntoRequest<super::SystemSharedMemoryUnregisterRequest>,
) -> Result<
tonic::Response<super::SystemSharedMemoryUnregisterResponse>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/inference.GRPCInferenceService/SystemSharedMemoryUnregister",
);
self.inner.unary(request.into_request(), path, codec).await
}
pub async fn cuda_shared_memory_status(
&mut self,
request: impl tonic::IntoRequest<super::CudaSharedMemoryStatusRequest>,
) -> Result<
tonic::Response<super::CudaSharedMemoryStatusResponse>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/inference.GRPCInferenceService/CudaSharedMemoryStatus",
);
self.inner.unary(request.into_request(), path, codec).await
}
pub async fn cuda_shared_memory_register(
&mut self,
request: impl tonic::IntoRequest<super::CudaSharedMemoryRegisterRequest>,
) -> Result<
tonic::Response<super::CudaSharedMemoryRegisterResponse>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/inference.GRPCInferenceService/CudaSharedMemoryRegister",
);
self.inner.unary(request.into_request(), path, codec).await
}
pub async fn cuda_shared_memory_unregister(
&mut self,
request: impl tonic::IntoRequest<super::CudaSharedMemoryUnregisterRequest>,
) -> Result<
tonic::Response<super::CudaSharedMemoryUnregisterResponse>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/inference.GRPCInferenceService/CudaSharedMemoryUnregister",
);
self.inner.unary(request.into_request(), path, codec).await
}
pub async fn trace_setting(
&mut self,
request: impl tonic::IntoRequest<super::TraceSettingRequest>,
) -> Result<tonic::Response<super::TraceSettingResponse>, tonic::Status> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/inference.GRPCInferenceService/TraceSetting",
);
self.inner.unary(request.into_request(), path, codec).await
}
pub async fn log_settings(
&mut self,
request: impl tonic::IntoRequest<super::LogSettingsRequest>,
) -> Result<tonic::Response<super::LogSettingsResponse>, tonic::Status> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/inference.GRPCInferenceService/LogSettings",
);
self.inner.unary(request.into_request(), path, codec).await
}
}
}