使用 Java 部署模型时出现 Vertex Ai 问题

Vertex Ai issue when deploying a model using Java

这是我用来部署 Auto-ML 模型的方法:

            MachineSpec machineSpec = MachineSpec.newBuilder().setMachineType("n1-standard-2").build();
            DedicatedResources dedicatedResources =
                    DedicatedResources.newBuilder().setMinReplicaCount(1).setMachineSpec(machineSpec).build();            
            String model = ModelName.of(project, location, modelId).toString();
            DeployedModel deployedModel =
                    DeployedModel.newBuilder()
                            .setModel(model)
                            .setDisplayName(deployedModelDisplayName)
                            .setDedicatedResources(dedicatedResources)
                            .build();
            Map<String, Integer> trafficSplit = new HashMap<>();
            trafficSplit.put("0", 100);
            EndpointName endpoint = EndpointName.of(project, location, endpointId);
            OperationFuture<DeployModelResponse, DeployModelOperationMetadata> response =
                    client.deployModelAsync(endpoint, deployedModel, trafficSplit);
            response.getInitialFuture().get().getName());

当我点击这条线时出现错误response.getInitialFuture().get().getName());

这是错误: INVALID_ARGUMENT: 'dedicated_resources' is not supported for Model projects/***/locations/us-central1/models/***

我可以使用云控制台部署模型,但不能使用 java 8. 它是一个新模型,端点也是新的,没有任何分配的模型。

对不起大家,我执行了错误的文档部分。我必须遵循 AutoML 图像,而不是自定义训练图像。