use of com.google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice in project java-aiplatform by googleapis.
the class GetModelEvaluationVideoClassificationSample method getModelEvaluationVideoClassification.
static void getModelEvaluationVideoClassification(String project, String modelId, String evaluationId) throws IOException {
ModelServiceSettings modelServiceSettings = ModelServiceSettings.newBuilder().setEndpoint("us-central1-aiplatform.googleapis.com:443").build();
// the "close" method on the client to safely clean up any remaining background resources.
try (ModelServiceClient modelServiceClient = ModelServiceClient.create(modelServiceSettings)) {
String location = "us-central1";
ModelEvaluationName modelEvaluationName = ModelEvaluationName.of(project, location, modelId, evaluationId);
ModelEvaluation modelEvaluation = modelServiceClient.getModelEvaluation(modelEvaluationName);
System.out.println("Get Model Evaluation Video Classification Response");
System.out.format("Name: %s\n", modelEvaluation.getName());
System.out.format("Metrics Schema Uri: %s\n", modelEvaluation.getMetricsSchemaUri());
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());
}
}
use of com.google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice in project java-aiplatform by googleapis.
the class GetModelEvaluationVideoObjectTrackingSample method getModelEvaluationVideoObjectTracking.
static void getModelEvaluationVideoObjectTracking(String project, String modelId, String evaluationId) throws IOException {
ModelServiceSettings modelServiceSettings = ModelServiceSettings.newBuilder().setEndpoint("us-central1-aiplatform.googleapis.com:443").build();
// the "close" method on the client to safely clean up any remaining background resources.
try (ModelServiceClient modelServiceClient = ModelServiceClient.create(modelServiceSettings)) {
String location = "us-central1";
ModelEvaluationName modelEvaluationName = ModelEvaluationName.of(project, location, modelId, evaluationId);
ModelEvaluation modelEvaluation = modelServiceClient.getModelEvaluation(modelEvaluationName);
System.out.println("Get Model Evaluation Video Object Tracking Response");
System.out.format("Name: %s\n", modelEvaluation.getName());
System.out.format("Metrics Schema Uri: %s\n", modelEvaluation.getMetricsSchemaUri());
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());
}
}
use of com.google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice in project java-aiplatform by googleapis.
the class ListModelEvaluationSliceSample method listModelEvaluationSliceSample.
static void listModelEvaluationSliceSample(String project, String modelId, String evaluationId) throws IOException {
ModelServiceSettings modelServiceSettings = ModelServiceSettings.newBuilder().setEndpoint("us-central1-aiplatform.googleapis.com:443").build();
// the "close" method on the client to safely clean up any remaining background resources.
try (ModelServiceClient modelServiceClient = ModelServiceClient.create(modelServiceSettings)) {
String location = "us-central1";
ModelEvaluationName modelEvaluationName = ModelEvaluationName.of(project, location, modelId, evaluationId);
for (ModelEvaluationSlice modelEvaluationSlice : modelServiceClient.listModelEvaluationSlices(modelEvaluationName).iterateAll()) {
System.out.format("Model Evaluation Slice Name: %s\n", modelEvaluationSlice.getName());
System.out.format("Metrics Schema Uri: %s\n", modelEvaluationSlice.getMetricsSchemaUri());
System.out.format("Metrics: %s\n", modelEvaluationSlice.getMetrics());
System.out.format("Create Time: %s\n", modelEvaluationSlice.getCreateTime());
Slice slice = modelEvaluationSlice.getSlice();
System.out.format("Slice Dimensions: %s\n", slice.getDimension());
System.out.format("Slice Value: %s\n\n", slice.getValue());
}
}
}
use of com.google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice in project java-aiplatform by googleapis.
the class GetModelEvaluationImageClassificationSample method getModelEvaluationImageClassificationSample.
static void getModelEvaluationImageClassificationSample(String project, String modelId, String evaluationId) throws IOException {
ModelServiceSettings modelServiceSettings = ModelServiceSettings.newBuilder().setEndpoint("us-central1-aiplatform.googleapis.com:443").build();
// the "close" method on the client to safely clean up any remaining background resources.
try (ModelServiceClient modelServiceClient = ModelServiceClient.create(modelServiceSettings)) {
String location = "us-central1";
ModelEvaluationName modelEvaluationName = ModelEvaluationName.of(project, location, modelId, evaluationId);
ModelEvaluation modelEvaluation = modelServiceClient.getModelEvaluation(modelEvaluationName);
System.out.println("Get Model Evaluation Image Classification Response");
System.out.format("Model Name: %s\n", modelEvaluation.getName());
System.out.format("Metrics Schema Uri: %s\n", modelEvaluation.getMetricsSchemaUri());
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());
}
}
use of com.google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice in project java-aiplatform by googleapis.
the class GetModelEvaluationSample method getModelEvaluationSample.
static void getModelEvaluationSample(String project, String modelId, String evaluationId) throws IOException {
ModelServiceSettings modelServiceSettings = ModelServiceSettings.newBuilder().setEndpoint("us-central1-aiplatform.googleapis.com:443").build();
// the "close" method on the client to safely clean up any remaining background resources.
try (ModelServiceClient modelServiceClient = ModelServiceClient.create(modelServiceSettings)) {
String location = "us-central1";
ModelEvaluationName modelEvaluationName = ModelEvaluationName.of(project, location, modelId, evaluationId);
ModelEvaluation modelEvaluation = modelServiceClient.getModelEvaluation(modelEvaluationName);
System.out.println("Get Model Evaluation Response");
System.out.format("Model Name: %s\n", modelEvaluation.getName());
System.out.format("Metrics Schema Uri: %s\n", modelEvaluation.getMetricsSchemaUri());
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());
}
}
Aggregations