Content-Length: 1047549 | pFad | https://github.com/googleapis/google-cloud-dotnet/commit/cd4557f

71 feat: add XAI, model monitoring, and index services to aiplatform v1 · googleapis/google-cloud-dotnet@cd4557f · GitHub
Skip to content

Commit cd4557f

Browse files
yoshi-automationjskeet
authored andcommitted
feat: add XAI, model monitoring, and index services to aiplatform v1
Committer: @dizcology PiperOrigin-RevId: 393860361 Source-Author: Google APIs <noreply@google.com> Source-Date: Mon Aug 30 14:57:38 2021 -0700 Source-Repo: googleapis/googleapis Source-Sha: 8031cc26fe7f1163faf8778323c8762541c0aa6b Source-Link: googleapis/googleapis@8031cc2
1 parent c38ba1f commit cd4557f

File tree

63 files changed

+41483
-1427
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

63 files changed

+41483
-1427
lines changed

apis/Google.Cloud.AIPlatform.V1/Google.Cloud.AIPlatform.V1.Snippets/IndexEndpointServiceClientSnippets.g.cs

Lines changed: 1211 additions & 0 deletions
Large diffs are not rendered by default.

apis/Google.Cloud.AIPlatform.V1/Google.Cloud.AIPlatform.V1.Snippets/IndexServiceClientSnippets.g.cs

Lines changed: 898 additions & 0 deletions
Large diffs are not rendered by default.

apis/Google.Cloud.AIPlatform.V1/Google.Cloud.AIPlatform.V1.Snippets/JobServiceClientSnippets.g.cs

Lines changed: 1241 additions & 0 deletions
Large diffs are not rendered by default.

apis/Google.Cloud.AIPlatform.V1/Google.Cloud.AIPlatform.V1.Snippets/PredictionServiceClientSnippets.g.cs

Lines changed: 201 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616

