@maxim_mazurok/gapi.client.ml-v1 0.0.20220728
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.d.ts +3221 -0
- package/package.json +20 -0
- package/readme.md +86 -0
- package/tests.ts +1286 -0
- package/tsconfig.json +18 -0
- package/tslint.json +6 -0
package/tests.ts
ADDED
|
@@ -0,0 +1,1286 @@
|
|
|
1
|
+
/* This is stub file for gapi.client.ml-v1 definition tests */
|
|
2
|
+
// IMPORTANT
|
|
3
|
+
// This file was generated by https://github.com/Maxim-Mazurok/google-api-typings-generator. Please do not edit it manually.
|
|
4
|
+
// In case of any problems please post issue to https://github.com/Maxim-Mazurok/google-api-typings-generator
|
|
5
|
+
|
|
6
|
+
// Revision: 20220728
|
|
7
|
+
|
|
8
|
+
gapi.load('client', async () => {
|
|
9
|
+
/** now we can use gapi.client */
|
|
10
|
+
|
|
11
|
+
await gapi.client.load('https://ml.googleapis.com/$discovery/rest?version=v1');
|
|
12
|
+
/** now we can use gapi.client.ml */
|
|
13
|
+
|
|
14
|
+
/** don't forget to authenticate your client before sending any request to resources: */
|
|
15
|
+
/** declare client_id registered in Google Developers Console */
|
|
16
|
+
const client_id = '<<PUT YOUR CLIENT ID HERE>>';
|
|
17
|
+
const scope = [
|
|
18
|
+
/** See, edit, configure, and delete your Google Cloud data and see the email address for your Google Account. */
|
|
19
|
+
'https://www.googleapis.com/auth/cloud-platform',
|
|
20
|
+
/** View your data across Google Cloud services and see the email address of your Google Account */
|
|
21
|
+
'https://www.googleapis.com/auth/cloud-platform.read-only',
|
|
22
|
+
];
|
|
23
|
+
const immediate = false;
|
|
24
|
+
gapi.auth.authorize({ client_id, scope, immediate }, authResult => {
|
|
25
|
+
if (authResult && !authResult.error) {
|
|
26
|
+
/** handle successful authorization */
|
|
27
|
+
run();
|
|
28
|
+
} else {
|
|
29
|
+
/** handle authorization error */
|
|
30
|
+
}
|
|
31
|
+
});
|
|
32
|
+
|
|
33
|
+
async function run() {
|
|
34
|
+
/** Performs explanation on the data in the request. {% dynamic include "/ai-platform/includes/___explain-request" %} */
|
|
35
|
+
await gapi.client.ml.projects.explain({
|
|
36
|
+
name: "Test string",
|
|
37
|
+
}, {
|
|
38
|
+
httpBody: {
|
|
39
|
+
contentType: "Test string",
|
|
40
|
+
data: "Test string",
|
|
41
|
+
extensions: [
|
|
42
|
+
{
|
|
43
|
+
A: 42
|
|
44
|
+
}
|
|
45
|
+
],
|
|
46
|
+
},
|
|
47
|
+
});
|
|
48
|
+
/**
|
|
49
|
+
* Get the service account information associated with your project. You need this information in order to grant the service account permissions for the Google Cloud Storage location where
|
|
50
|
+
* you put your model training code for training the model with Google Cloud Machine Learning.
|
|
51
|
+
*/
|
|
52
|
+
await gapi.client.ml.projects.getConfig({
|
|
53
|
+
name: "Test string",
|
|
54
|
+
});
|
|
55
|
+
/** Performs online prediction on the data in the request. {% dynamic include "/ai-platform/includes/___predict-request" %} */
|
|
56
|
+
await gapi.client.ml.projects.predict({
|
|
57
|
+
name: "Test string",
|
|
58
|
+
}, {
|
|
59
|
+
httpBody: {
|
|
60
|
+
contentType: "Test string",
|
|
61
|
+
data: "Test string",
|
|
62
|
+
extensions: [
|
|
63
|
+
{
|
|
64
|
+
A: 42
|
|
65
|
+
}
|
|
66
|
+
],
|
|
67
|
+
},
|
|
68
|
+
});
|
|
69
|
+
/** Cancels a running job. */
|
|
70
|
+
await gapi.client.ml.projects.jobs.cancel({
|
|
71
|
+
name: "Test string",
|
|
72
|
+
}, {
|
|
73
|
+
});
|
|
74
|
+
/** Creates a training or a batch prediction job. */
|
|
75
|
+
await gapi.client.ml.projects.jobs.create({
|
|
76
|
+
parent: "Test string",
|
|
77
|
+
}, {
|
|
78
|
+
createTime: "Test string",
|
|
79
|
+
endTime: "Test string",
|
|
80
|
+
errorMessage: "Test string",
|
|
81
|
+
etag: "Test string",
|
|
82
|
+
jobId: "Test string",
|
|
83
|
+
jobPosition: "Test string",
|
|
84
|
+
labels: {
|
|
85
|
+
A: "Test string"
|
|
86
|
+
},
|
|
87
|
+
predictionInput: {
|
|
88
|
+
batchSize: "Test string",
|
|
89
|
+
dataFormat: "Test string",
|
|
90
|
+
inputPaths: [
|
|
91
|
+
"Test string"
|
|
92
|
+
],
|
|
93
|
+
maxWorkerCount: "Test string",
|
|
94
|
+
modelName: "Test string",
|
|
95
|
+
outputDataFormat: "Test string",
|
|
96
|
+
outputPath: "Test string",
|
|
97
|
+
region: "Test string",
|
|
98
|
+
runtimeVersion: "Test string",
|
|
99
|
+
signatureName: "Test string",
|
|
100
|
+
uri: "Test string",
|
|
101
|
+
versionName: "Test string",
|
|
102
|
+
},
|
|
103
|
+
predictionOutput: {
|
|
104
|
+
errorCount: "Test string",
|
|
105
|
+
nodeHours: 42,
|
|
106
|
+
outputPath: "Test string",
|
|
107
|
+
predictionCount: "Test string",
|
|
108
|
+
},
|
|
109
|
+
startTime: "Test string",
|
|
110
|
+
state: "Test string",
|
|
111
|
+
trainingInput: {
|
|
112
|
+
args: [
|
|
113
|
+
"Test string"
|
|
114
|
+
],
|
|
115
|
+
enableWebAccess: true,
|
|
116
|
+
encryptionConfig: {
|
|
117
|
+
kmsKeyName: "Test string",
|
|
118
|
+
},
|
|
119
|
+
evaluatorConfig: {
|
|
120
|
+
acceleratorConfig: {
|
|
121
|
+
count: "Test string",
|
|
122
|
+
type: "Test string",
|
|
123
|
+
},
|
|
124
|
+
containerArgs: [
|
|
125
|
+
"Test string"
|
|
126
|
+
],
|
|
127
|
+
containerCommand: [
|
|
128
|
+
"Test string"
|
|
129
|
+
],
|
|
130
|
+
diskConfig: {
|
|
131
|
+
bootDiskSizeGb: 42,
|
|
132
|
+
bootDiskType: "Test string",
|
|
133
|
+
},
|
|
134
|
+
imageUri: "Test string",
|
|
135
|
+
tpuTfVersion: "Test string",
|
|
136
|
+
},
|
|
137
|
+
evaluatorCount: "Test string",
|
|
138
|
+
evaluatorType: "Test string",
|
|
139
|
+
hyperparameters: {
|
|
140
|
+
algorithm: "Test string",
|
|
141
|
+
enableTrialEarlyStopping: true,
|
|
142
|
+
goal: "Test string",
|
|
143
|
+
hyperparameterMetricTag: "Test string",
|
|
144
|
+
maxFailedTrials: 42,
|
|
145
|
+
maxParallelTrials: 42,
|
|
146
|
+
maxTrials: 42,
|
|
147
|
+
params: [
|
|
148
|
+
{
|
|
149
|
+
categoricalValues: [
|
|
150
|
+
"Test string"
|
|
151
|
+
],
|
|
152
|
+
discreteValues: [
|
|
153
|
+
42
|
|
154
|
+
],
|
|
155
|
+
maxValue: 42,
|
|
156
|
+
minValue: 42,
|
|
157
|
+
parameterName: "Test string",
|
|
158
|
+
scaleType: "Test string",
|
|
159
|
+
type: "Test string",
|
|
160
|
+
}
|
|
161
|
+
],
|
|
162
|
+
resumePreviousJobId: "Test string",
|
|
163
|
+
},
|
|
164
|
+
jobDir: "Test string",
|
|
165
|
+
masterConfig: {
|
|
166
|
+
acceleratorConfig: {
|
|
167
|
+
count: "Test string",
|
|
168
|
+
type: "Test string",
|
|
169
|
+
},
|
|
170
|
+
containerArgs: [
|
|
171
|
+
"Test string"
|
|
172
|
+
],
|
|
173
|
+
containerCommand: [
|
|
174
|
+
"Test string"
|
|
175
|
+
],
|
|
176
|
+
diskConfig: {
|
|
177
|
+
bootDiskSizeGb: 42,
|
|
178
|
+
bootDiskType: "Test string",
|
|
179
|
+
},
|
|
180
|
+
imageUri: "Test string",
|
|
181
|
+
tpuTfVersion: "Test string",
|
|
182
|
+
},
|
|
183
|
+
masterType: "Test string",
|
|
184
|
+
network: "Test string",
|
|
185
|
+
packageUris: [
|
|
186
|
+
"Test string"
|
|
187
|
+
],
|
|
188
|
+
parameterServerConfig: {
|
|
189
|
+
acceleratorConfig: {
|
|
190
|
+
count: "Test string",
|
|
191
|
+
type: "Test string",
|
|
192
|
+
},
|
|
193
|
+
containerArgs: [
|
|
194
|
+
"Test string"
|
|
195
|
+
],
|
|
196
|
+
containerCommand: [
|
|
197
|
+
"Test string"
|
|
198
|
+
],
|
|
199
|
+
diskConfig: {
|
|
200
|
+
bootDiskSizeGb: 42,
|
|
201
|
+
bootDiskType: "Test string",
|
|
202
|
+
},
|
|
203
|
+
imageUri: "Test string",
|
|
204
|
+
tpuTfVersion: "Test string",
|
|
205
|
+
},
|
|
206
|
+
parameterServerCount: "Test string",
|
|
207
|
+
parameterServerType: "Test string",
|
|
208
|
+
pythonModule: "Test string",
|
|
209
|
+
pythonVersion: "Test string",
|
|
210
|
+
region: "Test string",
|
|
211
|
+
runtimeVersion: "Test string",
|
|
212
|
+
scaleTier: "Test string",
|
|
213
|
+
scheduling: {
|
|
214
|
+
maxRunningTime: "Test string",
|
|
215
|
+
maxWaitTime: "Test string",
|
|
216
|
+
priority: 42,
|
|
217
|
+
},
|
|
218
|
+
serviceAccount: "Test string",
|
|
219
|
+
useChiefInTfConfig: true,
|
|
220
|
+
workerConfig: {
|
|
221
|
+
acceleratorConfig: {
|
|
222
|
+
count: "Test string",
|
|
223
|
+
type: "Test string",
|
|
224
|
+
},
|
|
225
|
+
containerArgs: [
|
|
226
|
+
"Test string"
|
|
227
|
+
],
|
|
228
|
+
containerCommand: [
|
|
229
|
+
"Test string"
|
|
230
|
+
],
|
|
231
|
+
diskConfig: {
|
|
232
|
+
bootDiskSizeGb: 42,
|
|
233
|
+
bootDiskType: "Test string",
|
|
234
|
+
},
|
|
235
|
+
imageUri: "Test string",
|
|
236
|
+
tpuTfVersion: "Test string",
|
|
237
|
+
},
|
|
238
|
+
workerCount: "Test string",
|
|
239
|
+
workerType: "Test string",
|
|
240
|
+
},
|
|
241
|
+
trainingOutput: {
|
|
242
|
+
builtInAlgorithmOutput: {
|
|
243
|
+
framework: "Test string",
|
|
244
|
+
modelPath: "Test string",
|
|
245
|
+
pythonVersion: "Test string",
|
|
246
|
+
runtimeVersion: "Test string",
|
|
247
|
+
},
|
|
248
|
+
completedTrialCount: "Test string",
|
|
249
|
+
consumedMLUnits: 42,
|
|
250
|
+
hyperparameterMetricTag: "Test string",
|
|
251
|
+
isBuiltInAlgorithmJob: true,
|
|
252
|
+
isHyperparameterTuningJob: true,
|
|
253
|
+
trials: [
|
|
254
|
+
{
|
|
255
|
+
allMetrics: [
|
|
256
|
+
{
|
|
257
|
+
objectiveValue: 42,
|
|
258
|
+
trainingStep: "Test string",
|
|
259
|
+
}
|
|
260
|
+
],
|
|
261
|
+
builtInAlgorithmOutput: {
|
|
262
|
+
framework: "Test string",
|
|
263
|
+
modelPath: "Test string",
|
|
264
|
+
pythonVersion: "Test string",
|
|
265
|
+
runtimeVersion: "Test string",
|
|
266
|
+
},
|
|
267
|
+
endTime: "Test string",
|
|
268
|
+
finalMetric: {
|
|
269
|
+
objectiveValue: 42,
|
|
270
|
+
trainingStep: "Test string",
|
|
271
|
+
},
|
|
272
|
+
hyperparameters: {
|
|
273
|
+
A: "Test string"
|
|
274
|
+
},
|
|
275
|
+
isTrialStoppedEarly: true,
|
|
276
|
+
startTime: "Test string",
|
|
277
|
+
state: "Test string",
|
|
278
|
+
trialId: "Test string",
|
|
279
|
+
webAccessUris: {
|
|
280
|
+
A: "Test string"
|
|
281
|
+
},
|
|
282
|
+
}
|
|
283
|
+
],
|
|
284
|
+
webAccessUris: {
|
|
285
|
+
A: "Test string"
|
|
286
|
+
},
|
|
287
|
+
},
|
|
288
|
+
});
|
|
289
|
+
/** Describes a job. */
|
|
290
|
+
await gapi.client.ml.projects.jobs.get({
|
|
291
|
+
name: "Test string",
|
|
292
|
+
});
|
|
293
|
+
/** Gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set. */
|
|
294
|
+
await gapi.client.ml.projects.jobs.getIamPolicy({
|
|
295
|
+
"options.requestedPolicyVersion": 42,
|
|
296
|
+
resource: "Test string",
|
|
297
|
+
});
|
|
298
|
+
/** Lists the jobs in the project. If there are no jobs that match the request parameters, the list request returns an empty response body: {}. */
|
|
299
|
+
await gapi.client.ml.projects.jobs.list({
|
|
300
|
+
filter: "Test string",
|
|
301
|
+
pageSize: 42,
|
|
302
|
+
pageToken: "Test string",
|
|
303
|
+
parent: "Test string",
|
|
304
|
+
});
|
|
305
|
+
/** Updates a specific job resource. Currently the only supported fields to update are `labels`. */
|
|
306
|
+
await gapi.client.ml.projects.jobs.patch({
|
|
307
|
+
name: "Test string",
|
|
308
|
+
updateMask: "Test string",
|
|
309
|
+
}, {
|
|
310
|
+
createTime: "Test string",
|
|
311
|
+
endTime: "Test string",
|
|
312
|
+
errorMessage: "Test string",
|
|
313
|
+
etag: "Test string",
|
|
314
|
+
jobId: "Test string",
|
|
315
|
+
jobPosition: "Test string",
|
|
316
|
+
labels: {
|
|
317
|
+
A: "Test string"
|
|
318
|
+
},
|
|
319
|
+
predictionInput: {
|
|
320
|
+
batchSize: "Test string",
|
|
321
|
+
dataFormat: "Test string",
|
|
322
|
+
inputPaths: [
|
|
323
|
+
"Test string"
|
|
324
|
+
],
|
|
325
|
+
maxWorkerCount: "Test string",
|
|
326
|
+
modelName: "Test string",
|
|
327
|
+
outputDataFormat: "Test string",
|
|
328
|
+
outputPath: "Test string",
|
|
329
|
+
region: "Test string",
|
|
330
|
+
runtimeVersion: "Test string",
|
|
331
|
+
signatureName: "Test string",
|
|
332
|
+
uri: "Test string",
|
|
333
|
+
versionName: "Test string",
|
|
334
|
+
},
|
|
335
|
+
predictionOutput: {
|
|
336
|
+
errorCount: "Test string",
|
|
337
|
+
nodeHours: 42,
|
|
338
|
+
outputPath: "Test string",
|
|
339
|
+
predictionCount: "Test string",
|
|
340
|
+
},
|
|
341
|
+
startTime: "Test string",
|
|
342
|
+
state: "Test string",
|
|
343
|
+
trainingInput: {
|
|
344
|
+
args: [
|
|
345
|
+
"Test string"
|
|
346
|
+
],
|
|
347
|
+
enableWebAccess: true,
|
|
348
|
+
encryptionConfig: {
|
|
349
|
+
kmsKeyName: "Test string",
|
|
350
|
+
},
|
|
351
|
+
evaluatorConfig: {
|
|
352
|
+
acceleratorConfig: {
|
|
353
|
+
count: "Test string",
|
|
354
|
+
type: "Test string",
|
|
355
|
+
},
|
|
356
|
+
containerArgs: [
|
|
357
|
+
"Test string"
|
|
358
|
+
],
|
|
359
|
+
containerCommand: [
|
|
360
|
+
"Test string"
|
|
361
|
+
],
|
|
362
|
+
diskConfig: {
|
|
363
|
+
bootDiskSizeGb: 42,
|
|
364
|
+
bootDiskType: "Test string",
|
|
365
|
+
},
|
|
366
|
+
imageUri: "Test string",
|
|
367
|
+
tpuTfVersion: "Test string",
|
|
368
|
+
},
|
|
369
|
+
evaluatorCount: "Test string",
|
|
370
|
+
evaluatorType: "Test string",
|
|
371
|
+
hyperparameters: {
|
|
372
|
+
algorithm: "Test string",
|
|
373
|
+
enableTrialEarlyStopping: true,
|
|
374
|
+
goal: "Test string",
|
|
375
|
+
hyperparameterMetricTag: "Test string",
|
|
376
|
+
maxFailedTrials: 42,
|
|
377
|
+
maxParallelTrials: 42,
|
|
378
|
+
maxTrials: 42,
|
|
379
|
+
params: [
|
|
380
|
+
{
|
|
381
|
+
categoricalValues: [
|
|
382
|
+
"Test string"
|
|
383
|
+
],
|
|
384
|
+
discreteValues: [
|
|
385
|
+
42
|
|
386
|
+
],
|
|
387
|
+
maxValue: 42,
|
|
388
|
+
minValue: 42,
|
|
389
|
+
parameterName: "Test string",
|
|
390
|
+
scaleType: "Test string",
|
|
391
|
+
type: "Test string",
|
|
392
|
+
}
|
|
393
|
+
],
|
|
394
|
+
resumePreviousJobId: "Test string",
|
|
395
|
+
},
|
|
396
|
+
jobDir: "Test string",
|
|
397
|
+
masterConfig: {
|
|
398
|
+
acceleratorConfig: {
|
|
399
|
+
count: "Test string",
|
|
400
|
+
type: "Test string",
|
|
401
|
+
},
|
|
402
|
+
containerArgs: [
|
|
403
|
+
"Test string"
|
|
404
|
+
],
|
|
405
|
+
containerCommand: [
|
|
406
|
+
"Test string"
|
|
407
|
+
],
|
|
408
|
+
diskConfig: {
|
|
409
|
+
bootDiskSizeGb: 42,
|
|
410
|
+
bootDiskType: "Test string",
|
|
411
|
+
},
|
|
412
|
+
imageUri: "Test string",
|
|
413
|
+
tpuTfVersion: "Test string",
|
|
414
|
+
},
|
|
415
|
+
masterType: "Test string",
|
|
416
|
+
network: "Test string",
|
|
417
|
+
packageUris: [
|
|
418
|
+
"Test string"
|
|
419
|
+
],
|
|
420
|
+
parameterServerConfig: {
|
|
421
|
+
acceleratorConfig: {
|
|
422
|
+
count: "Test string",
|
|
423
|
+
type: "Test string",
|
|
424
|
+
},
|
|
425
|
+
containerArgs: [
|
|
426
|
+
"Test string"
|
|
427
|
+
],
|
|
428
|
+
containerCommand: [
|
|
429
|
+
"Test string"
|
|
430
|
+
],
|
|
431
|
+
diskConfig: {
|
|
432
|
+
bootDiskSizeGb: 42,
|
|
433
|
+
bootDiskType: "Test string",
|
|
434
|
+
},
|
|
435
|
+
imageUri: "Test string",
|
|
436
|
+
tpuTfVersion: "Test string",
|
|
437
|
+
},
|
|
438
|
+
parameterServerCount: "Test string",
|
|
439
|
+
parameterServerType: "Test string",
|
|
440
|
+
pythonModule: "Test string",
|
|
441
|
+
pythonVersion: "Test string",
|
|
442
|
+
region: "Test string",
|
|
443
|
+
runtimeVersion: "Test string",
|
|
444
|
+
scaleTier: "Test string",
|
|
445
|
+
scheduling: {
|
|
446
|
+
maxRunningTime: "Test string",
|
|
447
|
+
maxWaitTime: "Test string",
|
|
448
|
+
priority: 42,
|
|
449
|
+
},
|
|
450
|
+
serviceAccount: "Test string",
|
|
451
|
+
useChiefInTfConfig: true,
|
|
452
|
+
workerConfig: {
|
|
453
|
+
acceleratorConfig: {
|
|
454
|
+
count: "Test string",
|
|
455
|
+
type: "Test string",
|
|
456
|
+
},
|
|
457
|
+
containerArgs: [
|
|
458
|
+
"Test string"
|
|
459
|
+
],
|
|
460
|
+
containerCommand: [
|
|
461
|
+
"Test string"
|
|
462
|
+
],
|
|
463
|
+
diskConfig: {
|
|
464
|
+
bootDiskSizeGb: 42,
|
|
465
|
+
bootDiskType: "Test string",
|
|
466
|
+
},
|
|
467
|
+
imageUri: "Test string",
|
|
468
|
+
tpuTfVersion: "Test string",
|
|
469
|
+
},
|
|
470
|
+
workerCount: "Test string",
|
|
471
|
+
workerType: "Test string",
|
|
472
|
+
},
|
|
473
|
+
trainingOutput: {
|
|
474
|
+
builtInAlgorithmOutput: {
|
|
475
|
+
framework: "Test string",
|
|
476
|
+
modelPath: "Test string",
|
|
477
|
+
pythonVersion: "Test string",
|
|
478
|
+
runtimeVersion: "Test string",
|
|
479
|
+
},
|
|
480
|
+
completedTrialCount: "Test string",
|
|
481
|
+
consumedMLUnits: 42,
|
|
482
|
+
hyperparameterMetricTag: "Test string",
|
|
483
|
+
isBuiltInAlgorithmJob: true,
|
|
484
|
+
isHyperparameterTuningJob: true,
|
|
485
|
+
trials: [
|
|
486
|
+
{
|
|
487
|
+
allMetrics: [
|
|
488
|
+
{
|
|
489
|
+
objectiveValue: 42,
|
|
490
|
+
trainingStep: "Test string",
|
|
491
|
+
}
|
|
492
|
+
],
|
|
493
|
+
builtInAlgorithmOutput: {
|
|
494
|
+
framework: "Test string",
|
|
495
|
+
modelPath: "Test string",
|
|
496
|
+
pythonVersion: "Test string",
|
|
497
|
+
runtimeVersion: "Test string",
|
|
498
|
+
},
|
|
499
|
+
endTime: "Test string",
|
|
500
|
+
finalMetric: {
|
|
501
|
+
objectiveValue: 42,
|
|
502
|
+
trainingStep: "Test string",
|
|
503
|
+
},
|
|
504
|
+
hyperparameters: {
|
|
505
|
+
A: "Test string"
|
|
506
|
+
},
|
|
507
|
+
isTrialStoppedEarly: true,
|
|
508
|
+
startTime: "Test string",
|
|
509
|
+
state: "Test string",
|
|
510
|
+
trialId: "Test string",
|
|
511
|
+
webAccessUris: {
|
|
512
|
+
A: "Test string"
|
|
513
|
+
},
|
|
514
|
+
}
|
|
515
|
+
],
|
|
516
|
+
webAccessUris: {
|
|
517
|
+
A: "Test string"
|
|
518
|
+
},
|
|
519
|
+
},
|
|
520
|
+
});
|
|
521
|
+
/** Sets the access control policy on the specified resource. Replaces any existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` errors. */
|
|
522
|
+
await gapi.client.ml.projects.jobs.setIamPolicy({
|
|
523
|
+
resource: "Test string",
|
|
524
|
+
}, {
|
|
525
|
+
policy: {
|
|
526
|
+
auditConfigs: [
|
|
527
|
+
{
|
|
528
|
+
auditLogConfigs: [
|
|
529
|
+
{
|
|
530
|
+
exemptedMembers: [
|
|
531
|
+
"Test string"
|
|
532
|
+
],
|
|
533
|
+
logType: "Test string",
|
|
534
|
+
}
|
|
535
|
+
],
|
|
536
|
+
service: "Test string",
|
|
537
|
+
}
|
|
538
|
+
],
|
|
539
|
+
bindings: [
|
|
540
|
+
{
|
|
541
|
+
condition: {
|
|
542
|
+
description: "Test string",
|
|
543
|
+
expression: "Test string",
|
|
544
|
+
location: "Test string",
|
|
545
|
+
title: "Test string",
|
|
546
|
+
},
|
|
547
|
+
members: [
|
|
548
|
+
"Test string"
|
|
549
|
+
],
|
|
550
|
+
role: "Test string",
|
|
551
|
+
}
|
|
552
|
+
],
|
|
553
|
+
etag: "Test string",
|
|
554
|
+
version: 42,
|
|
555
|
+
},
|
|
556
|
+
updateMask: "Test string",
|
|
557
|
+
});
|
|
558
|
+
/**
|
|
559
|
+
* Returns permissions that a caller has on the specified resource. If the resource does not exist, this will return an empty set of permissions, not a `NOT_FOUND` error. Note: This
|
|
560
|
+
* operation is designed to be used for building permission-aware UIs and command-line tools, not for authorization checking. This operation may "fail open" without warning.
|
|
561
|
+
*/
|
|
562
|
+
await gapi.client.ml.projects.jobs.testIamPermissions({
|
|
563
|
+
resource: "Test string",
|
|
564
|
+
}, {
|
|
565
|
+
permissions: [
|
|
566
|
+
"Test string"
|
|
567
|
+
],
|
|
568
|
+
});
|
|
569
|
+
/** Get the complete list of CMLE capabilities in a location, along with their location-specific properties. */
|
|
570
|
+
await gapi.client.ml.projects.locations.get({
|
|
571
|
+
name: "Test string",
|
|
572
|
+
});
|
|
573
|
+
/** List all locations that provides at least one type of CMLE capability. */
|
|
574
|
+
await gapi.client.ml.projects.locations.list({
|
|
575
|
+
pageSize: 42,
|
|
576
|
+
pageToken: "Test string",
|
|
577
|
+
parent: "Test string",
|
|
578
|
+
});
|
|
579
|
+
/**
|
|
580
|
+
* Starts asynchronous cancellation on a long-running operation. The server makes a best effort to cancel the operation, but success is not guaranteed. If the server doesn't support this
|
|
581
|
+
* method, it returns `google.rpc.Code.UNIMPLEMENTED`. Clients can use Operations.GetOperation or other methods to check whether the cancellation succeeded or whether the operation
|
|
582
|
+
* completed despite cancellation. On successful cancellation, the operation is not deleted; instead, it becomes an operation with an Operation.error value with a google.rpc.Status.code of
|
|
583
|
+
* 1, corresponding to `Code.CANCELLED`.
|
|
584
|
+
*/
|
|
585
|
+
await gapi.client.ml.projects.locations.operations.cancel({
|
|
586
|
+
name: "Test string",
|
|
587
|
+
});
|
|
588
|
+
/** Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service. */
|
|
589
|
+
await gapi.client.ml.projects.locations.operations.get({
|
|
590
|
+
name: "Test string",
|
|
591
|
+
});
|
|
592
|
+
/** Creates a study. */
|
|
593
|
+
await gapi.client.ml.projects.locations.studies.create({
|
|
594
|
+
parent: "Test string",
|
|
595
|
+
studyId: "Test string",
|
|
596
|
+
}, {
|
|
597
|
+
createTime: "Test string",
|
|
598
|
+
inactiveReason: "Test string",
|
|
599
|
+
name: "Test string",
|
|
600
|
+
state: "Test string",
|
|
601
|
+
studyConfig: {
|
|
602
|
+
algorithm: "Test string",
|
|
603
|
+
automatedStoppingConfig: {
|
|
604
|
+
decayCurveStoppingConfig: {
|
|
605
|
+
useElapsedTime: true,
|
|
606
|
+
},
|
|
607
|
+
medianAutomatedStoppingConfig: {
|
|
608
|
+
useElapsedTime: true,
|
|
609
|
+
},
|
|
610
|
+
},
|
|
611
|
+
metrics: [
|
|
612
|
+
{
|
|
613
|
+
goal: "Test string",
|
|
614
|
+
metric: "Test string",
|
|
615
|
+
}
|
|
616
|
+
],
|
|
617
|
+
parameters: [
|
|
618
|
+
{
|
|
619
|
+
categoricalValueSpec: {
|
|
620
|
+
values: [
|
|
621
|
+
"Test string"
|
|
622
|
+
],
|
|
623
|
+
},
|
|
624
|
+
childParameterSpecs: undefined,
|
|
625
|
+
discreteValueSpec: {
|
|
626
|
+
values: [
|
|
627
|
+
42
|
|
628
|
+
],
|
|
629
|
+
},
|
|
630
|
+
doubleValueSpec: {
|
|
631
|
+
maxValue: 42,
|
|
632
|
+
minValue: 42,
|
|
633
|
+
},
|
|
634
|
+
integerValueSpec: {
|
|
635
|
+
maxValue: "Test string",
|
|
636
|
+
minValue: "Test string",
|
|
637
|
+
},
|
|
638
|
+
parameter: "Test string",
|
|
639
|
+
parentCategoricalValues: {
|
|
640
|
+
values: [
|
|
641
|
+
"Test string"
|
|
642
|
+
],
|
|
643
|
+
},
|
|
644
|
+
parentDiscreteValues: {
|
|
645
|
+
values: [
|
|
646
|
+
42
|
|
647
|
+
],
|
|
648
|
+
},
|
|
649
|
+
parentIntValues: {
|
|
650
|
+
values: [
|
|
651
|
+
"Test string"
|
|
652
|
+
],
|
|
653
|
+
},
|
|
654
|
+
scaleType: "Test string",
|
|
655
|
+
type: "Test string",
|
|
656
|
+
}
|
|
657
|
+
],
|
|
658
|
+
},
|
|
659
|
+
});
|
|
660
|
+
/** Deletes a study. */
|
|
661
|
+
await gapi.client.ml.projects.locations.studies.delete({
|
|
662
|
+
name: "Test string",
|
|
663
|
+
});
|
|
664
|
+
/** Gets a study. */
|
|
665
|
+
await gapi.client.ml.projects.locations.studies.get({
|
|
666
|
+
name: "Test string",
|
|
667
|
+
});
|
|
668
|
+
/** Lists all the studies in a region for an associated project. */
|
|
669
|
+
await gapi.client.ml.projects.locations.studies.list({
|
|
670
|
+
parent: "Test string",
|
|
671
|
+
});
|
|
672
|
+
/** Adds a measurement of the objective metrics to a trial. This measurement is assumed to have been taken before the trial is complete. */
|
|
673
|
+
await gapi.client.ml.projects.locations.studies.trials.addMeasurement({
|
|
674
|
+
name: "Test string",
|
|
675
|
+
}, {
|
|
676
|
+
measurement: {
|
|
677
|
+
elapsedTime: "Test string",
|
|
678
|
+
metrics: [
|
|
679
|
+
{
|
|
680
|
+
metric: "Test string",
|
|
681
|
+
value: 42,
|
|
682
|
+
}
|
|
683
|
+
],
|
|
684
|
+
stepCount: "Test string",
|
|
685
|
+
},
|
|
686
|
+
});
|
|
687
|
+
/** Checks whether a trial should stop or not. Returns a long-running operation. When the operation is successful, it will contain a CheckTrialEarlyStoppingStateResponse. */
|
|
688
|
+
await gapi.client.ml.projects.locations.studies.trials.checkEarlyStoppingState({
|
|
689
|
+
name: "Test string",
|
|
690
|
+
}, {
|
|
691
|
+
});
|
|
692
|
+
/** Marks a trial as complete. */
|
|
693
|
+
await gapi.client.ml.projects.locations.studies.trials.complete({
|
|
694
|
+
name: "Test string",
|
|
695
|
+
}, {
|
|
696
|
+
finalMeasurement: {
|
|
697
|
+
elapsedTime: "Test string",
|
|
698
|
+
metrics: [
|
|
699
|
+
{
|
|
700
|
+
metric: "Test string",
|
|
701
|
+
value: 42,
|
|
702
|
+
}
|
|
703
|
+
],
|
|
704
|
+
stepCount: "Test string",
|
|
705
|
+
},
|
|
706
|
+
infeasibleReason: "Test string",
|
|
707
|
+
trialInfeasible: true,
|
|
708
|
+
});
|
|
709
|
+
/** Adds a user provided trial to a study. */
|
|
710
|
+
await gapi.client.ml.projects.locations.studies.trials.create({
|
|
711
|
+
parent: "Test string",
|
|
712
|
+
}, {
|
|
713
|
+
clientId: "Test string",
|
|
714
|
+
endTime: "Test string",
|
|
715
|
+
finalMeasurement: {
|
|
716
|
+
elapsedTime: "Test string",
|
|
717
|
+
metrics: [
|
|
718
|
+
{
|
|
719
|
+
metric: "Test string",
|
|
720
|
+
value: 42,
|
|
721
|
+
}
|
|
722
|
+
],
|
|
723
|
+
stepCount: "Test string",
|
|
724
|
+
},
|
|
725
|
+
infeasibleReason: "Test string",
|
|
726
|
+
measurements: [
|
|
727
|
+
{
|
|
728
|
+
elapsedTime: "Test string",
|
|
729
|
+
metrics: [
|
|
730
|
+
{
|
|
731
|
+
metric: "Test string",
|
|
732
|
+
value: 42,
|
|
733
|
+
}
|
|
734
|
+
],
|
|
735
|
+
stepCount: "Test string",
|
|
736
|
+
}
|
|
737
|
+
],
|
|
738
|
+
name: "Test string",
|
|
739
|
+
parameters: [
|
|
740
|
+
{
|
|
741
|
+
floatValue: 42,
|
|
742
|
+
intValue: "Test string",
|
|
743
|
+
parameter: "Test string",
|
|
744
|
+
stringValue: "Test string",
|
|
745
|
+
}
|
|
746
|
+
],
|
|
747
|
+
startTime: "Test string",
|
|
748
|
+
state: "Test string",
|
|
749
|
+
trialInfeasible: true,
|
|
750
|
+
});
|
|
751
|
+
/** Deletes a trial. */
|
|
752
|
+
await gapi.client.ml.projects.locations.studies.trials.delete({
|
|
753
|
+
name: "Test string",
|
|
754
|
+
});
|
|
755
|
+
/** Gets a trial. */
|
|
756
|
+
await gapi.client.ml.projects.locations.studies.trials.get({
|
|
757
|
+
name: "Test string",
|
|
758
|
+
});
|
|
759
|
+
/** Lists the trials associated with a study. */
|
|
760
|
+
await gapi.client.ml.projects.locations.studies.trials.list({
|
|
761
|
+
parent: "Test string",
|
|
762
|
+
});
|
|
763
|
+
/**
|
|
764
|
+
* Lists the pareto-optimal trials for multi-objective study or the optimal trials for single-objective study. The definition of pareto-optimal can be checked in wiki page.
|
|
765
|
+
* https://en.wikipedia.org/wiki/Pareto_efficiency
|
|
766
|
+
*/
|
|
767
|
+
await gapi.client.ml.projects.locations.studies.trials.listOptimalTrials({
|
|
768
|
+
parent: "Test string",
|
|
769
|
+
}, {
|
|
770
|
+
});
|
|
771
|
+
/** Stops a trial. */
|
|
772
|
+
await gapi.client.ml.projects.locations.studies.trials.stop({
|
|
773
|
+
name: "Test string",
|
|
774
|
+
}, {
|
|
775
|
+
});
|
|
776
|
+
/**
|
|
777
|
+
* Adds one or more trials to a study, with parameter values suggested by AI Platform Vizier. Returns a long-running operation associated with the generation of trial suggestions. When
|
|
778
|
+
* this long-running operation succeeds, it will contain a SuggestTrialsResponse.
|
|
779
|
+
*/
|
|
780
|
+
await gapi.client.ml.projects.locations.studies.trials.suggest({
|
|
781
|
+
parent: "Test string",
|
|
782
|
+
}, {
|
|
783
|
+
clientId: "Test string",
|
|
784
|
+
suggestionCount: 42,
|
|
785
|
+
});
|
|
786
|
+
/**
|
|
787
|
+
* Creates a model which will later contain one or more versions. You must add at least one version before you can request predictions from the model. Add versions by calling
|
|
788
|
+
* projects.models.versions.create.
|
|
789
|
+
*/
|
|
790
|
+
await gapi.client.ml.projects.models.create({
|
|
791
|
+
parent: "Test string",
|
|
792
|
+
}, {
|
|
793
|
+
defaultVersion: {
|
|
794
|
+
acceleratorConfig: {
|
|
795
|
+
count: "Test string",
|
|
796
|
+
type: "Test string",
|
|
797
|
+
},
|
|
798
|
+
autoScaling: {
|
|
799
|
+
maxNodes: 42,
|
|
800
|
+
metrics: [
|
|
801
|
+
{
|
|
802
|
+
name: "Test string",
|
|
803
|
+
target: 42,
|
|
804
|
+
}
|
|
805
|
+
],
|
|
806
|
+
minNodes: 42,
|
|
807
|
+
},
|
|
808
|
+
container: {
|
|
809
|
+
args: [
|
|
810
|
+
"Test string"
|
|
811
|
+
],
|
|
812
|
+
command: [
|
|
813
|
+
"Test string"
|
|
814
|
+
],
|
|
815
|
+
env: [
|
|
816
|
+
{
|
|
817
|
+
name: "Test string",
|
|
818
|
+
value: "Test string",
|
|
819
|
+
}
|
|
820
|
+
],
|
|
821
|
+
image: "Test string",
|
|
822
|
+
ports: [
|
|
823
|
+
{
|
|
824
|
+
containerPort: 42,
|
|
825
|
+
}
|
|
826
|
+
],
|
|
827
|
+
},
|
|
828
|
+
createTime: "Test string",
|
|
829
|
+
deploymentUri: "Test string",
|
|
830
|
+
description: "Test string",
|
|
831
|
+
errorMessage: "Test string",
|
|
832
|
+
etag: "Test string",
|
|
833
|
+
explanationConfig: {
|
|
834
|
+
integratedGradientsAttribution: {
|
|
835
|
+
numIntegralSteps: 42,
|
|
836
|
+
},
|
|
837
|
+
sampledShapleyAttribution: {
|
|
838
|
+
numPaths: 42,
|
|
839
|
+
},
|
|
840
|
+
xraiAttribution: {
|
|
841
|
+
numIntegralSteps: 42,
|
|
842
|
+
},
|
|
843
|
+
},
|
|
844
|
+
framework: "Test string",
|
|
845
|
+
isDefault: true,
|
|
846
|
+
labels: {
|
|
847
|
+
A: "Test string"
|
|
848
|
+
},
|
|
849
|
+
lastMigrationModelId: "Test string",
|
|
850
|
+
lastMigrationTime: "Test string",
|
|
851
|
+
lastUseTime: "Test string",
|
|
852
|
+
machineType: "Test string",
|
|
853
|
+
manualScaling: {
|
|
854
|
+
nodes: 42,
|
|
855
|
+
},
|
|
856
|
+
name: "Test string",
|
|
857
|
+
packageUris: [
|
|
858
|
+
"Test string"
|
|
859
|
+
],
|
|
860
|
+
predictionClass: "Test string",
|
|
861
|
+
pythonVersion: "Test string",
|
|
862
|
+
requestLoggingConfig: {
|
|
863
|
+
bigqueryTableName: "Test string",
|
|
864
|
+
samplingPercentage: 42,
|
|
865
|
+
},
|
|
866
|
+
routes: {
|
|
867
|
+
health: "Test string",
|
|
868
|
+
predict: "Test string",
|
|
869
|
+
},
|
|
870
|
+
runtimeVersion: "Test string",
|
|
871
|
+
serviceAccount: "Test string",
|
|
872
|
+
state: "Test string",
|
|
873
|
+
},
|
|
874
|
+
description: "Test string",
|
|
875
|
+
etag: "Test string",
|
|
876
|
+
labels: {
|
|
877
|
+
A: "Test string"
|
|
878
|
+
},
|
|
879
|
+
name: "Test string",
|
|
880
|
+
onlinePredictionConsoleLogging: true,
|
|
881
|
+
onlinePredictionLogging: true,
|
|
882
|
+
regions: [
|
|
883
|
+
"Test string"
|
|
884
|
+
],
|
|
885
|
+
});
|
|
886
|
+
/** Deletes a model. You can only delete a model if there are no versions in it. You can delete versions by calling projects.models.versions.delete. */
|
|
887
|
+
await gapi.client.ml.projects.models.delete({
|
|
888
|
+
name: "Test string",
|
|
889
|
+
});
|
|
890
|
+
/** Gets information about a model, including its name, the description (if set), and the default version (if at least one version of the model has been deployed). */
|
|
891
|
+
await gapi.client.ml.projects.models.get({
|
|
892
|
+
name: "Test string",
|
|
893
|
+
});
|
|
894
|
+
/** Gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set. */
|
|
895
|
+
await gapi.client.ml.projects.models.getIamPolicy({
|
|
896
|
+
"options.requestedPolicyVersion": 42,
|
|
897
|
+
resource: "Test string",
|
|
898
|
+
});
|
|
899
|
+
/**
|
|
900
|
+
* Lists the models in a project. Each project can contain multiple models, and each model can have multiple versions. If there are no models that match the request parameters, the list
|
|
901
|
+
* request returns an empty response body: {}.
|
|
902
|
+
*/
|
|
903
|
+
await gapi.client.ml.projects.models.list({
|
|
904
|
+
filter: "Test string",
|
|
905
|
+
pageSize: 42,
|
|
906
|
+
pageToken: "Test string",
|
|
907
|
+
parent: "Test string",
|
|
908
|
+
});
|
|
909
|
+
/** Updates a specific model resource. Currently the only supported fields to update are `description` and `default_version.name`. */
|
|
910
|
+
await gapi.client.ml.projects.models.patch({
|
|
911
|
+
name: "Test string",
|
|
912
|
+
updateMask: "Test string",
|
|
913
|
+
}, {
|
|
914
|
+
defaultVersion: {
|
|
915
|
+
acceleratorConfig: {
|
|
916
|
+
count: "Test string",
|
|
917
|
+
type: "Test string",
|
|
918
|
+
},
|
|
919
|
+
autoScaling: {
|
|
920
|
+
maxNodes: 42,
|
|
921
|
+
metrics: [
|
|
922
|
+
{
|
|
923
|
+
name: "Test string",
|
|
924
|
+
target: 42,
|
|
925
|
+
}
|
|
926
|
+
],
|
|
927
|
+
minNodes: 42,
|
|
928
|
+
},
|
|
929
|
+
container: {
|
|
930
|
+
args: [
|
|
931
|
+
"Test string"
|
|
932
|
+
],
|
|
933
|
+
command: [
|
|
934
|
+
"Test string"
|
|
935
|
+
],
|
|
936
|
+
env: [
|
|
937
|
+
{
|
|
938
|
+
name: "Test string",
|
|
939
|
+
value: "Test string",
|
|
940
|
+
}
|
|
941
|
+
],
|
|
942
|
+
image: "Test string",
|
|
943
|
+
ports: [
|
|
944
|
+
{
|
|
945
|
+
containerPort: 42,
|
|
946
|
+
}
|
|
947
|
+
],
|
|
948
|
+
},
|
|
949
|
+
createTime: "Test string",
|
|
950
|
+
deploymentUri: "Test string",
|
|
951
|
+
description: "Test string",
|
|
952
|
+
errorMessage: "Test string",
|
|
953
|
+
etag: "Test string",
|
|
954
|
+
explanationConfig: {
|
|
955
|
+
integratedGradientsAttribution: {
|
|
956
|
+
numIntegralSteps: 42,
|
|
957
|
+
},
|
|
958
|
+
sampledShapleyAttribution: {
|
|
959
|
+
numPaths: 42,
|
|
960
|
+
},
|
|
961
|
+
xraiAttribution: {
|
|
962
|
+
numIntegralSteps: 42,
|
|
963
|
+
},
|
|
964
|
+
},
|
|
965
|
+
framework: "Test string",
|
|
966
|
+
isDefault: true,
|
|
967
|
+
labels: {
|
|
968
|
+
A: "Test string"
|
|
969
|
+
},
|
|
970
|
+
lastMigrationModelId: "Test string",
|
|
971
|
+
lastMigrationTime: "Test string",
|
|
972
|
+
lastUseTime: "Test string",
|
|
973
|
+
machineType: "Test string",
|
|
974
|
+
manualScaling: {
|
|
975
|
+
nodes: 42,
|
|
976
|
+
},
|
|
977
|
+
name: "Test string",
|
|
978
|
+
packageUris: [
|
|
979
|
+
"Test string"
|
|
980
|
+
],
|
|
981
|
+
predictionClass: "Test string",
|
|
982
|
+
pythonVersion: "Test string",
|
|
983
|
+
requestLoggingConfig: {
|
|
984
|
+
bigqueryTableName: "Test string",
|
|
985
|
+
samplingPercentage: 42,
|
|
986
|
+
},
|
|
987
|
+
routes: {
|
|
988
|
+
health: "Test string",
|
|
989
|
+
predict: "Test string",
|
|
990
|
+
},
|
|
991
|
+
runtimeVersion: "Test string",
|
|
992
|
+
serviceAccount: "Test string",
|
|
993
|
+
state: "Test string",
|
|
994
|
+
},
|
|
995
|
+
description: "Test string",
|
|
996
|
+
etag: "Test string",
|
|
997
|
+
labels: {
|
|
998
|
+
A: "Test string"
|
|
999
|
+
},
|
|
1000
|
+
name: "Test string",
|
|
1001
|
+
onlinePredictionConsoleLogging: true,
|
|
1002
|
+
onlinePredictionLogging: true,
|
|
1003
|
+
regions: [
|
|
1004
|
+
"Test string"
|
|
1005
|
+
],
|
|
1006
|
+
});
|
|
1007
|
+
/** Sets the access control policy on the specified resource. Replaces any existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` errors. */
|
|
1008
|
+
await gapi.client.ml.projects.models.setIamPolicy({
|
|
1009
|
+
resource: "Test string",
|
|
1010
|
+
}, {
|
|
1011
|
+
policy: {
|
|
1012
|
+
auditConfigs: [
|
|
1013
|
+
{
|
|
1014
|
+
auditLogConfigs: [
|
|
1015
|
+
{
|
|
1016
|
+
exemptedMembers: [
|
|
1017
|
+
"Test string"
|
|
1018
|
+
],
|
|
1019
|
+
logType: "Test string",
|
|
1020
|
+
}
|
|
1021
|
+
],
|
|
1022
|
+
service: "Test string",
|
|
1023
|
+
}
|
|
1024
|
+
],
|
|
1025
|
+
bindings: [
|
|
1026
|
+
{
|
|
1027
|
+
condition: {
|
|
1028
|
+
description: "Test string",
|
|
1029
|
+
expression: "Test string",
|
|
1030
|
+
location: "Test string",
|
|
1031
|
+
title: "Test string",
|
|
1032
|
+
},
|
|
1033
|
+
members: [
|
|
1034
|
+
"Test string"
|
|
1035
|
+
],
|
|
1036
|
+
role: "Test string",
|
|
1037
|
+
}
|
|
1038
|
+
],
|
|
1039
|
+
etag: "Test string",
|
|
1040
|
+
version: 42,
|
|
1041
|
+
},
|
|
1042
|
+
updateMask: "Test string",
|
|
1043
|
+
});
|
|
1044
|
+
/**
|
|
1045
|
+
* Returns permissions that a caller has on the specified resource. If the resource does not exist, this will return an empty set of permissions, not a `NOT_FOUND` error. Note: This
|
|
1046
|
+
* operation is designed to be used for building permission-aware UIs and command-line tools, not for authorization checking. This operation may "fail open" without warning.
|
|
1047
|
+
*/
|
|
1048
|
+
await gapi.client.ml.projects.models.testIamPermissions({
|
|
1049
|
+
resource: "Test string",
|
|
1050
|
+
}, {
|
|
1051
|
+
permissions: [
|
|
1052
|
+
"Test string"
|
|
1053
|
+
],
|
|
1054
|
+
});
|
|
1055
|
+
/**
|
|
1056
|
+
* Creates a new version of a model from a trained TensorFlow model. If the version created in the cloud by this call is the first deployed version of the specified model, it will be made
|
|
1057
|
+
* the default version of the model. When you add a version to a model that already has one or more versions, the default version does not automatically change. If you want a new version
|
|
1058
|
+
* to be the default, you must call projects.models.versions.setDefault.
|
|
1059
|
+
*/
|
|
1060
|
+
await gapi.client.ml.projects.models.versions.create({
|
|
1061
|
+
parent: "Test string",
|
|
1062
|
+
}, {
|
|
1063
|
+
acceleratorConfig: {
|
|
1064
|
+
count: "Test string",
|
|
1065
|
+
type: "Test string",
|
|
1066
|
+
},
|
|
1067
|
+
autoScaling: {
|
|
1068
|
+
maxNodes: 42,
|
|
1069
|
+
metrics: [
|
|
1070
|
+
{
|
|
1071
|
+
name: "Test string",
|
|
1072
|
+
target: 42,
|
|
1073
|
+
}
|
|
1074
|
+
],
|
|
1075
|
+
minNodes: 42,
|
|
1076
|
+
},
|
|
1077
|
+
container: {
|
|
1078
|
+
args: [
|
|
1079
|
+
"Test string"
|
|
1080
|
+
],
|
|
1081
|
+
command: [
|
|
1082
|
+
"Test string"
|
|
1083
|
+
],
|
|
1084
|
+
env: [
|
|
1085
|
+
{
|
|
1086
|
+
name: "Test string",
|
|
1087
|
+
value: "Test string",
|
|
1088
|
+
}
|
|
1089
|
+
],
|
|
1090
|
+
image: "Test string",
|
|
1091
|
+
ports: [
|
|
1092
|
+
{
|
|
1093
|
+
containerPort: 42,
|
|
1094
|
+
}
|
|
1095
|
+
],
|
|
1096
|
+
},
|
|
1097
|
+
createTime: "Test string",
|
|
1098
|
+
deploymentUri: "Test string",
|
|
1099
|
+
description: "Test string",
|
|
1100
|
+
errorMessage: "Test string",
|
|
1101
|
+
etag: "Test string",
|
|
1102
|
+
explanationConfig: {
|
|
1103
|
+
integratedGradientsAttribution: {
|
|
1104
|
+
numIntegralSteps: 42,
|
|
1105
|
+
},
|
|
1106
|
+
sampledShapleyAttribution: {
|
|
1107
|
+
numPaths: 42,
|
|
1108
|
+
},
|
|
1109
|
+
xraiAttribution: {
|
|
1110
|
+
numIntegralSteps: 42,
|
|
1111
|
+
},
|
|
1112
|
+
},
|
|
1113
|
+
framework: "Test string",
|
|
1114
|
+
isDefault: true,
|
|
1115
|
+
labels: {
|
|
1116
|
+
A: "Test string"
|
|
1117
|
+
},
|
|
1118
|
+
lastMigrationModelId: "Test string",
|
|
1119
|
+
lastMigrationTime: "Test string",
|
|
1120
|
+
lastUseTime: "Test string",
|
|
1121
|
+
machineType: "Test string",
|
|
1122
|
+
manualScaling: {
|
|
1123
|
+
nodes: 42,
|
|
1124
|
+
},
|
|
1125
|
+
name: "Test string",
|
|
1126
|
+
packageUris: [
|
|
1127
|
+
"Test string"
|
|
1128
|
+
],
|
|
1129
|
+
predictionClass: "Test string",
|
|
1130
|
+
pythonVersion: "Test string",
|
|
1131
|
+
requestLoggingConfig: {
|
|
1132
|
+
bigqueryTableName: "Test string",
|
|
1133
|
+
samplingPercentage: 42,
|
|
1134
|
+
},
|
|
1135
|
+
routes: {
|
|
1136
|
+
health: "Test string",
|
|
1137
|
+
predict: "Test string",
|
|
1138
|
+
},
|
|
1139
|
+
runtimeVersion: "Test string",
|
|
1140
|
+
serviceAccount: "Test string",
|
|
1141
|
+
state: "Test string",
|
|
1142
|
+
});
|
|
1143
|
+
/**
|
|
1144
|
+
* Deletes a model version. Each model can have multiple versions deployed and in use at any given time. Use this method to remove a single version. Note: You cannot delete the version
|
|
1145
|
+
* that is set as the default version of the model unless it is the only remaining version.
|
|
1146
|
+
*/
|
|
1147
|
+
await gapi.client.ml.projects.models.versions.delete({
|
|
1148
|
+
name: "Test string",
|
|
1149
|
+
});
|
|
1150
|
+
/**
|
|
1151
|
+
* Gets information about a model version. Models can have multiple versions. You can call projects.models.versions.list to get the same information that this method returns for all of the
|
|
1152
|
+
* versions of a model.
|
|
1153
|
+
*/
|
|
1154
|
+
await gapi.client.ml.projects.models.versions.get({
|
|
1155
|
+
name: "Test string",
|
|
1156
|
+
});
|
|
1157
|
+
/**
|
|
1158
|
+
* Gets basic information about all the versions of a model. If you expect that a model has many versions, or if you need to handle only a limited number of results at a time, you can
|
|
1159
|
+
* request that the list be retrieved in batches (called pages). If there are no versions that match the request parameters, the list request returns an empty response body: {}.
|
|
1160
|
+
*/
|
|
1161
|
+
await gapi.client.ml.projects.models.versions.list({
|
|
1162
|
+
filter: "Test string",
|
|
1163
|
+
pageSize: 42,
|
|
1164
|
+
pageToken: "Test string",
|
|
1165
|
+
parent: "Test string",
|
|
1166
|
+
});
|
|
1167
|
+
/** Updates the specified Version resource. Currently the only update-able fields are `description`, `requestLoggingConfig`, `autoScaling.minNodes`, and `manualScaling.nodes`. */
|
|
1168
|
+
await gapi.client.ml.projects.models.versions.patch({
|
|
1169
|
+
name: "Test string",
|
|
1170
|
+
updateMask: "Test string",
|
|
1171
|
+
}, {
|
|
1172
|
+
acceleratorConfig: {
|
|
1173
|
+
count: "Test string",
|
|
1174
|
+
type: "Test string",
|
|
1175
|
+
},
|
|
1176
|
+
autoScaling: {
|
|
1177
|
+
maxNodes: 42,
|
|
1178
|
+
metrics: [
|
|
1179
|
+
{
|
|
1180
|
+
name: "Test string",
|
|
1181
|
+
target: 42,
|
|
1182
|
+
}
|
|
1183
|
+
],
|
|
1184
|
+
minNodes: 42,
|
|
1185
|
+
},
|
|
1186
|
+
container: {
|
|
1187
|
+
args: [
|
|
1188
|
+
"Test string"
|
|
1189
|
+
],
|
|
1190
|
+
command: [
|
|
1191
|
+
"Test string"
|
|
1192
|
+
],
|
|
1193
|
+
env: [
|
|
1194
|
+
{
|
|
1195
|
+
name: "Test string",
|
|
1196
|
+
value: "Test string",
|
|
1197
|
+
}
|
|
1198
|
+
],
|
|
1199
|
+
image: "Test string",
|
|
1200
|
+
ports: [
|
|
1201
|
+
{
|
|
1202
|
+
containerPort: 42,
|
|
1203
|
+
}
|
|
1204
|
+
],
|
|
1205
|
+
},
|
|
1206
|
+
createTime: "Test string",
|
|
1207
|
+
deploymentUri: "Test string",
|
|
1208
|
+
description: "Test string",
|
|
1209
|
+
errorMessage: "Test string",
|
|
1210
|
+
etag: "Test string",
|
|
1211
|
+
explanationConfig: {
|
|
1212
|
+
integratedGradientsAttribution: {
|
|
1213
|
+
numIntegralSteps: 42,
|
|
1214
|
+
},
|
|
1215
|
+
sampledShapleyAttribution: {
|
|
1216
|
+
numPaths: 42,
|
|
1217
|
+
},
|
|
1218
|
+
xraiAttribution: {
|
|
1219
|
+
numIntegralSteps: 42,
|
|
1220
|
+
},
|
|
1221
|
+
},
|
|
1222
|
+
framework: "Test string",
|
|
1223
|
+
isDefault: true,
|
|
1224
|
+
labels: {
|
|
1225
|
+
A: "Test string"
|
|
1226
|
+
},
|
|
1227
|
+
lastMigrationModelId: "Test string",
|
|
1228
|
+
lastMigrationTime: "Test string",
|
|
1229
|
+
lastUseTime: "Test string",
|
|
1230
|
+
machineType: "Test string",
|
|
1231
|
+
manualScaling: {
|
|
1232
|
+
nodes: 42,
|
|
1233
|
+
},
|
|
1234
|
+
name: "Test string",
|
|
1235
|
+
packageUris: [
|
|
1236
|
+
"Test string"
|
|
1237
|
+
],
|
|
1238
|
+
predictionClass: "Test string",
|
|
1239
|
+
pythonVersion: "Test string",
|
|
1240
|
+
requestLoggingConfig: {
|
|
1241
|
+
bigqueryTableName: "Test string",
|
|
1242
|
+
samplingPercentage: 42,
|
|
1243
|
+
},
|
|
1244
|
+
routes: {
|
|
1245
|
+
health: "Test string",
|
|
1246
|
+
predict: "Test string",
|
|
1247
|
+
},
|
|
1248
|
+
runtimeVersion: "Test string",
|
|
1249
|
+
serviceAccount: "Test string",
|
|
1250
|
+
state: "Test string",
|
|
1251
|
+
});
|
|
1252
|
+
/**
|
|
1253
|
+
* Designates a version to be the default for the model. The default version is used for prediction requests made against the model that don't specify a version. The first version to be
|
|
1254
|
+
* created for a model is automatically set as the default. You must make any subsequent changes to the default version setting manually using this method.
|
|
1255
|
+
*/
|
|
1256
|
+
await gapi.client.ml.projects.models.versions.setDefault({
|
|
1257
|
+
name: "Test string",
|
|
1258
|
+
}, {
|
|
1259
|
+
});
|
|
1260
|
+
/**
|
|
1261
|
+
* Starts asynchronous cancellation on a long-running operation. The server makes a best effort to cancel the operation, but success is not guaranteed. If the server doesn't support this
|
|
1262
|
+
* method, it returns `google.rpc.Code.UNIMPLEMENTED`. Clients can use Operations.GetOperation or other methods to check whether the cancellation succeeded or whether the operation
|
|
1263
|
+
* completed despite cancellation. On successful cancellation, the operation is not deleted; instead, it becomes an operation with an Operation.error value with a google.rpc.Status.code of
|
|
1264
|
+
* 1, corresponding to `Code.CANCELLED`.
|
|
1265
|
+
*/
|
|
1266
|
+
await gapi.client.ml.projects.operations.cancel({
|
|
1267
|
+
name: "Test string",
|
|
1268
|
+
});
|
|
1269
|
+
/** Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service. */
|
|
1270
|
+
await gapi.client.ml.projects.operations.get({
|
|
1271
|
+
name: "Test string",
|
|
1272
|
+
});
|
|
1273
|
+
/**
|
|
1274
|
+
* Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`. NOTE: the `name` binding allows API services to
|
|
1275
|
+
* override the binding to use different resource name schemes, such as `users/*/operations`. To override the binding, API services can add a binding such as
|
|
1276
|
+
* `"/v1/{name=users/*}/operations"` to their service configuration. For backwards compatibility, the default name includes the operations collection id, however overriding users must
|
|
1277
|
+
* ensure the name binding is the parent resource, without the operations collection id.
|
|
1278
|
+
*/
|
|
1279
|
+
await gapi.client.ml.projects.operations.list({
|
|
1280
|
+
filter: "Test string",
|
|
1281
|
+
name: "Test string",
|
|
1282
|
+
pageSize: 42,
|
|
1283
|
+
pageToken: "Test string",
|
|
1284
|
+
});
|
|
1285
|
+
}
|
|
1286
|
+
});
|