---
title: "POST /v1/{+parent}/evaluations:import"
method: POST
path: "/v1/{+parent}/evaluations:import"
tags: ["projects"]
---

# POST /v1/{+parent}/evaluations:import

`POST /v1/{+parent}/evaluations:import`

Imports an externally generated ModelEvaluation.

## Path parameters

- `parent` string, required

## Request body

- GoogleCloudAiplatformV1ImportModelEvaluationRequest — Request message for ModelService.ImportModelEvaluation
  - `modelEvaluation` GoogleCloudAiplatformV1ModelEvaluation — A collection of metrics calculated by comparing Model's predictions on all of the test data against annotations from the test data.
    - `metricsSchemaUri` string — Points to a YAML file stored on Google Cloud Storage describing the metrics of this ModelEvaluation. The schema is defined as an OpenAPI 3.0.2 [Schema Object](https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.2.md#schemaObject).
    - `annotationSchemaUri` string — Points to a YAML file stored on Google Cloud Storage describing EvaluatedDataItemView.predictions, EvaluatedDataItemView.ground_truths, EvaluatedAnnotation.predictions, and EvaluatedAnnotation.ground_truths. The schema is defined as an OpenAPI 3.0.2 [Schema Object](https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.2.md#schemaObject). This field is not populated if there are neither EvaluatedDataItemViews nor EvaluatedAnnotations under this ModelEvaluation.
    - `metrics` unknown
    - `modelExplanation` GoogleCloudAiplatformV1ModelExplanation — Aggregated explanation metrics for a Model over a set of instances.
      - `meanAttributions` GoogleCloudAiplatformV1Attribution[] — Output only. Aggregated attributions explaining the Model's prediction outputs over the set of instances. The attributions are grouped by outputs. For Models that predict only one output, such as regression Models that predict only one score, there is only one attibution that explains the predicted output. For Models that predict multiple outputs, such as multiclass Models that predict multiple classes, each element explains one specific item. Attribution.output_index can be used to identify which output this attribution is explaining. The baselineOutputValue, instanceOutputValue and featureAttributions fields are averaged over the test data. NOTE: Currently AutoML tabular classification Models produce only one attribution, which averages attributions over all the classes it predicts. Attribution.approximation_error is not populated.
        - `approximationError` number, double — Output only. Error of feature_attributions caused by approximation used in the explanation method. Lower value means more precise attributions. * For Sampled Shapley attribution, increasing path_count might reduce the error. * For Integrated Gradients attribution, increasing step_count might reduce the error. * For XRAI attribution, increasing step_count might reduce the error. See [this introduction](/vertex-ai/docs/explainable-ai/overview) for more information.
        - `instanceOutputValue` number, double — Output only. Model predicted output on the corresponding explanation instance. The field name of the output is determined by the key in ExplanationMetadata.outputs. If the Model predicted output has multiple dimensions, this is the value in the output located by output_index.
        - `baselineOutputValue` number, double — Output only. Model predicted output if the input instance is constructed from the baselines of all the features defined in ExplanationMetadata.inputs. The field name of the output is determined by the key in ExplanationMetadata.outputs. If the Model's predicted output has multiple dimensions (rank > 1), this is the value in the output located by output_index. If there are multiple baselines, their output values are averaged.
        - `featureAttributions` unknown
        - `outputName` string — Output only. Name of the explain output. Specified as the key in ExplanationMetadata.outputs.
        - `outputIndex` integer[] — Output only. The index that locates the explained prediction output. If the prediction output is a scalar value, output_index is not populated. If the prediction output has multiple dimensions, the length of the output_index list is the same as the number of dimensions of the output. The i-th element in output_index is the element index of the i-th dimension of the output vector. Indices start from 0.
        - `outputDisplayName` string — Output only. The display name of the output identified by output_index. For example, the predicted class name by a multi-classification Model. This field is only populated iff the Model predicts display names as a separate field along with the explained output. The predicted display name must has the same shape of the explained output, and can be located using output_index.
    - `dataItemSchemaUri` string — Points to a YAML file stored on Google Cloud Storage describing EvaluatedDataItemView.data_item_payload and EvaluatedAnnotation.data_item_payload. The schema is defined as an OpenAPI 3.0.2 [Schema Object](https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.2.md#schemaObject). This field is not populated if there are neither EvaluatedDataItemViews nor EvaluatedAnnotations under this ModelEvaluation.
    - `explanationSpecs` GoogleCloudAiplatformV1ModelEvaluationModelEvaluationExplanationSpec[] — Describes the values of ExplanationSpec that are used for explaining the predicted values on the evaluated data.
      - `explanationType` string — Explanation type. For AutoML Image Classification models, possible values are: * `image-integrated-gradients` * `image-xrai`
      - `explanationSpec` GoogleCloudAiplatformV1ExplanationSpec — Specification of Model explanation.
        - `parameters` GoogleCloudAiplatformV1ExplanationParameters — Parameters to configure explaining for Model's predictions.
          - `outputIndices` unknown[] — If populated, only returns attributions that have output_index contained in output_indices. It must be an ndarray of integers, with the same shape of the output it's explaining. If not populated, returns attributions for top_k indices of outputs. If neither top_k nor output_indices is populated, returns the argmax index of the outputs. Only applicable to Models that predict multiple outputs (e,g, multi-class Models that predict multiple classes).
            - unknown
          - `xraiAttribution` GoogleCloudAiplatformV1XraiAttribution — An explanation method that redistributes Integrated Gradients attributions to segmented regions, taking advantage of the model's fully differentiable structure. Refer to this paper for more details: https://arxiv.org/abs/1906.02825 Supported only by image Models.
            - `stepCount` integer — Required. The number of steps for approximating the path integral. A good value to start is 50 and gradually increase until the sum to diff property is met within the desired error range. Valid range of its value is [1, 100], inclusively.
            - `blurBaselineConfig` GoogleCloudAiplatformV1BlurBaselineConfig — Config for blur baseline. When enabled, a linear path from the maximally blurred image to the input image is created. Using a blurred baseline instead of zero (black image) is motivated by the BlurIG approach explained here: https://arxiv.org/abs/2004.03383
              - …
            - `smoothGradConfig` GoogleCloudAiplatformV1SmoothGradConfig — Config for SmoothGrad approximation of gradients. When enabled, the gradients are approximated by averaging the gradients from noisy samples in the vicinity of the inputs. Adding noise can help improve the computed gradients. Refer to this paper for more details: https://arxiv.org/pdf/1706.03825.pdf
              - …
          - `examples` GoogleCloudAiplatformV1Examples — Example-based explainability that returns the nearest neighbors from the provided dataset.
            - `presets` GoogleCloudAiplatformV1Presets — Preset configuration for example-based explanations
              - …
            - `neighborCount` integer — The number of neighbors to return when querying for examples.
            - `exampleGcsSource` GoogleCloudAiplatformV1ExamplesExampleGcsSource — The Cloud Storage input instances.
              - …
            - `nearestNeighborSearchConfig` unknown
          - `topK` integer — If populated, returns attributions for top K indices of outputs (defaults to 1). Only applies to Models that predicts more than one outputs (e,g, multi-class Models). When set to -1, returns explanations for all outputs.
          - `sampledShapleyAttribution` GoogleCloudAiplatformV1SampledShapleyAttribution — An attribution method that approximates Shapley values for features that contribute to the label being predicted. A sampling strategy is used to approximate the value rather than considering all subsets of features.
            - `pathCount` integer — Required. The number of feature permutations to consider when approximating the Shapley values. Valid range of its value is [1, 50], inclusively.
          - `integratedGradientsAttribution` GoogleCloudAiplatformV1IntegratedGradientsAttribution — An attribution method that computes the Aumann-Shapley value taking advantage of the model's fully differentiable structure. Refer to this paper for more details: https://arxiv.org/abs/1703.01365
            - `smoothGradConfig` GoogleCloudAiplatformV1SmoothGradConfig — Config for SmoothGrad approximation of gradients. When enabled, the gradients are approximated by averaging the gradients from noisy samples in the vicinity of the inputs. Adding noise can help improve the computed gradients. Refer to this paper for more details: https://arxiv.org/pdf/1706.03825.pdf
              - …
            - `stepCount` integer — Required. The number of steps for approximating the path integral. A good value to start is 50 and gradually increase until the sum to diff property is within the desired error range. Valid range of its value is [1, 100], inclusively.
            - `blurBaselineConfig` GoogleCloudAiplatformV1BlurBaselineConfig — Config for blur baseline. When enabled, a linear path from the maximally blurred image to the input image is created. Using a blurred baseline instead of zero (black image) is motivated by the BlurIG approach explained here: https://arxiv.org/abs/2004.03383
              - …
        - `metadata` GoogleCloudAiplatformV1ExplanationMetadata — Metadata describing the Model's input and output for explanation.
          - `inputs` object — Required. Map from feature names to feature input metadata. Keys are the name of the features. Values are the specification of the feature. An empty InputMetadata is valid. It describes a text feature which has the name specified as the key in ExplanationMetadata.inputs. The baseline of the empty feature is chosen by Vertex AI. For Vertex AI-provided Tensorflow images, the key can be any friendly name of the feature. Once specified, featureAttributions are keyed by this key (if not grouped with another feature). For custom images, the key must match with the key in instance.
          - `featureAttributionsSchemaUri` string — Points to a YAML file stored on Google Cloud Storage describing the format of the feature attributions. The schema is defined as an OpenAPI 3.0.2 [Schema Object](https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.2.md#schemaObject). AutoML tabular Models always have this field populated by Vertex AI. Note: The URI given on output may be different, including the URI scheme, than the one given on input. The output URI will point to a location where the user only has a read access.
          - `latentSpaceSource` string — Name of the source to generate embeddings for example based explanations.
          - `outputs` object — Required. Map from output names to output metadata. For Vertex AI-provided Tensorflow images, keys can be any user defined string that consists of any UTF-8 characters. For custom images, keys are the name of the output field in the prediction to be explained. Currently only one key is allowed.
    - `name` string — Output only. The resource name of the ModelEvaluation.
    - `sliceDimensions` string[] — All possible dimensions of ModelEvaluationSlices. The dimensions can be used as the filter of the ModelService.ListModelEvaluationSlices request, in the form of `slice.dimension = `.
    - `createTime` string, google-datetime — Output only. Timestamp when this ModelEvaluation was created.
    - `displayName` string — The display name of the ModelEvaluation.
    - `metadata` unknown

## Response `200`

Successful response

---

[API](https://skmtc.net/google/apis/aiplatform.md) · [All operations](https://skmtc.net/google/apis/aiplatform/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/google/aiplatform/versions/b608d71b91f0/schema)
