diff --git a/aiplatform/snippets/src/main/java/aiplatform/GetModelEvaluationImageClassificationSample.java b/aiplatform/snippets/src/main/java/aiplatform/GetModelEvaluationImageClassificationSample.java index 7c1a3bfad6a..dbd251732b3 100644 --- a/aiplatform/snippets/src/main/java/aiplatform/GetModelEvaluationImageClassificationSample.java +++ b/aiplatform/snippets/src/main/java/aiplatform/GetModelEvaluationImageClassificationSample.java @@ -18,12 +18,10 @@ // [START aiplatform_get_model_evaluation_image_classification_sample] -import com.google.cloud.aiplatform.v1beta1.Attribution; -import com.google.cloud.aiplatform.v1beta1.ModelEvaluation; -import com.google.cloud.aiplatform.v1beta1.ModelEvaluationName; -import com.google.cloud.aiplatform.v1beta1.ModelExplanation; -import com.google.cloud.aiplatform.v1beta1.ModelServiceClient; -import com.google.cloud.aiplatform.v1beta1.ModelServiceSettings; +import com.google.cloud.aiplatform.v1.ModelEvaluation; +import com.google.cloud.aiplatform.v1.ModelEvaluationName; +import com.google.cloud.aiplatform.v1.ModelServiceClient; +import com.google.cloud.aiplatform.v1.ModelServiceSettings; import java.io.IOException; public class GetModelEvaluationImageClassificationSample { @@ -59,19 +57,6 @@ static void getModelEvaluationImageClassificationSample( System.out.format("Metrics: %s\n", modelEvaluation.getMetrics()); System.out.format("Create Time: %s\n", modelEvaluation.getCreateTime()); System.out.format("Slice Dimensions: %s\n", modelEvaluation.getSliceDimensionsList()); - - ModelExplanation modelExplanation = modelEvaluation.getModelExplanation(); - for (Attribution attribution : modelExplanation.getMeanAttributionsList()) { - System.out.println("\t\tMean Attribution"); - System.out.format( - "\t\t\tBaseline Output Value: %s\n", attribution.getBaselineOutputValue()); - System.out.format( - "\t\t\tInstance Output Value: %s\n", attribution.getInstanceOutputValue()); - System.out.format("\t\t\tFeature Attributions: %s\n", attribution.getFeatureAttributions()); - System.out.format("\t\t\tOutput Index: %s\n", attribution.getOutputIndexList()); - System.out.format("\t\t\tOutput Display Name: %s\n", attribution.getOutputDisplayName()); - System.out.format("\t\t\tApproximation Error: %s\n", attribution.getApproximationError()); - } } } } diff --git a/aiplatform/snippets/src/main/java/aiplatform/GetModelEvaluationImageObjectDetectionSample.java b/aiplatform/snippets/src/main/java/aiplatform/GetModelEvaluationImageObjectDetectionSample.java index cd8f7a1cb43..9d614c3a952 100644 --- a/aiplatform/snippets/src/main/java/aiplatform/GetModelEvaluationImageObjectDetectionSample.java +++ b/aiplatform/snippets/src/main/java/aiplatform/GetModelEvaluationImageObjectDetectionSample.java @@ -18,12 +18,10 @@ // [START aiplatform_get_model_evaluation_image_object_detection_sample] -import com.google.cloud.aiplatform.v1beta1.Attribution; -import com.google.cloud.aiplatform.v1beta1.ModelEvaluation; -import com.google.cloud.aiplatform.v1beta1.ModelEvaluationName; -import com.google.cloud.aiplatform.v1beta1.ModelExplanation; -import com.google.cloud.aiplatform.v1beta1.ModelServiceClient; -import com.google.cloud.aiplatform.v1beta1.ModelServiceSettings; +import com.google.cloud.aiplatform.v1.ModelEvaluation; +import com.google.cloud.aiplatform.v1.ModelEvaluationName; +import com.google.cloud.aiplatform.v1.ModelServiceClient; +import com.google.cloud.aiplatform.v1.ModelServiceSettings; import java.io.IOException; public class GetModelEvaluationImageObjectDetectionSample { @@ -59,19 +57,6 @@ static void getModelEvaluationImageObjectDetectionSample( System.out.format("\tMetrics: %s\n", modelEvaluation.getMetrics()); System.out.format("\tCreate Time: %s\n", modelEvaluation.getCreateTime()); System.out.format("\tSlice Dimensions: %s\n", modelEvaluation.getSliceDimensionsList()); - - ModelExplanation modelExplanation = modelEvaluation.getModelExplanation(); - for (Attribution attribution : modelExplanation.getMeanAttributionsList()) { - System.out.println("\t\tMean Attribution"); - System.out.format( - "\t\t\tBaseline Output Value: %s\n", attribution.getBaselineOutputValue()); - System.out.format( - "\t\t\tInstance Output Value: %s\n", attribution.getInstanceOutputValue()); - System.out.format("\t\t\tFeature Attributions: %s\n", attribution.getFeatureAttributions()); - System.out.format("\t\t\tOutput Index: %s\n", attribution.getOutputIndexList()); - System.out.format("\t\t\tOutput Display Name: %s\n", attribution.getOutputDisplayName()); - System.out.format("\t\t\tApproximation Error: %s\n", attribution.getApproximationError()); - } } } } diff --git a/aiplatform/snippets/src/main/java/aiplatform/GetModelEvaluationSample.java b/aiplatform/snippets/src/main/java/aiplatform/GetModelEvaluationSample.java index f93fa57bb86..4944dda1c1d 100644 --- a/aiplatform/snippets/src/main/java/aiplatform/GetModelEvaluationSample.java +++ b/aiplatform/snippets/src/main/java/aiplatform/GetModelEvaluationSample.java @@ -18,10 +18,10 @@ // [START aiplatform_get_model_evaluation_sample] -import com.google.cloud.aiplatform.v1beta1.ModelEvaluation; -import com.google.cloud.aiplatform.v1beta1.ModelEvaluationName; -import com.google.cloud.aiplatform.v1beta1.ModelServiceClient; -import com.google.cloud.aiplatform.v1beta1.ModelServiceSettings; +import com.google.cloud.aiplatform.v1.ModelEvaluation; +import com.google.cloud.aiplatform.v1.ModelEvaluationName; +import com.google.cloud.aiplatform.v1.ModelServiceClient; +import com.google.cloud.aiplatform.v1.ModelServiceSettings; import java.io.IOException; public class GetModelEvaluationSample { diff --git a/aiplatform/snippets/src/main/java/aiplatform/GetModelEvaluationSliceSample.java b/aiplatform/snippets/src/main/java/aiplatform/GetModelEvaluationSliceSample.java index b33c9bcf171..beaf29c6b76 100644 --- a/aiplatform/snippets/src/main/java/aiplatform/GetModelEvaluationSliceSample.java +++ b/aiplatform/snippets/src/main/java/aiplatform/GetModelEvaluationSliceSample.java @@ -18,11 +18,11 @@ // [START aiplatform_get_model_evaluation_slice_sample] -import com.google.cloud.aiplatform.v1beta1.ModelEvaluationSlice; -import com.google.cloud.aiplatform.v1beta1.ModelEvaluationSlice.Slice; -import com.google.cloud.aiplatform.v1beta1.ModelEvaluationSliceName; -import com.google.cloud.aiplatform.v1beta1.ModelServiceClient; -import com.google.cloud.aiplatform.v1beta1.ModelServiceSettings; +import com.google.cloud.aiplatform.v1.ModelEvaluationSlice; +import com.google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice; +import com.google.cloud.aiplatform.v1.ModelEvaluationSliceName; +import com.google.cloud.aiplatform.v1.ModelServiceClient; +import com.google.cloud.aiplatform.v1.ModelServiceSettings; import java.io.IOException; public class GetModelEvaluationSliceSample { diff --git a/aiplatform/snippets/src/main/java/aiplatform/GetModelEvaluationTabularClassificationSample.java b/aiplatform/snippets/src/main/java/aiplatform/GetModelEvaluationTabularClassificationSample.java index e347bf820d6..6e9de13512f 100644 --- a/aiplatform/snippets/src/main/java/aiplatform/GetModelEvaluationTabularClassificationSample.java +++ b/aiplatform/snippets/src/main/java/aiplatform/GetModelEvaluationTabularClassificationSample.java @@ -18,12 +18,10 @@ // [START aiplatform_get_model_evaluation_tabular_classification_sample] -import com.google.cloud.aiplatform.v1beta1.Attribution; -import com.google.cloud.aiplatform.v1beta1.ModelEvaluation; -import com.google.cloud.aiplatform.v1beta1.ModelEvaluationName; -import com.google.cloud.aiplatform.v1beta1.ModelExplanation; -import com.google.cloud.aiplatform.v1beta1.ModelServiceClient; -import com.google.cloud.aiplatform.v1beta1.ModelServiceSettings; +import com.google.cloud.aiplatform.v1.ModelEvaluation; +import com.google.cloud.aiplatform.v1.ModelEvaluationName; +import com.google.cloud.aiplatform.v1.ModelServiceClient; +import com.google.cloud.aiplatform.v1.ModelServiceSettings; import java.io.IOException; public class GetModelEvaluationTabularClassificationSample { @@ -58,20 +56,6 @@ static void getModelEvaluationTabularClassification( System.out.format("\tMetrics: %s\n", modelEvaluation.getMetrics()); System.out.format("\tCreate Time: %s\n", modelEvaluation.getCreateTime()); System.out.format("\tSlice Dimensions: %s\n", modelEvaluation.getSliceDimensionsList()); - ModelExplanation modelExplanation = modelEvaluation.getModelExplanation(); - - System.out.println("\tModel Explanation"); - for (Attribution attribution : modelExplanation.getMeanAttributionsList()) { - System.out.println("\t\tMean Attributions"); - System.out.format( - "\t\t\tBaseline Output value: %s\n", attribution.getBaselineOutputValue()); - System.out.format( - "\t\t\tInstance Output value: %s\n", attribution.getInstanceOutputValue()); - System.out.format("\t\t\tFeature attributions: %s\n", attribution.getFeatureAttributions()); - System.out.format("\t\t\tOutput Index: %s\n", attribution.getOutputIndexList()); - System.out.format("\t\t\tOutput Index Name: %s\n", attribution.getOutputDisplayName()); - System.out.format("\t\t\tApproximation Error: %s\n", attribution.getApproximationError()); - } } } } diff --git a/aiplatform/snippets/src/main/java/aiplatform/GetModelEvaluationTabularRegressionSample.java b/aiplatform/snippets/src/main/java/aiplatform/GetModelEvaluationTabularRegressionSample.java index bc9910a793b..63b3bbf679b 100644 --- a/aiplatform/snippets/src/main/java/aiplatform/GetModelEvaluationTabularRegressionSample.java +++ b/aiplatform/snippets/src/main/java/aiplatform/GetModelEvaluationTabularRegressionSample.java @@ -18,12 +18,10 @@ // [START aiplatform_get_model_evaluation_tabular_regression_sample] -import com.google.cloud.aiplatform.v1beta1.Attribution; -import com.google.cloud.aiplatform.v1beta1.ModelEvaluation; -import com.google.cloud.aiplatform.v1beta1.ModelEvaluationName; -import com.google.cloud.aiplatform.v1beta1.ModelExplanation; -import com.google.cloud.aiplatform.v1beta1.ModelServiceClient; -import com.google.cloud.aiplatform.v1beta1.ModelServiceSettings; +import com.google.cloud.aiplatform.v1.ModelEvaluation; +import com.google.cloud.aiplatform.v1.ModelEvaluationName; +import com.google.cloud.aiplatform.v1.ModelServiceClient; +import com.google.cloud.aiplatform.v1.ModelServiceSettings; import java.io.IOException; public class GetModelEvaluationTabularRegressionSample { @@ -58,20 +56,6 @@ static void getModelEvaluationTabularRegression( System.out.format("\tMetrics: %s\n", modelEvaluation.getMetrics()); System.out.format("\tCreate Time: %s\n", modelEvaluation.getCreateTime()); System.out.format("\tSlice Dimensions: %s\n", modelEvaluation.getSliceDimensionsList()); - ModelExplanation modelExplanation = modelEvaluation.getModelExplanation(); - - System.out.println("\tModel Explanation"); - for (Attribution attribution : modelExplanation.getMeanAttributionsList()) { - System.out.println("\t\tMean Attributions"); - System.out.format( - "\t\t\tBaseline Output value: %s\n", attribution.getBaselineOutputValue()); - System.out.format( - "\t\t\tInstance Output value: %s\n", attribution.getInstanceOutputValue()); - System.out.format("\t\t\tFeature attributions: %s\n", attribution.getFeatureAttributions()); - System.out.format("\t\t\tOutput Index: %s\n", attribution.getOutputIndexList()); - System.out.format("\t\t\tOutput Index Name: %s\n", attribution.getOutputDisplayName()); - System.out.format("\t\t\tApproximation Error: %s\n", attribution.getApproximationError()); - } } } } diff --git a/aiplatform/snippets/src/main/java/aiplatform/GetModelEvaluationTextClassificationSample.java b/aiplatform/snippets/src/main/java/aiplatform/GetModelEvaluationTextClassificationSample.java index 68820041ebe..8b6c021ece9 100644 --- a/aiplatform/snippets/src/main/java/aiplatform/GetModelEvaluationTextClassificationSample.java +++ b/aiplatform/snippets/src/main/java/aiplatform/GetModelEvaluationTextClassificationSample.java @@ -18,12 +18,10 @@ // [START aiplatform_get_model_evaluation_text_classification_sample] -import com.google.cloud.aiplatform.v1beta1.Attribution; -import com.google.cloud.aiplatform.v1beta1.ModelEvaluation; -import com.google.cloud.aiplatform.v1beta1.ModelEvaluationName; -import com.google.cloud.aiplatform.v1beta1.ModelExplanation; -import com.google.cloud.aiplatform.v1beta1.ModelServiceClient; -import com.google.cloud.aiplatform.v1beta1.ModelServiceSettings; +import com.google.cloud.aiplatform.v1.ModelEvaluation; +import com.google.cloud.aiplatform.v1.ModelEvaluationName; +import com.google.cloud.aiplatform.v1.ModelServiceClient; +import com.google.cloud.aiplatform.v1.ModelServiceSettings; import java.io.IOException; public class GetModelEvaluationTextClassificationSample { @@ -60,21 +58,6 @@ static void getModelEvaluationTextClassificationSample( System.out.format("\tMetrics: %s\n", modelEvaluation.getMetrics()); System.out.format("\tCreate Time: %s\n", modelEvaluation.getCreateTime()); System.out.format("\tSlice Dimensions: %s\n", modelEvaluation.getSliceDimensionsList()); - - System.out.println("\tModel Explanation"); - ModelExplanation modelExplanation = modelEvaluation.getModelExplanation(); - for (Attribution attribution : modelExplanation.getMeanAttributionsList()) { - - System.out.println("\t\tMean Attribution"); - System.out.format( - "\t\t\tBaseline Output Value: %s\n", attribution.getBaselineOutputValue()); - System.out.format( - "\t\t\tInstance Output Value: %s\n", attribution.getInstanceOutputValue()); - System.out.format("\t\t\tFeature Attributions: %s\n", attribution.getFeatureAttributions()); - System.out.format("\t\t\tOutput Index: %s\n", attribution.getOutputIndexList()); - System.out.format("\t\t\tOutput Display Name: %s\n", attribution.getOutputDisplayName()); - System.out.format("\t\t\tApproximation Error: %s\n", attribution.getApproximationError()); - } } } } diff --git a/aiplatform/snippets/src/main/java/aiplatform/GetModelEvaluationTextEntityExtractionSample.java b/aiplatform/snippets/src/main/java/aiplatform/GetModelEvaluationTextEntityExtractionSample.java index d85f9d3f3af..afc2590b6f3 100644 --- a/aiplatform/snippets/src/main/java/aiplatform/GetModelEvaluationTextEntityExtractionSample.java +++ b/aiplatform/snippets/src/main/java/aiplatform/GetModelEvaluationTextEntityExtractionSample.java @@ -18,12 +18,10 @@ // [START aiplatform_get_model_evaluation_text_entity_extraction_sample] -import com.google.cloud.aiplatform.v1beta1.Attribution; -import com.google.cloud.aiplatform.v1beta1.ModelEvaluation; -import com.google.cloud.aiplatform.v1beta1.ModelEvaluationName; -import com.google.cloud.aiplatform.v1beta1.ModelExplanation; -import com.google.cloud.aiplatform.v1beta1.ModelServiceClient; -import com.google.cloud.aiplatform.v1beta1.ModelServiceSettings; +import com.google.cloud.aiplatform.v1.ModelEvaluation; +import com.google.cloud.aiplatform.v1.ModelEvaluationName; +import com.google.cloud.aiplatform.v1.ModelServiceClient; +import com.google.cloud.aiplatform.v1.ModelServiceSettings; import java.io.IOException; public class GetModelEvaluationTextEntityExtractionSample { @@ -60,21 +58,6 @@ static void getModelEvaluationTextEntityExtractionSample( System.out.format("\tMetrics: %s\n", modelEvaluation.getMetrics()); System.out.format("\tCreate Time: %s\n", modelEvaluation.getCreateTime()); System.out.format("\tSlice Dimensions: %s\n", modelEvaluation.getSliceDimensionsList()); - - System.out.println("\tModel Explanation"); - ModelExplanation modelExplanation = modelEvaluation.getModelExplanation(); - for (Attribution attribution : modelExplanation.getMeanAttributionsList()) { - - System.out.println("\t\tMean Attribution"); - System.out.format( - "\t\t\tBaseline Output Value: %s\n", attribution.getBaselineOutputValue()); - System.out.format( - "\t\t\tInstance Output Value: %s\n", attribution.getInstanceOutputValue()); - System.out.format("\t\t\tFeature Attributions: %s\n", attribution.getFeatureAttributions()); - System.out.format("\t\t\tOutput Index: %s\n", attribution.getOutputIndexList()); - System.out.format("\t\t\tOutput Display Name: %s\n", attribution.getOutputDisplayName()); - System.out.format("\t\t\tApproximation Error: %s\n", attribution.getApproximationError()); - } } } } diff --git a/aiplatform/snippets/src/main/java/aiplatform/GetModelEvaluationTextSentimentAnalysisSample.java b/aiplatform/snippets/src/main/java/aiplatform/GetModelEvaluationTextSentimentAnalysisSample.java index 0ccd5286898..cddd7f918f6 100644 --- a/aiplatform/snippets/src/main/java/aiplatform/GetModelEvaluationTextSentimentAnalysisSample.java +++ b/aiplatform/snippets/src/main/java/aiplatform/GetModelEvaluationTextSentimentAnalysisSample.java @@ -18,12 +18,10 @@ // [START aiplatform_get_model_evaluation_text_sentiment_analysis_sample] -import com.google.cloud.aiplatform.v1beta1.Attribution; -import com.google.cloud.aiplatform.v1beta1.ModelEvaluation; -import com.google.cloud.aiplatform.v1beta1.ModelEvaluationName; -import com.google.cloud.aiplatform.v1beta1.ModelExplanation; -import com.google.cloud.aiplatform.v1beta1.ModelServiceClient; -import com.google.cloud.aiplatform.v1beta1.ModelServiceSettings; +import com.google.cloud.aiplatform.v1.ModelEvaluation; +import com.google.cloud.aiplatform.v1.ModelEvaluationName; +import com.google.cloud.aiplatform.v1.ModelServiceClient; +import com.google.cloud.aiplatform.v1.ModelServiceSettings; import java.io.IOException; public class GetModelEvaluationTextSentimentAnalysisSample { @@ -60,21 +58,6 @@ static void getModelEvaluationTextSentimentAnalysisSample( System.out.format("\tMetrics: %s\n", modelEvaluation.getMetrics()); System.out.format("\tCreate Time: %s\n", modelEvaluation.getCreateTime()); System.out.format("\tSlice Dimensions: %s\n", modelEvaluation.getSliceDimensionsList()); - - System.out.println("\tModel Explanation"); - ModelExplanation modelExplanation = modelEvaluation.getModelExplanation(); - for (Attribution attribution : modelExplanation.getMeanAttributionsList()) { - - System.out.println("\t\tMean Attribution"); - System.out.format( - "\t\t\tBaseline Output Value: %s\n", attribution.getBaselineOutputValue()); - System.out.format( - "\t\t\tInstance Output Value: %s\n", attribution.getInstanceOutputValue()); - System.out.format("\t\t\tFeature Attributions: %s\n", attribution.getFeatureAttributions()); - System.out.format("\t\t\tOutput Index: %s\n", attribution.getOutputIndexList()); - System.out.format("\t\t\tOutput Display Name: %s\n", attribution.getOutputDisplayName()); - System.out.format("\t\t\tApproximation Error: %s\n", attribution.getApproximationError()); - } } } } diff --git a/aiplatform/snippets/src/main/java/aiplatform/GetModelEvaluationVideoActionRecognitionSample.java b/aiplatform/snippets/src/main/java/aiplatform/GetModelEvaluationVideoActionRecognitionSample.java index 2685e23f1a0..0621bc9a5ee 100644 --- a/aiplatform/snippets/src/main/java/aiplatform/GetModelEvaluationVideoActionRecognitionSample.java +++ b/aiplatform/snippets/src/main/java/aiplatform/GetModelEvaluationVideoActionRecognitionSample.java @@ -17,10 +17,10 @@ package aiplatform; // [START aiplatform_get_model_evaluation_video_action_recognition_sample] -import com.google.cloud.aiplatform.v1beta1.ModelEvaluation; -import com.google.cloud.aiplatform.v1beta1.ModelEvaluationName; -import com.google.cloud.aiplatform.v1beta1.ModelServiceClient; -import com.google.cloud.aiplatform.v1beta1.ModelServiceSettings; +import com.google.cloud.aiplatform.v1.ModelEvaluation; +import com.google.cloud.aiplatform.v1.ModelEvaluationName; +import com.google.cloud.aiplatform.v1.ModelServiceClient; +import com.google.cloud.aiplatform.v1.ModelServiceSettings; import java.io.IOException; public class GetModelEvaluationVideoActionRecognitionSample { diff --git a/aiplatform/snippets/src/main/java/aiplatform/GetModelEvaluationVideoClassificationSample.java b/aiplatform/snippets/src/main/java/aiplatform/GetModelEvaluationVideoClassificationSample.java index 5dc3d85ab43..c4047d3c1d8 100644 --- a/aiplatform/snippets/src/main/java/aiplatform/GetModelEvaluationVideoClassificationSample.java +++ b/aiplatform/snippets/src/main/java/aiplatform/GetModelEvaluationVideoClassificationSample.java @@ -18,10 +18,10 @@ // [START aiplatform_get_model_evaluation_video_classification_sample] -import com.google.cloud.aiplatform.v1beta1.ModelEvaluation; -import com.google.cloud.aiplatform.v1beta1.ModelEvaluationName; -import com.google.cloud.aiplatform.v1beta1.ModelServiceClient; -import com.google.cloud.aiplatform.v1beta1.ModelServiceSettings; +import com.google.cloud.aiplatform.v1.ModelEvaluation; +import com.google.cloud.aiplatform.v1.ModelEvaluationName; +import com.google.cloud.aiplatform.v1.ModelServiceClient; +import com.google.cloud.aiplatform.v1.ModelServiceSettings; import java.io.IOException; public class GetModelEvaluationVideoClassificationSample { diff --git a/aiplatform/snippets/src/main/java/aiplatform/GetModelEvaluationVideoObjectTrackingSample.java b/aiplatform/snippets/src/main/java/aiplatform/GetModelEvaluationVideoObjectTrackingSample.java index 8cd4ccb5905..012aad2310f 100644 --- a/aiplatform/snippets/src/main/java/aiplatform/GetModelEvaluationVideoObjectTrackingSample.java +++ b/aiplatform/snippets/src/main/java/aiplatform/GetModelEvaluationVideoObjectTrackingSample.java @@ -18,10 +18,10 @@ // [START aiplatform_get_model_evaluation_object_tracking_sample] -import com.google.cloud.aiplatform.v1beta1.ModelEvaluation; -import com.google.cloud.aiplatform.v1beta1.ModelEvaluationName; -import com.google.cloud.aiplatform.v1beta1.ModelServiceClient; -import com.google.cloud.aiplatform.v1beta1.ModelServiceSettings; +import com.google.cloud.aiplatform.v1.ModelEvaluation; +import com.google.cloud.aiplatform.v1.ModelEvaluationName; +import com.google.cloud.aiplatform.v1.ModelServiceClient; +import com.google.cloud.aiplatform.v1.ModelServiceSettings; import java.io.IOException; public class GetModelEvaluationVideoObjectTrackingSample {