1717
namespace Google.Cloud.AIPlatform.V1.Snippets
1818
{
19+
using Google.Api;
1920
using Google.Protobuf.WellKnownTypes;
2021
using System.Collections.Generic;
2122
using System.Threading.Tasks;
@@ -121,5 +122,205 @@ public async Task PredictResourceNamesAsync()
121122
PredictResponse response = await predictionServiceClient.PredictAsync(endpoint, instances, parameters);
122123
// End snippet
123124
}
125+
126+
//github.com/ <summary>Snippet for RawPredict</summary>
127+
public void RawPredictRequestObject()
128+
{
129+
// Snippet: RawPredict(RawPredictRequest, CallSettings)
130+
// Create client
131+
PredictionServiceClient predictionServiceClient = PredictionServiceClient.Create();
132+
// Initialize request argument(s)
133+
RawPredictRequest request = new RawPredictRequest
134+
{
135+
EndpointAsEndpointName = EndpointName.FromProjectLocationEndpoint("[PROJECT]", "[LOCATION]", "[ENDPOINT]"),
136+
HttpBody = new HttpBody(),
137+
};
138+
// Make the request
139+
HttpBody response = predictionServiceClient.RawPredict(request);
140+
// End snippet
141+
}
142+
143+
//github.com/ <summary>Snippet for RawPredictAsync</summary>
144+
public async Task RawPredictRequestObjectAsync()
145+
{
146+
// Snippet: RawPredictAsync(RawPredictRequest, CallSettings)
147+
// Additional: RawPredictAsync(RawPredictRequest, CancellationToken)
148+
// Create client
149+
PredictionServiceClient predictionServiceClient = await PredictionServiceClient.CreateAsync();
150+
// Initialize request argument(s)
151+
RawPredictRequest request = new RawPredictRequest
152+
{
153+
EndpointAsEndpointName = EndpointName.FromProjectLocationEndpoint("[PROJECT]", "[LOCATION]", "[ENDPOINT]"),
154+
HttpBody = new HttpBody(),
155+
};
156+
// Make the request
157+
HttpBody response = await predictionServiceClient.RawPredictAsync(request);
158+
// End snippet
159+
}
160+
161+
//github.com/ <summary>Snippet for RawPredict</summary>
162+
public void RawPredict()
163+
{
164+
// Snippet: RawPredict(string, HttpBody, CallSettings)
165+
// Create client
166+
PredictionServiceClient predictionServiceClient = PredictionServiceClient.Create();
167+
// Initialize request argument(s)
168+
string endpoint = "projects/[PROJECT]/locations/[LOCATION]/endpoints/[ENDPOINT]";
169+
HttpBody httpBody = new HttpBody();
170+
// Make the request
171+
HttpBody response = predictionServiceClient.RawPredict(endpoint, httpBody);
172+
// End snippet
173+
}
174+
175+
//github.com/ <summary>Snippet for RawPredictAsync</summary>
176+
public async Task RawPredictAsync()
177+
{
178+
// Snippet: RawPredictAsync(string, HttpBody, CallSettings)
179+
// Additional: RawPredictAsync(string, HttpBody, CancellationToken)
180+
// Create client
181+
PredictionServiceClient predictionServiceClient = await PredictionServiceClient.CreateAsync();
182+
// Initialize request argument(s)
183+
string endpoint = "projects/[PROJECT]/locations/[LOCATION]/endpoints/[ENDPOINT]";
184+
HttpBody httpBody = new HttpBody();
185+
// Make the request
186+
HttpBody response = await predictionServiceClient.RawPredictAsync(endpoint, httpBody);
187+
// End snippet
188+
}
189+
190+
//github.com/ <summary>Snippet for RawPredict</summary>
191+
public void RawPredictResourceNames()
192+
{
193+
// Snippet: RawPredict(EndpointName, HttpBody, CallSettings)
194+
// Create client
195+
PredictionServiceClient predictionServiceClient = PredictionServiceClient.Create();
196+
// Initialize request argument(s)
197+
EndpointName endpoint = EndpointName.FromProjectLocationEndpoint("[PROJECT]", "[LOCATION]", "[ENDPOINT]");
198+
HttpBody httpBody = new HttpBody();
199+
// Make the request
200+
HttpBody response = predictionServiceClient.RawPredict(endpoint, httpBody);
201+
// End snippet
202+
}
203+
204+
//github.com/ <summary>Snippet for RawPredictAsync</summary>
205+
public async Task RawPredictResourceNamesAsync()
206+
{
207+
// Snippet: RawPredictAsync(EndpointName, HttpBody, CallSettings)
208+
// Additional: RawPredictAsync(EndpointName, HttpBody, CancellationToken)
209+
// Create client
210+
PredictionServiceClient predictionServiceClient = await PredictionServiceClient.CreateAsync();
211+
// Initialize request argument(s)
212+
EndpointName endpoint = EndpointName.FromProjectLocationEndpoint("[PROJECT]", "[LOCATION]", "[ENDPOINT]");
213+
HttpBody httpBody = new HttpBody();
214+
// Make the request
215+
HttpBody response = await predictionServiceClient.RawPredictAsync(endpoint, httpBody);
216+
// End snippet
217+
}
218+
219+
//github.com/ <summary>Snippet for Explain</summary>
220+
public void ExplainRequestObject()
221+
{
222+
// Snippet: Explain(ExplainRequest, CallSettings)
223+
// Create client
224+
PredictionServiceClient predictionServiceClient = PredictionServiceClient.Create();
225+
// Initialize request argument(s)
226+
ExplainRequest request = new ExplainRequest
227+
{
228+
EndpointAsEndpointName = EndpointName.FromProjectLocationEndpoint("[PROJECT]", "[LOCATION]", "[ENDPOINT]"),
229+
Instances = { new Value(), },
230+
DeployedModelId = "",
231+
Parameters = new Value(),
232+
ExplanationSpecOverride = new ExplanationSpecOverride(),
233+
};
234+
// Make the request
235+
ExplainResponse response = predictionServiceClient.Explain(request);
236+
// End snippet
237+
}
238+
239+
//github.com/ <summary>Snippet for ExplainAsync</summary>
240+
public async Task ExplainRequestObjectAsync()
241+
{
242+
// Snippet: ExplainAsync(ExplainRequest, CallSettings)
243+
// Additional: ExplainAsync(ExplainRequest, CancellationToken)
244+
// Create client
245+
PredictionServiceClient predictionServiceClient = await PredictionServiceClient.CreateAsync();
246+
// Initialize request argument(s)
247+
ExplainRequest request = new ExplainRequest
248+
{
249+
EndpointAsEndpointName = EndpointName.FromProjectLocationEndpoint("[PROJECT]", "[LOCATION]", "[ENDPOINT]"),
250+
Instances = { new Value(), },
251+
DeployedModelId = "",
252+
Parameters = new Value(),
253+
ExplanationSpecOverride = new ExplanationSpecOverride(),
254+
};
255+
// Make the request
256+
ExplainResponse response = await predictionServiceClient.ExplainAsync(request);
257+
// End snippet
258+
}
259+
260+
//github.com/ <summary>Snippet for Explain</summary>
261+
public void Explain()
262+
{
263+
// Snippet: Explain(string, IEnumerable<Value>, Value, string, CallSettings)
264+
// Create client
265+
PredictionServiceClient predictionServiceClient = PredictionServiceClient.Create();
266+
// Initialize request argument(s)
267+
string endpoint = "projects/[PROJECT]/locations/[LOCATION]/endpoints/[ENDPOINT]";
268+
IEnumerable<Value> instances = new Value[] { new Value(), };
269+
Value parameters = new Value();
270+
string deployedModelId = "";
271+
// Make the request
272+
ExplainResponse response = predictionServiceClient.Explain(endpoint, instances, parameters, deployedModelId);
273+
// End snippet
274+
}
275+
276+
//github.com/ <summary>Snippet for ExplainAsync</summary>
277+
public async Task ExplainAsync()
278+
{
279+
// Snippet: ExplainAsync(string, IEnumerable<Value>, Value, string, CallSettings)
280+
// Additional: ExplainAsync(string, IEnumerable<Value>, Value, string, CancellationToken)
281+
// Create client
282+
PredictionServiceClient predictionServiceClient = await PredictionServiceClient.CreateAsync();
283+
// Initialize request argument(s)
284+
string endpoint = "projects/[PROJECT]/locations/[LOCATION]/endpoints/[ENDPOINT]";
285+
IEnumerable<Value> instances = new Value[] { new Value(), };
286+
Value parameters = new Value();
287+
string deployedModelId = "";
288+
// Make the request
289+
ExplainResponse response = await predictionServiceClient.ExplainAsync(endpoint, instances, parameters, deployedModelId);
290+
// End snippet
291+
}
292+
293+
//github.com/ <summary>Snippet for Explain</summary>
294+
public void ExplainResourceNames()
295+
{
296+
// Snippet: Explain(EndpointName, IEnumerable<Value>, Value, string, CallSettings)
297+
// Create client
298+
PredictionServiceClient predictionServiceClient = PredictionServiceClient.Create();
299+
// Initialize request argument(s)
300+
EndpointName endpoint = EndpointName.FromProjectLocationEndpoint("[PROJECT]", "[LOCATION]", "[ENDPOINT]");
301+
IEnumerable<Value> instances = new Value[] { new Value(), };
302+
Value parameters = new Value();
303+
string deployedModelId = "";
304+
// Make the request
305+
ExplainResponse response = predictionServiceClient.Explain(endpoint, instances, parameters, deployedModelId);
306+
// End snippet
307+
}
308+
309+
//github.com/ <summary>Snippet for ExplainAsync</summary>
310+
public async Task ExplainResourceNamesAsync()
311+
{
312+
// Snippet: ExplainAsync(EndpointName, IEnumerable<Value>, Value, string, CallSettings)
313+
// Additional: ExplainAsync(EndpointName, IEnumerable<Value>, Value, string, CancellationToken)
314+
// Create client
315+
PredictionServiceClient predictionServiceClient = await PredictionServiceClient.CreateAsync();
316+
// Initialize request argument(s)
317+
EndpointName endpoint = EndpointName.FromProjectLocationEndpoint("[PROJECT]", "[LOCATION]", "[ENDPOINT]");
318+
IEnumerable<Value> instances = new Value[] { new Value(), };
319+
Value parameters = new Value();
320+
string deployedModelId = "";
321+
// Make the request
322+
ExplainResponse response = await predictionServiceClient.ExplainAsync(endpoint, instances, parameters, deployedModelId);
323+
// End snippet
324+
}
124325
}
125326
}

