Search in sources :

Example 1 with ModelServiceClient

use of com.google.cloud.aiplatform.v1.ModelServiceClient in project java-aiplatform by googleapis.

the class GetModelEvaluationTextEntityExtractionSample method getModelEvaluationTextEntityExtractionSample.

static void getModelEvaluationTextEntityExtractionSample(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 Text Entity Extraction Response");
        System.out.format("\tModel Name: %s\n", modelEvaluation.getName());
        System.out.format("\tMetrics Schema Uri: %s\n", modelEvaluation.getMetricsSchemaUri());
        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());
    }
}
Also used : ModelEvaluationName(com.google.cloud.aiplatform.v1.ModelEvaluationName) ModelEvaluation(com.google.cloud.aiplatform.v1.ModelEvaluation) ModelServiceSettings(com.google.cloud.aiplatform.v1.ModelServiceSettings) ModelServiceClient(com.google.cloud.aiplatform.v1.ModelServiceClient)

Example 2 with ModelServiceClient

use of com.google.cloud.aiplatform.v1.ModelServiceClient in project java-aiplatform by googleapis.

the class GetModelEvaluationTextSentimentAnalysisSample method getModelEvaluationTextSentimentAnalysisSample.

static void getModelEvaluationTextSentimentAnalysisSample(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 Text Sentiment Analysis Response");
        System.out.format("\tModel Name: %s\n", modelEvaluation.getName());
        System.out.format("\tMetrics Schema Uri: %s\n", modelEvaluation.getMetricsSchemaUri());
        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());
    }
}
Also used : ModelEvaluationName(com.google.cloud.aiplatform.v1.ModelEvaluationName) ModelEvaluation(com.google.cloud.aiplatform.v1.ModelEvaluation) ModelServiceSettings(com.google.cloud.aiplatform.v1.ModelServiceSettings) ModelServiceClient(com.google.cloud.aiplatform.v1.ModelServiceClient)

Example 3 with ModelServiceClient

use of com.google.cloud.aiplatform.v1.ModelServiceClient in project java-aiplatform by googleapis.

the class GetModelEvaluationVideoActionRecognitionSample method getModelEvaluationVideoActionRecognitionSample.

static void getModelEvaluationVideoActionRecognitionSample(String project, String modelId, String evaluationId) throws IOException {
    ModelServiceSettings settings = ModelServiceSettings.newBuilder().setEndpoint("us-central1-aiplatform.googleapis.com:443").build();
    String location = "us-central1";
    // the "close" method on the client to safely clean up any remaining background resources.
    try (ModelServiceClient client = ModelServiceClient.create(settings)) {
        ModelEvaluationName name = ModelEvaluationName.of(project, location, modelId, evaluationId);
        ModelEvaluation response = client.getModelEvaluation(name);
        System.out.format("response: %s\n", response);
    }
}
Also used : ModelEvaluationName(com.google.cloud.aiplatform.v1.ModelEvaluationName) ModelEvaluation(com.google.cloud.aiplatform.v1.ModelEvaluation) ModelServiceSettings(com.google.cloud.aiplatform.v1.ModelServiceSettings) ModelServiceClient(com.google.cloud.aiplatform.v1.ModelServiceClient)

Example 4 with ModelServiceClient

use of com.google.cloud.aiplatform.v1.ModelServiceClient 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());
    }
}
Also used : ModelEvaluationName(com.google.cloud.aiplatform.v1.ModelEvaluationName) ModelEvaluation(com.google.cloud.aiplatform.v1.ModelEvaluation) ModelServiceSettings(com.google.cloud.aiplatform.v1.ModelServiceSettings) ModelServiceClient(com.google.cloud.aiplatform.v1.ModelServiceClient)

Example 5 with ModelServiceClient

use of com.google.cloud.aiplatform.v1.ModelServiceClient 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());
    }
}
Also used : ModelEvaluationName(com.google.cloud.aiplatform.v1.ModelEvaluationName) ModelEvaluation(com.google.cloud.aiplatform.v1.ModelEvaluation) ModelServiceSettings(com.google.cloud.aiplatform.v1.ModelServiceSettings) ModelServiceClient(com.google.cloud.aiplatform.v1.ModelServiceClient)

Aggregations

ModelServiceClient (com.google.cloud.aiplatform.v1.ModelServiceClient)19 ModelServiceSettings (com.google.cloud.aiplatform.v1.ModelServiceSettings)19 ModelEvaluationName (com.google.cloud.aiplatform.v1.ModelEvaluationName)12 ModelEvaluation (com.google.cloud.aiplatform.v1.ModelEvaluation)11 ModelName (com.google.cloud.aiplatform.v1.ModelName)5 ExportModelOperationMetadata (com.google.cloud.aiplatform.v1.ExportModelOperationMetadata)3 ExportModelRequest (com.google.cloud.aiplatform.v1.ExportModelRequest)3 ExportModelResponse (com.google.cloud.aiplatform.v1.ExportModelResponse)3 GcsDestination (com.google.cloud.aiplatform.v1.GcsDestination)3 Model (com.google.cloud.aiplatform.v1.Model)2 ModelContainerSpec (com.google.cloud.aiplatform.v1.ModelContainerSpec)2 ModelEvaluationSlice (com.google.cloud.aiplatform.v1.ModelEvaluationSlice)2 Slice (com.google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice)2 DeleteOperationMetadata (com.google.cloud.aiplatform.v1.DeleteOperationMetadata)1 DeployedModelRef (com.google.cloud.aiplatform.v1.DeployedModelRef)1 EnvVar (com.google.cloud.aiplatform.v1.EnvVar)1 LocationName (com.google.cloud.aiplatform.v1.LocationName)1 ExportFormat (com.google.cloud.aiplatform.v1.Model.ExportFormat)1 ModelEvaluationSliceName (com.google.cloud.aiplatform.v1.ModelEvaluationSliceName)1 Port (com.google.cloud.aiplatform.v1.Port)1