Skip to content

Commit

Permalink
feat: add model_version_id to BatchPredictionJob in aiplatform v1 bat…
Browse files Browse the repository at this point in the history
…ch_prediction_job.proto

feat: add model_version_id to DeployedModel in aiplatform v1 endpoint.proto

feat: add model_version_id to PredictResponse in aiplatform v1 prediction_service.proto
PiperOrigin-RevId: 456571762

Source-Link: googleapis/googleapis@19bd392

Source-Link: googleapis/googleapis-gen@d4dfc80
Copy-Tag: eyJwIjoiYXBpcy9Hb29nbGUuQ2xvdWQuQUlQbGF0Zm9ybS5WMS8uT3dsQm90LnlhbWwiLCJoIjoiZDRkZmM4MDJhODhmZTc3YmMwNDE5MWY0YjFkOWI1OTQ4MWU2OTJmZCJ9
  • Loading branch information
gcf-owl-bot[bot] authored and jskeet committed Jun 23, 2022
1 parent 1e1a9d2 commit 2b4568a
Show file tree
Hide file tree
Showing 5 changed files with 255 additions and 114 deletions.
Expand Up @@ -2204,6 +2204,7 @@ public void CreateBatchPredictionJobRequestObject()
EncryptionSpec = new EncryptionSpec(),
ExplanationSpec = new ExplanationSpec(),
UnmanagedContainerModel = new UnmanagedContainerModel(),
ModelVersionId = "model_version_idcaf4b810",
};
mockGrpcClient.Setup(x => x.CreateBatchPredictionJob(request, moq::It.IsAny<grpccore::CallOptions>())).Returns(expectedResponse);
JobServiceClient client = new JobServiceClientImpl(mockGrpcClient.Object, null, null);
Expand Down Expand Up @@ -2255,6 +2256,7 @@ public void CreateBatchPredictionJobRequestObject()
EncryptionSpec = new EncryptionSpec(),
ExplanationSpec = new ExplanationSpec(),
UnmanagedContainerModel = new UnmanagedContainerModel(),
ModelVersionId = "model_version_idcaf4b810",
};
mockGrpcClient.Setup(x => x.CreateBatchPredictionJobAsync(request, moq::It.IsAny<grpccore::CallOptions>())).Returns(new grpccore::AsyncUnaryCall<BatchPredictionJob>(stt::Task.FromResult(expectedResponse), null, null, null, null));
JobServiceClient client = new JobServiceClientImpl(mockGrpcClient.Object, null, null);
Expand Down Expand Up @@ -2308,6 +2310,7 @@ public void CreateBatchPredictionJob()
EncryptionSpec = new EncryptionSpec(),
ExplanationSpec = new ExplanationSpec(),
UnmanagedContainerModel = new UnmanagedContainerModel(),
ModelVersionId = "model_version_idcaf4b810",
};
mockGrpcClient.Setup(x => x.CreateBatchPredictionJob(request, moq::It.IsAny<grpccore::CallOptions>())).Returns(expectedResponse);
JobServiceClient client = new JobServiceClientImpl(mockGrpcClient.Object, null, null);
Expand Down Expand Up @@ -2359,6 +2362,7 @@ public void CreateBatchPredictionJob()
EncryptionSpec = new EncryptionSpec(),
ExplanationSpec = new ExplanationSpec(),
UnmanagedContainerModel = new UnmanagedContainerModel(),
ModelVersionId = "model_version_idcaf4b810",
};
mockGrpcClient.Setup(x => x.CreateBatchPredictionJobAsync(request, moq::It.IsAny<grpccore::CallOptions>())).Returns(new grpccore::AsyncUnaryCall<BatchPredictionJob>(stt::Task.FromResult(expectedResponse), null, null, null, null));
JobServiceClient client = new JobServiceClientImpl(mockGrpcClient.Object, null, null);
Expand Down Expand Up @@ -2412,6 +2416,7 @@ public void CreateBatchPredictionJobResourceNames()
EncryptionSpec = new EncryptionSpec(),
ExplanationSpec = new ExplanationSpec(),
UnmanagedContainerModel = new UnmanagedContainerModel(),
ModelVersionId = "model_version_idcaf4b810",
};
mockGrpcClient.Setup(x => x.CreateBatchPredictionJob(request, moq::It.IsAny<grpccore::CallOptions>())).Returns(expectedResponse);
JobServiceClient client = new JobServiceClientImpl(mockGrpcClient.Object, null, null);
Expand Down Expand Up @@ -2463,6 +2468,7 @@ public void CreateBatchPredictionJobResourceNames()
EncryptionSpec = new EncryptionSpec(),
ExplanationSpec = new ExplanationSpec(),
UnmanagedContainerModel = new UnmanagedContainerModel(),
ModelVersionId = "model_version_idcaf4b810",
};
mockGrpcClient.Setup(x => x.CreateBatchPredictionJobAsync(request, moq::It.IsAny<grpccore::CallOptions>())).Returns(new grpccore::AsyncUnaryCall<BatchPredictionJob>(stt::Task.FromResult(expectedResponse), null, null, null, null));
JobServiceClient client = new JobServiceClientImpl(mockGrpcClient.Object, null, null);
Expand Down Expand Up @@ -2515,6 +2521,7 @@ public void GetBatchPredictionJobRequestObject()
EncryptionSpec = new EncryptionSpec(),
ExplanationSpec = new ExplanationSpec(),
UnmanagedContainerModel = new UnmanagedContainerModel(),
ModelVersionId = "model_version_idcaf4b810",
};
mockGrpcClient.Setup(x => x.GetBatchPredictionJob(request, moq::It.IsAny<grpccore::CallOptions>())).Returns(expectedResponse);
JobServiceClient client = new JobServiceClientImpl(mockGrpcClient.Object, null, null);
Expand Down Expand Up @@ -2565,6 +2572,7 @@ public void GetBatchPredictionJobRequestObject()
EncryptionSpec = new EncryptionSpec(),
ExplanationSpec = new ExplanationSpec(),
UnmanagedContainerModel = new UnmanagedContainerModel(),
ModelVersionId = "model_version_idcaf4b810",
};
mockGrpcClient.Setup(x => x.GetBatchPredictionJobAsync(request, moq::It.IsAny<grpccore::CallOptions>())).Returns(new grpccore::AsyncUnaryCall<BatchPredictionJob>(stt::Task.FromResult(expectedResponse), null, null, null, null));
JobServiceClient client = new JobServiceClientImpl(mockGrpcClient.Object, null, null);
Expand Down Expand Up @@ -2617,6 +2625,7 @@ public void GetBatchPredictionJob()
EncryptionSpec = new EncryptionSpec(),
ExplanationSpec = new ExplanationSpec(),
UnmanagedContainerModel = new UnmanagedContainerModel(),
ModelVersionId = "model_version_idcaf4b810",
};
mockGrpcClient.Setup(x => x.GetBatchPredictionJob(request, moq::It.IsAny<grpccore::CallOptions>())).Returns(expectedResponse);
JobServiceClient client = new JobServiceClientImpl(mockGrpcClient.Object, null, null);
Expand Down Expand Up @@ -2667,6 +2676,7 @@ public void GetBatchPredictionJob()
EncryptionSpec = new EncryptionSpec(),
ExplanationSpec = new ExplanationSpec(),
UnmanagedContainerModel = new UnmanagedContainerModel(),
ModelVersionId = "model_version_idcaf4b810",
};
mockGrpcClient.Setup(x => x.GetBatchPredictionJobAsync(request, moq::It.IsAny<grpccore::CallOptions>())).Returns(new grpccore::AsyncUnaryCall<BatchPredictionJob>(stt::Task.FromResult(expectedResponse), null, null, null, null));
JobServiceClient client = new JobServiceClientImpl(mockGrpcClient.Object, null, null);
Expand Down Expand Up @@ -2719,6 +2729,7 @@ public void GetBatchPredictionJobResourceNames()
EncryptionSpec = new EncryptionSpec(),
ExplanationSpec = new ExplanationSpec(),
UnmanagedContainerModel = new UnmanagedContainerModel(),
ModelVersionId = "model_version_idcaf4b810",
};
mockGrpcClient.Setup(x => x.GetBatchPredictionJob(request, moq::It.IsAny<grpccore::CallOptions>())).Returns(expectedResponse);
JobServiceClient client = new JobServiceClientImpl(mockGrpcClient.Object, null, null);
Expand Down Expand Up @@ -2769,6 +2780,7 @@ public void GetBatchPredictionJobResourceNames()
EncryptionSpec = new EncryptionSpec(),
ExplanationSpec = new ExplanationSpec(),
UnmanagedContainerModel = new UnmanagedContainerModel(),
ModelVersionId = "model_version_idcaf4b810",
};
mockGrpcClient.Setup(x => x.GetBatchPredictionJobAsync(request, moq::It.IsAny<grpccore::CallOptions>())).Returns(new grpccore::AsyncUnaryCall<BatchPredictionJob>(stt::Task.FromResult(expectedResponse), null, null, null, null));
JobServiceClient client = new JobServiceClientImpl(mockGrpcClient.Object, null, null);
Expand Down
Expand Up @@ -50,6 +50,7 @@ public void PredictRequestObject()
DeployedModelId = "deployed_model_idf0bd41af",
ModelAsModelName = ModelName.FromProjectLocationModel("[PROJECT]", "[LOCATION]", "[MODEL]"),
ModelDisplayName = "model_display_name8ef9ce34",
ModelVersionId = "model_version_idcaf4b810",
};
mockGrpcClient.Setup(x => x.Predict(request, moq::It.IsAny<grpccore::CallOptions>())).Returns(expectedResponse);
PredictionServiceClient client = new PredictionServiceClientImpl(mockGrpcClient.Object, null, null);
Expand All @@ -76,6 +77,7 @@ public void PredictRequestObject()
DeployedModelId = "deployed_model_idf0bd41af",
ModelAsModelName = ModelName.FromProjectLocationModel("[PROJECT]", "[LOCATION]", "[MODEL]"),
ModelDisplayName = "model_display_name8ef9ce34",
ModelVersionId = "model_version_idcaf4b810",
};
mockGrpcClient.Setup(x => x.PredictAsync(request, moq::It.IsAny<grpccore::CallOptions>())).Returns(new grpccore::AsyncUnaryCall<PredictResponse>(stt::Task.FromResult(expectedResponse), null, null, null, null));
PredictionServiceClient client = new PredictionServiceClientImpl(mockGrpcClient.Object, null, null);
Expand Down Expand Up @@ -104,6 +106,7 @@ public void Predict()
DeployedModelId = "deployed_model_idf0bd41af",
ModelAsModelName = ModelName.FromProjectLocationModel("[PROJECT]", "[LOCATION]", "[MODEL]"),
ModelDisplayName = "model_display_name8ef9ce34",
ModelVersionId = "model_version_idcaf4b810",
};
mockGrpcClient.Setup(x => x.Predict(request, moq::It.IsAny<grpccore::CallOptions>())).Returns(expectedResponse);
PredictionServiceClient client = new PredictionServiceClientImpl(mockGrpcClient.Object, null, null);
Expand All @@ -130,6 +133,7 @@ public void Predict()
DeployedModelId = "deployed_model_idf0bd41af",
ModelAsModelName = ModelName.FromProjectLocationModel("[PROJECT]", "[LOCATION]", "[MODEL]"),
ModelDisplayName = "model_display_name8ef9ce34",
ModelVersionId = "model_version_idcaf4b810",
};
mockGrpcClient.Setup(x => x.PredictAsync(request, moq::It.IsAny<grpccore::CallOptions>())).Returns(new grpccore::AsyncUnaryCall<PredictResponse>(stt::Task.FromResult(expectedResponse), null, null, null, null));
PredictionServiceClient client = new PredictionServiceClientImpl(mockGrpcClient.Object, null, null);
Expand Down Expand Up @@ -158,6 +162,7 @@ public void PredictResourceNames()
DeployedModelId = "deployed_model_idf0bd41af",
ModelAsModelName = ModelName.FromProjectLocationModel("[PROJECT]", "[LOCATION]", "[MODEL]"),
ModelDisplayName = "model_display_name8ef9ce34",
ModelVersionId = "model_version_idcaf4b810",
};
mockGrpcClient.Setup(x => x.Predict(request, moq::It.IsAny<grpccore::CallOptions>())).Returns(expectedResponse);
PredictionServiceClient client = new PredictionServiceClientImpl(mockGrpcClient.Object, null, null);
Expand All @@ -184,6 +189,7 @@ public void PredictResourceNames()
DeployedModelId = "deployed_model_idf0bd41af",
ModelAsModelName = ModelName.FromProjectLocationModel("[PROJECT]", "[LOCATION]", "[MODEL]"),
ModelDisplayName = "model_display_name8ef9ce34",
ModelVersionId = "model_version_idcaf4b810",
};
mockGrpcClient.Setup(x => x.PredictAsync(request, moq::It.IsAny<grpccore::CallOptions>())).Returns(new grpccore::AsyncUnaryCall<PredictResponse>(stt::Task.FromResult(expectedResponse), null, null, null, null));
PredictionServiceClient client = new PredictionServiceClientImpl(mockGrpcClient.Object, null, null);
Expand Down

0 comments on commit 2b4568a

Please sign in to comment.