apis/Google.Cloud.AIPlatform.V1/Google.Cloud.AIPlatform.V1.Tests/DatasetServiceClientTest.g.cs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@ public void GetDatasetRequestObject()
5555
},
5656
Metadata = new wkt::Value(),
5757
EncryptionSpec = new EncryptionSpec(),
58+
Description = "description2cf9da67",
5859
};
5960
mockGrpcClient.Setup(x => x.GetDataset(request, moq::It.IsAny<grpccore::CallOptions>())).Returns(expectedResponse);
6061
DatasetServiceClient client = new DatasetServiceClientImpl(mockGrpcClient.Object, null);
@@ -90,6 +91,7 @@ public void GetDatasetRequestObject()
9091
},
9192
Metadata = new wkt::Value(),
9293
EncryptionSpec = new EncryptionSpec(),
94+
Description = "description2cf9da67",
9395
};
9496
mockGrpcClient.Setup(x => x.GetDatasetAsync(request, moq::It.IsAny<grpccore::CallOptions>())).Returns(new grpccore::AsyncUnaryCall<Dataset>(stt::Task.FromResult(expectedResponse), null, null, null, null));
9597
DatasetServiceClient client = new DatasetServiceClientImpl(mockGrpcClient.Object, null);
@@ -126,6 +128,7 @@ public void GetDataset()
126128
},
127129
Metadata = new wkt::Value(),
128130
EncryptionSpec = new EncryptionSpec(),
131+
Description = "description2cf9da67",
129132
};
130133
mockGrpcClient.Setup(x => x.GetDataset(request, moq::It.IsAny<grpccore::CallOptions>())).Returns(expectedResponse);
131134
DatasetServiceClient client = new DatasetServiceClientImpl(mockGrpcClient.Object, null);
@@ -160,6 +163,7 @@ public void GetDataset()
160163
},
161164
Metadata = new wkt::Value(),
162165
EncryptionSpec = new EncryptionSpec(),
166+
Description = "description2cf9da67",
163167
};
164168
mockGrpcClient.Setup(x => x.GetDatasetAsync(request, moq::It.IsAny<grpccore::CallOptions>())).Returns(new grpccore::AsyncUnaryCall<Dataset>(stt::Task.FromResult(expectedResponse), null, null, null, null));
165169
DatasetServiceClient client = new DatasetServiceClientImpl(mockGrpcClient.Object, null);
@@ -196,6 +200,7 @@ public void GetDatasetResourceNames()
196200
},
197201
Metadata = new wkt::Value(),
198202
EncryptionSpec = new EncryptionSpec(),
203+
Description = "description2cf9da67",
199204
};
200205
mockGrpcClient.Setup(x => x.GetDataset(request, moq::It.IsAny<grpccore::CallOptions>())).Returns(expectedResponse);
201206
DatasetServiceClient client = new DatasetServiceClientImpl(mockGrpcClient.Object, null);
@@ -230,6 +235,7 @@ public void GetDatasetResourceNames()
230235
},
231236
Metadata = new wkt::Value(),
232237
EncryptionSpec = new EncryptionSpec(),
238+
Description = "description2cf9da67",
233239
};
234240
mockGrpcClient.Setup(x => x.GetDatasetAsync(request, moq::It.IsAny<grpccore::CallOptions>())).Returns(new grpccore::AsyncUnaryCall<Dataset>(stt::Task.FromResult(expectedResponse), null, null, null, null));
235241
DatasetServiceClient client = new DatasetServiceClientImpl(mockGrpcClient.Object, null);
@@ -267,6 +273,7 @@ public void UpdateDatasetRequestObject()
267273
},
268274
Metadata = new wkt::Value(),
269275
EncryptionSpec = new EncryptionSpec(),
276+
Description = "description2cf9da67",
270277
};
271278
mockGrpcClient.Setup(x => x.UpdateDataset(request, moq::It.IsAny<grpccore::CallOptions>())).Returns(expectedResponse);
272279
DatasetServiceClient client = new DatasetServiceClientImpl(mockGrpcClient.Object, null);
@@ -302,6 +309,7 @@ public void UpdateDatasetRequestObject()
302309
},
303310
Metadata = new wkt::Value(),
304311
EncryptionSpec = new EncryptionSpec(),
312+
Description = "description2cf9da67",
305313
};
306314
mockGrpcClient.Setup(x => x.UpdateDatasetAsync(request, moq::It.IsAny<grpccore::CallOptions>())).Returns(new grpccore::AsyncUnaryCall<Dataset>(stt::Task.FromResult(expectedResponse), null, null, null, null));
307315
DatasetServiceClient client = new DatasetServiceClientImpl(mockGrpcClient.Object, null);
@@ -339,6 +347,7 @@ public void UpdateDataset()
339347
},
340348
Metadata = new wkt::Value(),
341349
EncryptionSpec = new EncryptionSpec(),
350+
Description = "description2cf9da67",
342351
};
343352
mockGrpcClient.Setup(x => x.UpdateDataset(request, moq::It.IsAny<grpccore::CallOptions>())).Returns(expectedResponse);
344353
DatasetServiceClient client = new DatasetServiceClientImpl(mockGrpcClient.Object, null);
@@ -374,6 +383,7 @@ public void UpdateDataset()
374383
},
375384
Metadata = new wkt::Value(),
376385
EncryptionSpec = new EncryptionSpec(),
386+
Description = "description2cf9da67",
377387
};
378388
mockGrpcClient.Setup(x => x.UpdateDatasetAsync(request, moq::It.IsAny<grpccore::CallOptions>())).Returns(new grpccore::AsyncUnaryCall<Dataset>(stt::Task.FromResult(expectedResponse), null, null, null, null));
379389
DatasetServiceClient client = new DatasetServiceClientImpl(mockGrpcClient.Object, null);

0 commit comments

Comments
 (0)








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: https://github.com/googleapis/google-cloud-dotnet/commit/cd4557f

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy