#[non_exhaustive]pub struct ExplainRequest {
pub endpoint: String,
pub instances: Vec<Value>,
pub parameters: Option<Value>,
pub explanation_spec_override: Option<ExplanationSpecOverride>,
pub deployed_model_id: String,
/* private fields */
}Expand description
Request message for PredictionService.Explain.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.endpoint: StringRequired. The name of the Endpoint requested to serve the explanation.
Format:
projects/{project}/locations/{location}/endpoints/{endpoint}
instances: Vec<Value>Required. The instances that are the input to the explanation call. A DeployedModel may have an upper limit on the number of instances it supports per request, and when it is exceeded the explanation call errors in case of AutoML Models, or, in case of customer created Models, the behaviour is as documented by that Model. The schema of any single instance may be specified via Endpoint’s DeployedModels’ Model’s PredictSchemata’s instance_schema_uri.
parameters: Option<Value>The parameters that govern the prediction. The schema of the parameters may be specified via Endpoint’s DeployedModels’ Model’s PredictSchemata’s parameters_schema_uri.
explanation_spec_override: Option<ExplanationSpecOverride>If specified, overrides the explanation_spec of the DeployedModel. Can be used for explaining prediction results with different configurations, such as:
- Explaining top-5 predictions results as opposed to top-1;
- Increasing path count or step count of the attribution methods to reduce approximate errors;
- Using different baselines for explaining the prediction results.
deployed_model_id: StringIf specified, this ExplainRequest will be served by the chosen DeployedModel, overriding Endpoint.traffic_split.
Implementations§
Source§impl ExplainRequest
impl ExplainRequest
pub fn new() -> Self
Sourcepub fn set_endpoint<T: Into<String>>(self, v: T) -> Self
pub fn set_endpoint<T: Into<String>>(self, v: T) -> Self
Sets the value of endpoint.
Sourcepub fn set_instances<T, V>(self, v: T) -> Self
pub fn set_instances<T, V>(self, v: T) -> Self
Sets the value of instances.
Sourcepub fn set_parameters<T: Into<Option<Value>>>(self, v: T) -> Self
pub fn set_parameters<T: Into<Option<Value>>>(self, v: T) -> Self
Sets the value of parameters.
Sourcepub fn set_explanation_spec_override<T: Into<Option<ExplanationSpecOverride>>>(
self,
v: T,
) -> Self
pub fn set_explanation_spec_override<T: Into<Option<ExplanationSpecOverride>>>( self, v: T, ) -> Self
Sets the value of explanation_spec_override.
Sourcepub fn set_deployed_model_id<T: Into<String>>(self, v: T) -> Self
pub fn set_deployed_model_id<T: Into<String>>(self, v: T) -> Self
Sets the value of deployed_model_id.
Trait Implementations§
Source§impl Clone for ExplainRequest
impl Clone for ExplainRequest
Source§fn clone(&self) -> ExplainRequest
fn clone(&self) -> ExplainRequest
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more