chore: commit generated proto stubs for on-demand training RPCs
The e2e test crate uses pre-generated proto code (no build.rs). Missing stubs for: ReportJobCompletion, ListPendingPromotions, ApprovePromotion, RejectPromotion + message types. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -805,6 +805,81 @@ pub struct StopBatchTuningJobResponse {
|
||||
#[prost(message, repeated, tag = "4")]
|
||||
pub completed_results: ::prost::alloc::vec::Vec<ModelTuningResult>,
|
||||
}
|
||||
#[derive(Clone, PartialEq, ::prost::Message)]
|
||||
pub struct JobCompletionReport {
|
||||
#[prost(string, tag = "1")]
|
||||
pub job_id: ::prost::alloc::string::String,
|
||||
#[prost(string, tag = "2")]
|
||||
pub s3_path: ::prost::alloc::string::String,
|
||||
#[prost(bool, tag = "3")]
|
||||
pub success: bool,
|
||||
#[prost(string, tag = "4")]
|
||||
pub error_message: ::prost::alloc::string::String,
|
||||
#[prost(map = "string, double", tag = "5")]
|
||||
pub metrics: ::std::collections::HashMap<::prost::alloc::string::String, f64>,
|
||||
}
|
||||
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
|
||||
pub struct JobCompletionAck {
|
||||
#[prost(bool, tag = "1")]
|
||||
pub accepted: bool,
|
||||
#[prost(string, tag = "2")]
|
||||
pub promotion_status: ::prost::alloc::string::String,
|
||||
}
|
||||
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
|
||||
pub struct ListPendingPromotionsRequest {}
|
||||
#[derive(Clone, PartialEq, ::prost::Message)]
|
||||
pub struct ListPendingPromotionsResponse {
|
||||
#[prost(message, repeated, tag = "1")]
|
||||
pub promotions: ::prost::alloc::vec::Vec<PendingPromotion>,
|
||||
}
|
||||
#[derive(Clone, PartialEq, ::prost::Message)]
|
||||
pub struct PendingPromotion {
|
||||
#[prost(string, tag = "1")]
|
||||
pub model_id: ::prost::alloc::string::String,
|
||||
#[prost(string, tag = "2")]
|
||||
pub model_type: ::prost::alloc::string::String,
|
||||
#[prost(string, tag = "3")]
|
||||
pub symbol: ::prost::alloc::string::String,
|
||||
#[prost(string, tag = "4")]
|
||||
pub s3_path: ::prost::alloc::string::String,
|
||||
#[prost(map = "string, double", tag = "5")]
|
||||
pub new_metrics: ::std::collections::HashMap<::prost::alloc::string::String, f64>,
|
||||
#[prost(map = "string, double", tag = "6")]
|
||||
pub current_metrics: ::std::collections::HashMap<
|
||||
::prost::alloc::string::String,
|
||||
f64,
|
||||
>,
|
||||
#[prost(int64, tag = "7")]
|
||||
pub trained_at: i64,
|
||||
#[prost(string, tag = "8")]
|
||||
pub job_id: ::prost::alloc::string::String,
|
||||
}
|
||||
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
|
||||
pub struct ApprovePromotionRequest {
|
||||
#[prost(string, tag = "1")]
|
||||
pub model_id: ::prost::alloc::string::String,
|
||||
}
|
||||
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
|
||||
pub struct ApprovePromotionResponse {
|
||||
#[prost(bool, tag = "1")]
|
||||
pub success: bool,
|
||||
#[prost(string, tag = "2")]
|
||||
pub message: ::prost::alloc::string::String,
|
||||
}
|
||||
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
|
||||
pub struct RejectPromotionRequest {
|
||||
#[prost(string, tag = "1")]
|
||||
pub model_id: ::prost::alloc::string::String,
|
||||
#[prost(string, tag = "2")]
|
||||
pub reason: ::prost::alloc::string::String,
|
||||
}
|
||||
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
|
||||
pub struct RejectPromotionResponse {
|
||||
#[prost(bool, tag = "1")]
|
||||
pub success: bool,
|
||||
#[prost(string, tag = "2")]
|
||||
pub message: ::prost::alloc::string::String,
|
||||
}
|
||||
/// Type of progress update
|
||||
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
|
||||
#[repr(i32)]
|
||||
@@ -1551,5 +1626,117 @@ pub mod ml_training_service_client {
|
||||
);
|
||||
self.inner.unary(req, path, codec).await
|
||||
}
|
||||
/// Job Completion Callback (called by training-uploader sidecar)
|
||||
pub async fn report_job_completion(
|
||||
&mut self,
|
||||
request: impl tonic::IntoRequest<super::JobCompletionReport>,
|
||||
) -> std::result::Result<
|
||||
tonic::Response<super::JobCompletionAck>,
|
||||
tonic::Status,
|
||||
> {
|
||||
self.inner
|
||||
.ready()
|
||||
.await
|
||||
.map_err(|e| {
|
||||
tonic::Status::unknown(
|
||||
format!("Service was not ready: {}", e.into()),
|
||||
)
|
||||
})?;
|
||||
let codec = tonic_prost::ProstCodec::default();
|
||||
let path = http::uri::PathAndQuery::from_static(
|
||||
"/ml_training.MLTrainingService/ReportJobCompletion",
|
||||
);
|
||||
let mut req = request.into_request();
|
||||
req.extensions_mut()
|
||||
.insert(
|
||||
GrpcMethod::new(
|
||||
"ml_training.MLTrainingService",
|
||||
"ReportJobCompletion",
|
||||
),
|
||||
);
|
||||
self.inner.unary(req, path, codec).await
|
||||
}
|
||||
/// Model Promotion Management
|
||||
pub async fn list_pending_promotions(
|
||||
&mut self,
|
||||
request: impl tonic::IntoRequest<super::ListPendingPromotionsRequest>,
|
||||
) -> std::result::Result<
|
||||
tonic::Response<super::ListPendingPromotionsResponse>,
|
||||
tonic::Status,
|
||||
> {
|
||||
self.inner
|
||||
.ready()
|
||||
.await
|
||||
.map_err(|e| {
|
||||
tonic::Status::unknown(
|
||||
format!("Service was not ready: {}", e.into()),
|
||||
)
|
||||
})?;
|
||||
let codec = tonic_prost::ProstCodec::default();
|
||||
let path = http::uri::PathAndQuery::from_static(
|
||||
"/ml_training.MLTrainingService/ListPendingPromotions",
|
||||
);
|
||||
let mut req = request.into_request();
|
||||
req.extensions_mut()
|
||||
.insert(
|
||||
GrpcMethod::new(
|
||||
"ml_training.MLTrainingService",
|
||||
"ListPendingPromotions",
|
||||
),
|
||||
);
|
||||
self.inner.unary(req, path, codec).await
|
||||
}
|
||||
pub async fn approve_promotion(
|
||||
&mut self,
|
||||
request: impl tonic::IntoRequest<super::ApprovePromotionRequest>,
|
||||
) -> std::result::Result<
|
||||
tonic::Response<super::ApprovePromotionResponse>,
|
||||
tonic::Status,
|
||||
> {
|
||||
self.inner
|
||||
.ready()
|
||||
.await
|
||||
.map_err(|e| {
|
||||
tonic::Status::unknown(
|
||||
format!("Service was not ready: {}", e.into()),
|
||||
)
|
||||
})?;
|
||||
let codec = tonic_prost::ProstCodec::default();
|
||||
let path = http::uri::PathAndQuery::from_static(
|
||||
"/ml_training.MLTrainingService/ApprovePromotion",
|
||||
);
|
||||
let mut req = request.into_request();
|
||||
req.extensions_mut()
|
||||
.insert(
|
||||
GrpcMethod::new("ml_training.MLTrainingService", "ApprovePromotion"),
|
||||
);
|
||||
self.inner.unary(req, path, codec).await
|
||||
}
|
||||
pub async fn reject_promotion(
|
||||
&mut self,
|
||||
request: impl tonic::IntoRequest<super::RejectPromotionRequest>,
|
||||
) -> std::result::Result<
|
||||
tonic::Response<super::RejectPromotionResponse>,
|
||||
tonic::Status,
|
||||
> {
|
||||
self.inner
|
||||
.ready()
|
||||
.await
|
||||
.map_err(|e| {
|
||||
tonic::Status::unknown(
|
||||
format!("Service was not ready: {}", e.into()),
|
||||
)
|
||||
})?;
|
||||
let codec = tonic_prost::ProstCodec::default();
|
||||
let path = http::uri::PathAndQuery::from_static(
|
||||
"/ml_training.MLTrainingService/RejectPromotion",
|
||||
);
|
||||
let mut req = request.into_request();
|
||||
req.extensions_mut()
|
||||
.insert(
|
||||
GrpcMethod::new("ml_training.MLTrainingService", "RejectPromotion"),
|
||||
);
|
||||
self.inner.unary(req, path, codec).await
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user