【问题标题】:In GCP Vertex AI, why is Delete Training Pipeline REST endpoint unimplemented?在 GCP Vertex AI 中,为什么没有实现 Delete Training Pipeline REST 端点?
【发布时间】:2021-11-12 02:01:21
【问题描述】:

我直接使用 Javadocs 中的 this code 删除了 VertexAI 训练管道

try (PipelineServiceClient pipelineServiceClient = PipelineServiceClient.create()) {
  TrainingPipelineName name =
      TrainingPipelineName.of("[PROJECT]", "[LOCATION]", "[TRAINING_PIPELINE]");
  pipelineServiceClient.deleteTrainingPipelineAsync(name).get();
}

我收到此错误。据我所知,这意味着这个 API 虽然有官方文档,但根本没有实现。我们如何使用 Java 删除训练管道?

Error in deleting //aiplatform.googleapis.com/projects/746859988231/locations/us-central1/trainingPipelines/186468439399187392: 
java.util.concurrent.ExecutionException: 
com.google.api.gax.rpc.UnimplementedException: io.grpc.StatusRuntimeException:
UNIMPLEMENTED: HTTP status code 404
...
<!DOCTYPE html>
<html lang=en>
....
  <p>The requested URL <code>/google.cloud.aiplatform.v1.PipelineService
/DeleteTrainingPipeline</code> was not found on this server.  
<ins>That’s all we know.</ins>

【问题讨论】:

    标签: java google-cloud-platform google-ai-platform google-cloud-vertex-ai


    【解决方案1】:

    根据官方文档https://cloud.google.com/vertex-ai/docs/reference/rest,该服务支持的服务URL为:

    https://us-central1-aiplatform.googleapis.com
    https://us-east1-aiplatform.googleapis.com
    https://us-east4-aiplatform.googleapis.com
    https://us-west1-aiplatform.googleapis.com
    https://northamerica-northeast1-aiplatform.googleapis.com
    https://europe-west1-aiplatform.googleapis.com
    https://europe-west2-aiplatform.googleapis.com
    https://europe-west4-aiplatform.googleapis.com
    https://asia-east1-aiplatform.googleapis.com
    https://asia-northeast1-aiplatform.googleapis.com
    https://asia-northeast3-aiplatform.googleapis.com
    https://asia-southeast1-aiplatform.googleapis.com
    https://australia-southeast1-aiplatform.googleapis.com
    

      PipelineServiceSettings pipelineServiceSettings =
            PipelineServiceSettings.newBuilder()
                .setEndpoint("us-central1-aiplatform.googleapis.com:443")
                .build();
    

     try (PipelineServiceClient pipelineServiceClient =
          PipelineServiceClient.create(pipelineServiceSettings)) {
    
      String location = "us-central1";
      TrainingPipelineName trainingPipelineName =
          TrainingPipelineName.of(project, location, trainingPipelineId);
    
      OperationFuture<Empty, DeleteOperationMetadata> operationFuture =
          pipelineServiceClient.deleteTrainingPipelineAsync(trainingPipelineName);
    
      System.out.format("Operation name: %s\n", operationFuture.getInitialFuture().get().getName());
      System.out.println("Waiting for operation to finish...");
      operationFuture.get(300, TimeUnit.SECONDS);
    
      System.out.format("Deleted Training Pipeline.");
    }
    

    【讨论】:

    • 就是这样!有什么不同?只是那个非标准端点?您知道这是应该要求 Google 修复的错误,还是只是我不太了解的标准行为?
    • 请看编辑@JoshuaFox 特定端点支持该服务
    • 谢谢。我提交了修复文档的错误请求:我要求他们添加 setEndpoint() 调用
    猜你喜欢
    • 2021-12-02
    • 2023-02-15
    • 2021-12-09
    • 1970-01-01
    • 2021-11-06
    • 2022-08-03
    • 2021-08-27
    • 2022-08-18
    • 2023-02-02
    相关资源
    最近更新 更多