clarifai-web-grpc 10.2.1 → 10.3.1

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.
Files changed (35) hide show
  1. package/README.md +13 -11
  2. package/VERSION +1 -1
  3. package/dist/cjs/index.d.ts +2 -1
  4. package/dist/cjs/index.js +8 -2
  5. package/dist/cjs/proto/clarifai/api/resources_pb.js +2720 -113
  6. package/dist/cjs/proto/clarifai/api/service_grpc_web_pb.js +38 -42
  7. package/dist/cjs/proto/clarifai/api/service_pb.js +1042 -445
  8. package/dist/cjs/proto/clarifai/api/status/status_code_pb.js +6 -0
  9. package/dist/cjs/proto/clarifai/auth/scope/scope_pb.js +2 -0
  10. package/dist/cjs/resources.d.ts +1 -0
  11. package/dist/cjs/resources.js +3 -0
  12. package/dist/esm/index.d.ts +2 -1
  13. package/dist/esm/index.js +6 -2
  14. package/dist/esm/proto/clarifai/api/resources_pb.js +2720 -113
  15. package/dist/esm/proto/clarifai/api/service_grpc_web_pb.js +38 -42
  16. package/dist/esm/proto/clarifai/api/service_pb.js +1042 -445
  17. package/dist/esm/proto/clarifai/api/status/status_code_pb.js +6 -0
  18. package/dist/esm/proto/clarifai/auth/scope/scope_pb.js +2 -0
  19. package/dist/esm/resources.d.ts +1 -0
  20. package/dist/esm/resources.js +1 -0
  21. package/examples/post-app.ts +27 -0
  22. package/examples/post-input.ts +42 -0
  23. package/index.ts +7 -2
  24. package/package.json +1 -1
  25. package/proto/clarifai/api/resources_pb.d.ts +435 -0
  26. package/proto/clarifai/api/resources_pb.js +3370 -114
  27. package/proto/clarifai/api/service_grpc_web_pb.d.ts +10 -12
  28. package/proto/clarifai/api/service_grpc_web_pb.js +56 -61
  29. package/proto/clarifai/api/service_pb.d.ts +164 -72
  30. package/proto/clarifai/api/service_pb.js +1534 -767
  31. package/proto/clarifai/api/status/status_code_pb.d.ts +6 -0
  32. package/proto/clarifai/api/status/status_code_pb.js +6 -0
  33. package/proto/clarifai/auth/scope/scope_pb.d.ts +2 -0
  34. package/proto/clarifai/auth/scope/scope_pb.js +2 -0
  35. package/resources.ts +1 -0
@@ -165,6 +165,10 @@ proto.clarifai.api.status.StatusCode = {
165
165
  RUNNER_INVALID_ARGUMENT: 25602,
166
166
  RUNNER_INVALID_REQUEST: 25603,
167
167
  RUNNER_NEEDS_RETRY: 25604,
168
+ RUNNER_STREAM_START: 25605,
169
+ RUNNER_STREAM_END: 25606,
170
+ RUNNER_ITEM_CANCELLED: 25607,
171
+ RUNNER_PROCESSING_FAILED: 25608,
168
172
  INPUT_DOWNLOAD_SUCCESS: 30000,
169
173
  INPUT_DOWNLOAD_PENDING: 30001,
170
174
  INPUT_DOWNLOAD_FAILED: 30002,
@@ -307,10 +311,12 @@ proto.clarifai.api.status.StatusCode = {
307
311
  TASK_CONFLICT: 54100,
308
312
  TASK_NOT_IMPLEMENTED: 54101,
309
313
  TASK_MISSING: 54102,
314
+ TASK_PERMISSION_DENIED: 54103,
310
315
  TASK_ASSIGNMENT_SUCCESS: 54200,
311
316
  TASK_ASSIGNMENT_PENDING: 54201,
312
317
  TASK_ASSIGNMENT_AWAITING_REVIEW: 54202,
313
318
  TASK_ASSIGNMENT_AWAITING_CONSENSUS_REVIEW: 54203,
319
+ TASK_ASSIGNMENT_REVIEW_DENIED: 54204,
314
320
  LABEL_ORDER_PENDING: 55001,
315
321
  LABEL_ORDER_IN_PROGRESS: 55002,
316
322
  LABEL_ORDER_SUCCESS: 55003,
@@ -236,6 +236,8 @@ proto.clarifai.auth.scope.S = {
236
236
  MODELS_DELETE: 17,
237
237
  MODELS_TRAIN: 26,
238
238
  MODELS_SYNC: 27,
239
+ MODELEXPORTS_GET: 142,
240
+ MODELEXPORTS_ADD: 143,
239
241
  WORKFLOWS_ADD: 18,
240
242
  WORKFLOWS_GET: 19,
241
243
  WORKFLOWS_PATCH: 20,
@@ -1 +1,2 @@
1
1
  export * from './proto/clarifai/api/resources_pb';
2
+ export { Struct } from 'google-protobuf/google/protobuf/struct_pb';
@@ -1 +1,2 @@
1
1
  export * from './proto/clarifai/api/resources_pb';
2
+ export { Struct } from 'google-protobuf/google/protobuf/struct_pb';
@@ -0,0 +1,27 @@
1
+ import { ClarifaiStub } from '../index'
2
+ import { App } from '../resources'
3
+ import { PostAppsRequest } from '../service'
4
+
5
+ export async function createAnApp() {
6
+ // get a client object
7
+ const client = ClarifaiStub.promise()
8
+
9
+ // create an app
10
+ const app = new App();
11
+ app.setId('cat-app');
12
+ app.setDefaultWorkflowId('General-Detection');
13
+ app.setDescription('An app for some cats');
14
+
15
+ // create a request
16
+ const req = new PostAppsRequest();
17
+ req.setAppsList([app]);
18
+
19
+ // send the request
20
+ const auth = {
21
+ authorization: `Key ${process.env.CLARIFAI_TOKEN}`,
22
+ };
23
+ const resp = await client.postApps(req, auth);
24
+
25
+ // log the app id
26
+ console.log(resp.getAppsList()[0].getId());
27
+ }
@@ -0,0 +1,42 @@
1
+ import { ClarifaiStub } from '../index'
2
+ import { Struct, Data, Input, Text } from '../resources'
3
+ import { PostInputsRequest } from '../service'
4
+
5
+ export async function createAnInput() {
6
+ // create an input with some text. In a real app, this might come
7
+ // from a filepicker widget, or maybe a datasource like S3 or a database.
8
+ const input = new Input();
9
+
10
+ const data = new Data();
11
+
12
+ const text = new Text();
13
+ text.setRaw("hello world");
14
+
15
+ // we can also attach metadata to an input so we can correlate it with
16
+ // other data in our system. This can be any JSON-serializable object.
17
+ const metadata = Struct.fromJavaScript({
18
+ product_id: '1234',
19
+ location: 'San Francisco',
20
+ client: 'acme',
21
+ });
22
+
23
+ data.setMetadata(metadata);
24
+
25
+ input.setData(data);
26
+
27
+ // get a client object
28
+ const client = ClarifaiStub.promise()
29
+
30
+ // create a request
31
+ const req = new PostInputsRequest();
32
+ req.setInputsList([input]);
33
+
34
+ // send the request
35
+ const auth = {
36
+ authorization: `Key ${process.env.CLARIFAI_TOKEN}`,
37
+ };
38
+ const resp = await client.postInputs(req, auth);
39
+
40
+ // log the input id
41
+ console.log(resp.getInputsList()[0].getId());
42
+ }
package/index.ts CHANGED
@@ -1,12 +1,17 @@
1
1
  import { V2Client, V2PromiseClient } from './proto/clarifai/api/service_grpc_web_pb'
2
2
 
3
3
  export class ClarifaiStub {
4
- static grpc (hostname = 'api.clarifai.com') {
4
+ static grpc (hostname = 'https://api-grpc-web.clarifai.com') {
5
5
  const options = { 'grpc.max_receive_message_length': 128 * 1024 * 1024 } // 128 MB
6
6
  return new V2Client(hostname, null, options)
7
7
  }
8
+
9
+ static promise (hostname = 'https://api-grpc-web.clarifai.com') {
10
+ const options = { 'grpc.max_receive_message_length': 128 * 1024 * 1024 } // 128 MB
11
+ return new V2PromiseClient(hostname, null, options)
12
+ }
8
13
  }
9
14
 
10
15
  export { V2Client, V2PromiseClient }
11
- export { RpcError, Metadata, ClientReadableStream } from 'grpc-web'
16
+ export { RpcError, Metadata, ClientReadableStream, Request, UnaryResponse } from 'grpc-web'
12
17
  export { BaseResponse } from './proto/clarifai/api/status/status_pb'
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "clarifai-web-grpc",
3
- "version": "10.2.1",
3
+ "version": "10.3.1",
4
4
  "description": "The official Clarifai gRPC-web client",
5
5
  "main": "dist/cjs/index.js",
6
6
  "module": "dist/esm/index.js",
@@ -251,6 +251,11 @@ export class AppExtraInfo extends jspb.Message {
251
251
  getSearchRevisionMarker(): string;
252
252
  setSearchRevisionMarker(value: string): AppExtraInfo;
253
253
 
254
+ getCounts(): AppResourceCounts | undefined;
255
+ setCounts(value?: AppResourceCounts): AppExtraInfo;
256
+ hasCounts(): boolean;
257
+ clearCounts(): AppExtraInfo;
258
+
254
259
  serializeBinary(): Uint8Array;
255
260
  toObject(includeInstance?: boolean): AppExtraInfo.AsObject;
256
261
  static toObject(includeInstance: boolean, msg: AppExtraInfo): AppExtraInfo.AsObject;
@@ -262,6 +267,7 @@ export class AppExtraInfo extends jspb.Message {
262
267
  export namespace AppExtraInfo {
263
268
  export type AsObject = {
264
269
  searchRevisionMarker: string,
270
+ counts?: AppResourceCounts.AsObject,
265
271
  }
266
272
  }
267
273
 
@@ -283,6 +289,40 @@ export namespace AppQuery {
283
289
  }
284
290
  }
285
291
 
292
+ export class AppResourceCounts extends jspb.Message {
293
+ getDatasets(): number;
294
+ setDatasets(value: number): AppResourceCounts;
295
+
296
+ getModels(): number;
297
+ setModels(value: number): AppResourceCounts;
298
+
299
+ getWorkflows(): number;
300
+ setWorkflows(value: number): AppResourceCounts;
301
+
302
+ getModules(): number;
303
+ setModules(value: number): AppResourceCounts;
304
+
305
+ getInputs(): number;
306
+ setInputs(value: number): AppResourceCounts;
307
+
308
+ serializeBinary(): Uint8Array;
309
+ toObject(includeInstance?: boolean): AppResourceCounts.AsObject;
310
+ static toObject(includeInstance: boolean, msg: AppResourceCounts): AppResourceCounts.AsObject;
311
+ static serializeBinaryToWriter(message: AppResourceCounts, writer: jspb.BinaryWriter): void;
312
+ static deserializeBinary(bytes: Uint8Array): AppResourceCounts;
313
+ static deserializeBinaryFromReader(message: AppResourceCounts, reader: jspb.BinaryReader): AppResourceCounts;
314
+ }
315
+
316
+ export namespace AppResourceCounts {
317
+ export type AsObject = {
318
+ datasets: number,
319
+ models: number,
320
+ workflows: number,
321
+ modules: number,
322
+ inputs: number,
323
+ }
324
+ }
325
+
286
326
  export class Collaborator extends jspb.Message {
287
327
  getId(): string;
288
328
  setId(value: string): Collaborator;
@@ -2003,6 +2043,9 @@ export class DatasetVersion extends jspb.Message {
2003
2043
  clearEmbedModelVersionIdsList(): DatasetVersion;
2004
2044
  addEmbedModelVersionIds(value: string, index?: number): DatasetVersion;
2005
2045
 
2046
+ getRequestOrigin(): DatasetVersionRequestOrigin;
2047
+ setRequestOrigin(value: DatasetVersionRequestOrigin): DatasetVersion;
2048
+
2006
2049
  getDataConfigCase(): DatasetVersion.DataConfigCase;
2007
2050
 
2008
2051
  serializeBinary(): Uint8Array;
@@ -2031,6 +2074,7 @@ export namespace DatasetVersion {
2031
2074
  metadata?: google_protobuf_struct_pb.Struct.AsObject,
2032
2075
  visibility?: Visibility.AsObject,
2033
2076
  embedModelVersionIdsList: Array<string>,
2077
+ requestOrigin: DatasetVersionRequestOrigin,
2034
2078
  }
2035
2079
 
2036
2080
  export enum DataConfigCase {
@@ -3330,6 +3374,16 @@ export class ModelVersion extends jspb.Message {
3330
3374
  getTrainLog(): string;
3331
3375
  setTrainLog(value: string): ModelVersion;
3332
3376
 
3377
+ getInferenceComputeInfo(): ComputeInfo | undefined;
3378
+ setInferenceComputeInfo(value?: ComputeInfo): ModelVersion;
3379
+ hasInferenceComputeInfo(): boolean;
3380
+ clearInferenceComputeInfo(): ModelVersion;
3381
+
3382
+ getBuildInfo(): BuildInfo | undefined;
3383
+ setBuildInfo(value?: BuildInfo): ModelVersion;
3384
+ hasBuildInfo(): boolean;
3385
+ clearBuildInfo(): ModelVersion;
3386
+
3333
3387
  serializeBinary(): Uint8Array;
3334
3388
  toObject(includeInstance?: boolean): ModelVersion.AsObject;
3335
3389
  static toObject(includeInstance: boolean, msg: ModelVersion): ModelVersion.AsObject;
@@ -3360,6 +3414,34 @@ export namespace ModelVersion {
3360
3414
  trainInfo?: TrainInfo.AsObject,
3361
3415
  importInfo?: ImportInfo.AsObject,
3362
3416
  trainLog: string,
3417
+ inferenceComputeInfo?: ComputeInfo.AsObject,
3418
+ buildInfo?: BuildInfo.AsObject,
3419
+ }
3420
+ }
3421
+
3422
+ export class BuildInfo extends jspb.Message {
3423
+ getDockerImageName(): string;
3424
+ setDockerImageName(value: string): BuildInfo;
3425
+
3426
+ getDockerImageTag(): string;
3427
+ setDockerImageTag(value: string): BuildInfo;
3428
+
3429
+ getDockerImageDigest(): string;
3430
+ setDockerImageDigest(value: string): BuildInfo;
3431
+
3432
+ serializeBinary(): Uint8Array;
3433
+ toObject(includeInstance?: boolean): BuildInfo.AsObject;
3434
+ static toObject(includeInstance: boolean, msg: BuildInfo): BuildInfo.AsObject;
3435
+ static serializeBinaryToWriter(message: BuildInfo, writer: jspb.BinaryWriter): void;
3436
+ static deserializeBinary(bytes: Uint8Array): BuildInfo;
3437
+ static deserializeBinaryFromReader(message: BuildInfo, reader: jspb.BinaryReader): BuildInfo;
3438
+ }
3439
+
3440
+ export namespace BuildInfo {
3441
+ export type AsObject = {
3442
+ dockerImageName: string,
3443
+ dockerImageTag: string,
3444
+ dockerImageDigest: string,
3363
3445
  }
3364
3446
  }
3365
3447
 
@@ -3838,6 +3920,16 @@ export class EvalTestSetEntry extends jspb.Message {
3838
3920
  hasAnnotation(): boolean;
3839
3921
  clearAnnotation(): EvalTestSetEntry;
3840
3922
 
3923
+ getPredictedAnnotation(): Annotation | undefined;
3924
+ setPredictedAnnotation(value?: Annotation): EvalTestSetEntry;
3925
+ hasPredictedAnnotation(): boolean;
3926
+ clearPredictedAnnotation(): EvalTestSetEntry;
3927
+
3928
+ getGroundTruthAnnotation(): Annotation | undefined;
3929
+ setGroundTruthAnnotation(value?: Annotation): EvalTestSetEntry;
3930
+ hasGroundTruthAnnotation(): boolean;
3931
+ clearGroundTruthAnnotation(): EvalTestSetEntry;
3932
+
3841
3933
  serializeBinary(): Uint8Array;
3842
3934
  toObject(includeInstance?: boolean): EvalTestSetEntry.AsObject;
3843
3935
  static toObject(includeInstance: boolean, msg: EvalTestSetEntry): EvalTestSetEntry.AsObject;
@@ -3852,6 +3944,8 @@ export namespace EvalTestSetEntry {
3852
3944
  predictedConceptsList: Array<Concept.AsObject>,
3853
3945
  groundTruthConceptsList: Array<Concept.AsObject>,
3854
3946
  annotation?: Annotation.AsObject,
3947
+ predictedAnnotation?: Annotation.AsObject,
3948
+ groundTruthAnnotation?: Annotation.AsObject,
3855
3949
  }
3856
3950
  }
3857
3951
 
@@ -5974,6 +6068,11 @@ export class TaskStatusCountPerUser extends jspb.Message {
5974
6068
  getAwaitingConsensusReview(): number;
5975
6069
  setAwaitingConsensusReview(value: number): TaskStatusCountPerUser;
5976
6070
 
6071
+ getWorker(): Worker | undefined;
6072
+ setWorker(value?: Worker): TaskStatusCountPerUser;
6073
+ hasWorker(): boolean;
6074
+ clearWorker(): TaskStatusCountPerUser;
6075
+
5977
6076
  serializeBinary(): Uint8Array;
5978
6077
  toObject(includeInstance?: boolean): TaskStatusCountPerUser.AsObject;
5979
6078
  static toObject(includeInstance: boolean, msg: TaskStatusCountPerUser): TaskStatusCountPerUser.AsObject;
@@ -5990,6 +6089,7 @@ export namespace TaskStatusCountPerUser {
5990
6089
  success: number,
5991
6090
  reviewDenied: number,
5992
6091
  awaitingConsensusReview: number,
6092
+ worker?: Worker.AsObject,
5993
6093
  }
5994
6094
  }
5995
6095
 
@@ -7833,6 +7933,28 @@ export class Runner extends jspb.Message {
7833
7933
  clearLabelsList(): Runner;
7834
7934
  addLabels(value: string, index?: number): Runner;
7835
7935
 
7936
+ getModel(): Model | undefined;
7937
+ setModel(value?: Model): Runner;
7938
+ hasModel(): boolean;
7939
+ clearModel(): Runner;
7940
+
7941
+ getWorkflow(): Workflow | undefined;
7942
+ setWorkflow(value?: Workflow): Runner;
7943
+ hasWorkflow(): boolean;
7944
+ clearWorkflow(): Runner;
7945
+
7946
+ getNodepool(): Nodepool | undefined;
7947
+ setNodepool(value?: Nodepool): Runner;
7948
+ hasNodepool(): boolean;
7949
+ clearNodepool(): Runner;
7950
+
7951
+ getComputeInfo(): ComputeInfo | undefined;
7952
+ setComputeInfo(value?: ComputeInfo): Runner;
7953
+ hasComputeInfo(): boolean;
7954
+ clearComputeInfo(): Runner;
7955
+
7956
+ getObjectCase(): Runner.ObjectCase;
7957
+
7836
7958
  serializeBinary(): Uint8Array;
7837
7959
  toObject(includeInstance?: boolean): Runner.AsObject;
7838
7960
  static toObject(includeInstance: boolean, msg: Runner): Runner.AsObject;
@@ -7850,6 +7972,305 @@ export namespace Runner {
7850
7972
  metadata?: google_protobuf_struct_pb.Struct.AsObject,
7851
7973
  userId: string,
7852
7974
  labelsList: Array<string>,
7975
+ model?: Model.AsObject,
7976
+ workflow?: Workflow.AsObject,
7977
+ nodepool?: Nodepool.AsObject,
7978
+ computeInfo?: ComputeInfo.AsObject,
7979
+ }
7980
+
7981
+ export enum ObjectCase {
7982
+ OBJECT_NOT_SET = 0,
7983
+ MODEL = 9,
7984
+ WORKFLOW = 10,
7985
+ }
7986
+ }
7987
+
7988
+ export class Nodepool extends jspb.Message {
7989
+ getId(): string;
7990
+ setId(value: string): Nodepool;
7991
+
7992
+ getUserId(): string;
7993
+ setUserId(value: string): Nodepool;
7994
+
7995
+ getCloudRegion(): CloudRegion | undefined;
7996
+ setCloudRegion(value?: CloudRegion): Nodepool;
7997
+ hasCloudRegion(): boolean;
7998
+ clearCloudRegion(): Nodepool;
7999
+
8000
+ getCapacityTypesList(): Array<Nodepool.CapacityType>;
8001
+ setCapacityTypesList(value: Array<Nodepool.CapacityType>): Nodepool;
8002
+ clearCapacityTypesList(): Nodepool;
8003
+ addCapacityTypes(value: Nodepool.CapacityType, index?: number): Nodepool;
8004
+
8005
+ getInstanceTypesList(): Array<string>;
8006
+ setInstanceTypesList(value: Array<string>): Nodepool;
8007
+ clearInstanceTypesList(): Nodepool;
8008
+ addInstanceTypes(value: string, index?: number): Nodepool;
8009
+
8010
+ getMinInstances(): number;
8011
+ setMinInstances(value: number): Nodepool;
8012
+
8013
+ getMaxInstances(): number;
8014
+ setMaxInstances(value: number): Nodepool;
8015
+
8016
+ serializeBinary(): Uint8Array;
8017
+ toObject(includeInstance?: boolean): Nodepool.AsObject;
8018
+ static toObject(includeInstance: boolean, msg: Nodepool): Nodepool.AsObject;
8019
+ static serializeBinaryToWriter(message: Nodepool, writer: jspb.BinaryWriter): void;
8020
+ static deserializeBinary(bytes: Uint8Array): Nodepool;
8021
+ static deserializeBinaryFromReader(message: Nodepool, reader: jspb.BinaryReader): Nodepool;
8022
+ }
8023
+
8024
+ export namespace Nodepool {
8025
+ export type AsObject = {
8026
+ id: string,
8027
+ userId: string,
8028
+ cloudRegion?: CloudRegion.AsObject,
8029
+ capacityTypesList: Array<Nodepool.CapacityType>,
8030
+ instanceTypesList: Array<string>,
8031
+ minInstances: number,
8032
+ maxInstances: number,
8033
+ }
8034
+
8035
+ export enum CapacityType {
8036
+ UKNOWN_CAPACITY_TYPE = 0,
8037
+ ONDEMAND_TYPE = 1,
8038
+ SPOT_TYPE = 2,
8039
+ }
8040
+ }
8041
+
8042
+ export class CloudRegion extends jspb.Message {
8043
+ getId(): string;
8044
+ setId(value: string): CloudRegion;
8045
+
8046
+ getCloud(): CloudRegion.Cloud;
8047
+ setCloud(value: CloudRegion.Cloud): CloudRegion;
8048
+
8049
+ getRegion(): string;
8050
+ setRegion(value: string): CloudRegion;
8051
+
8052
+ serializeBinary(): Uint8Array;
8053
+ toObject(includeInstance?: boolean): CloudRegion.AsObject;
8054
+ static toObject(includeInstance: boolean, msg: CloudRegion): CloudRegion.AsObject;
8055
+ static serializeBinaryToWriter(message: CloudRegion, writer: jspb.BinaryWriter): void;
8056
+ static deserializeBinary(bytes: Uint8Array): CloudRegion;
8057
+ static deserializeBinaryFromReader(message: CloudRegion, reader: jspb.BinaryReader): CloudRegion;
8058
+ }
8059
+
8060
+ export namespace CloudRegion {
8061
+ export type AsObject = {
8062
+ id: string,
8063
+ cloud: CloudRegion.Cloud,
8064
+ region: string,
8065
+ }
8066
+
8067
+ export enum Cloud {
8068
+ UNKOWN_CLOUD = 0,
8069
+ SELF_HOSTED = 1,
8070
+ AWS = 2,
8071
+ GCP = 3,
8072
+ AZURE = 4,
8073
+ LAMBDA = 5,
8074
+ }
8075
+ }
8076
+
8077
+ export class ComputeInfo extends jspb.Message {
8078
+ getNumCpus(): number;
8079
+ setNumCpus(value: number): ComputeInfo;
8080
+
8081
+ getCpuMemory(): string;
8082
+ setCpuMemory(value: string): ComputeInfo;
8083
+
8084
+ getNumAccelerators(): number;
8085
+ setNumAccelerators(value: number): ComputeInfo;
8086
+
8087
+ getAcceleratorMemory(): string;
8088
+ setAcceleratorMemory(value: string): ComputeInfo;
8089
+
8090
+ getAcceleratorTypeList(): Array<string>;
8091
+ setAcceleratorTypeList(value: Array<string>): ComputeInfo;
8092
+ clearAcceleratorTypeList(): ComputeInfo;
8093
+ addAcceleratorType(value: string, index?: number): ComputeInfo;
8094
+
8095
+ serializeBinary(): Uint8Array;
8096
+ toObject(includeInstance?: boolean): ComputeInfo.AsObject;
8097
+ static toObject(includeInstance: boolean, msg: ComputeInfo): ComputeInfo.AsObject;
8098
+ static serializeBinaryToWriter(message: ComputeInfo, writer: jspb.BinaryWriter): void;
8099
+ static deserializeBinary(bytes: Uint8Array): ComputeInfo;
8100
+ static deserializeBinaryFromReader(message: ComputeInfo, reader: jspb.BinaryReader): ComputeInfo;
8101
+ }
8102
+
8103
+ export namespace ComputeInfo {
8104
+ export type AsObject = {
8105
+ numCpus: number,
8106
+ cpuMemory: string,
8107
+ numAccelerators: number,
8108
+ acceleratorMemory: string,
8109
+ acceleratorTypeList: Array<string>,
8110
+ }
8111
+ }
8112
+
8113
+ export class AutoscaleConfig extends jspb.Message {
8114
+ getMinReplicas(): number;
8115
+ setMinReplicas(value: number): AutoscaleConfig;
8116
+
8117
+ getMaxReplicas(): number;
8118
+ setMaxReplicas(value: number): AutoscaleConfig;
8119
+
8120
+ getTrafficHistorySeconds(): number;
8121
+ setTrafficHistorySeconds(value: number): AutoscaleConfig;
8122
+
8123
+ getScaleDownDelaySeconds(): number;
8124
+ setScaleDownDelaySeconds(value: number): AutoscaleConfig;
8125
+
8126
+ getScaleUpDelaySeconds(): number;
8127
+ setScaleUpDelaySeconds(value: number): AutoscaleConfig;
8128
+
8129
+ getEnablePacking(): boolean;
8130
+ setEnablePacking(value: boolean): AutoscaleConfig;
8131
+
8132
+ serializeBinary(): Uint8Array;
8133
+ toObject(includeInstance?: boolean): AutoscaleConfig.AsObject;
8134
+ static toObject(includeInstance: boolean, msg: AutoscaleConfig): AutoscaleConfig.AsObject;
8135
+ static serializeBinaryToWriter(message: AutoscaleConfig, writer: jspb.BinaryWriter): void;
8136
+ static deserializeBinary(bytes: Uint8Array): AutoscaleConfig;
8137
+ static deserializeBinaryFromReader(message: AutoscaleConfig, reader: jspb.BinaryReader): AutoscaleConfig;
8138
+ }
8139
+
8140
+ export namespace AutoscaleConfig {
8141
+ export type AsObject = {
8142
+ minReplicas: number,
8143
+ maxReplicas: number,
8144
+ trafficHistorySeconds: number,
8145
+ scaleDownDelaySeconds: number,
8146
+ scaleUpDelaySeconds: number,
8147
+ enablePacking: boolean,
8148
+ }
8149
+ }
8150
+
8151
+ export class Deployment extends jspb.Message {
8152
+ getId(): string;
8153
+ setId(value: string): Deployment;
8154
+
8155
+ getUserId(): string;
8156
+ setUserId(value: string): Deployment;
8157
+
8158
+ getAutoscaleConfig(): AutoscaleConfig | undefined;
8159
+ setAutoscaleConfig(value?: AutoscaleConfig): Deployment;
8160
+ hasAutoscaleConfig(): boolean;
8161
+ clearAutoscaleConfig(): Deployment;
8162
+
8163
+ getNodepoolsList(): Array<Nodepool>;
8164
+ setNodepoolsList(value: Array<Nodepool>): Deployment;
8165
+ clearNodepoolsList(): Deployment;
8166
+ addNodepools(value?: Nodepool, index?: number): Nodepool;
8167
+
8168
+ getModel(): Model | undefined;
8169
+ setModel(value?: Model): Deployment;
8170
+ hasModel(): boolean;
8171
+ clearModel(): Deployment;
8172
+
8173
+ getWorkflow(): Workflow | undefined;
8174
+ setWorkflow(value?: Workflow): Deployment;
8175
+ hasWorkflow(): boolean;
8176
+ clearWorkflow(): Deployment;
8177
+
8178
+ getSchedulingChoice(): Deployment.SchedulingChoice;
8179
+ setSchedulingChoice(value: Deployment.SchedulingChoice): Deployment;
8180
+
8181
+ getObjectCase(): Deployment.ObjectCase;
8182
+
8183
+ serializeBinary(): Uint8Array;
8184
+ toObject(includeInstance?: boolean): Deployment.AsObject;
8185
+ static toObject(includeInstance: boolean, msg: Deployment): Deployment.AsObject;
8186
+ static serializeBinaryToWriter(message: Deployment, writer: jspb.BinaryWriter): void;
8187
+ static deserializeBinary(bytes: Uint8Array): Deployment;
8188
+ static deserializeBinaryFromReader(message: Deployment, reader: jspb.BinaryReader): Deployment;
8189
+ }
8190
+
8191
+ export namespace Deployment {
8192
+ export type AsObject = {
8193
+ id: string,
8194
+ userId: string,
8195
+ autoscaleConfig?: AutoscaleConfig.AsObject,
8196
+ nodepoolsList: Array<Nodepool.AsObject>,
8197
+ model?: Model.AsObject,
8198
+ workflow?: Workflow.AsObject,
8199
+ schedulingChoice: Deployment.SchedulingChoice,
8200
+ }
8201
+
8202
+ export enum SchedulingChoice {
8203
+ UNKNOWN_SCHEDULING_CHOICE = 0,
8204
+ FAIL = 1,
8205
+ RANDOM = 2,
8206
+ PRICE = 3,
8207
+ PERFORMANCE = 4,
8208
+ NETWORK = 5,
8209
+ UTILIZATION = 6,
8210
+ PREFER_SPOT = 7,
8211
+ PREFER_ONDEMAND = 8,
8212
+ }
8213
+
8214
+ export enum ObjectCase {
8215
+ OBJECT_NOT_SET = 0,
8216
+ MODEL = 5,
8217
+ WORKFLOW = 6,
8218
+ }
8219
+ }
8220
+
8221
+ export class RunnerSelector extends jspb.Message {
8222
+ getNodepool(): Nodepool | undefined;
8223
+ setNodepool(value?: Nodepool): RunnerSelector;
8224
+ hasNodepool(): boolean;
8225
+ clearNodepool(): RunnerSelector;
8226
+
8227
+ getRunner(): Runner | undefined;
8228
+ setRunner(value?: Runner): RunnerSelector;
8229
+ hasRunner(): boolean;
8230
+ clearRunner(): RunnerSelector;
8231
+
8232
+ getDeployment(): Deployment | undefined;
8233
+ setDeployment(value?: Deployment): RunnerSelector;
8234
+ hasDeployment(): boolean;
8235
+ clearDeployment(): RunnerSelector;
8236
+
8237
+ serializeBinary(): Uint8Array;
8238
+ toObject(includeInstance?: boolean): RunnerSelector.AsObject;
8239
+ static toObject(includeInstance: boolean, msg: RunnerSelector): RunnerSelector.AsObject;
8240
+ static serializeBinaryToWriter(message: RunnerSelector, writer: jspb.BinaryWriter): void;
8241
+ static deserializeBinary(bytes: Uint8Array): RunnerSelector;
8242
+ static deserializeBinaryFromReader(message: RunnerSelector, reader: jspb.BinaryReader): RunnerSelector;
8243
+ }
8244
+
8245
+ export namespace RunnerSelector {
8246
+ export type AsObject = {
8247
+ nodepool?: Nodepool.AsObject,
8248
+ runner?: Runner.AsObject,
8249
+ deployment?: Deployment.AsObject,
8250
+ }
8251
+ }
8252
+
8253
+ export class ProcessingInfo extends jspb.Message {
8254
+ getRunnerMethodType(): RunnerMethodType;
8255
+ setRunnerMethodType(value: RunnerMethodType): ProcessingInfo;
8256
+
8257
+ getStatus(): proto_clarifai_api_status_status_pb.Status | undefined;
8258
+ setStatus(value?: proto_clarifai_api_status_status_pb.Status): ProcessingInfo;
8259
+ hasStatus(): boolean;
8260
+ clearStatus(): ProcessingInfo;
8261
+
8262
+ serializeBinary(): Uint8Array;
8263
+ toObject(includeInstance?: boolean): ProcessingInfo.AsObject;
8264
+ static toObject(includeInstance: boolean, msg: ProcessingInfo): ProcessingInfo.AsObject;
8265
+ static serializeBinaryToWriter(message: ProcessingInfo, writer: jspb.BinaryWriter): void;
8266
+ static deserializeBinary(bytes: Uint8Array): ProcessingInfo;
8267
+ static deserializeBinaryFromReader(message: ProcessingInfo, reader: jspb.BinaryReader): ProcessingInfo;
8268
+ }
8269
+
8270
+ export namespace ProcessingInfo {
8271
+ export type AsObject = {
8272
+ runnerMethodType: RunnerMethodType,
8273
+ status?: proto_clarifai_api_status_status_pb.Status.AsObject,
7853
8274
  }
7854
8275
  }
7855
8276
 
@@ -7858,6 +8279,13 @@ export enum WorkflowModelUseCase {
7858
8279
  CLASSIFICATION = 1,
7859
8280
  DETECTION = 2,
7860
8281
  }
8282
+ export enum DatasetVersionRequestOrigin {
8283
+ DATASET_VERSION_REQUEST_ORIGIN_NOT_SET = 0,
8284
+ MANUAL = 1,
8285
+ TRAINING = 2,
8286
+ EVAL_GROUND_TRUTH = 3,
8287
+ EVAL_PREDICTIONS = 4,
8288
+ }
7861
8289
  export enum DatasetVersionMetricsGroupType {
7862
8290
  DATASET_VERSION_METRICS_GROUP_TYPE_NOT_SET = 0,
7863
8291
  INPUT_TYPE = 2,
@@ -7961,3 +8389,10 @@ export enum InputIDConflictResolution {
7961
8389
  SKIP = 1,
7962
8390
  SUFFIX = 2,
7963
8391
  }
8392
+ export enum RunnerMethodType {
8393
+ UNKNOWN = 0,
8394
+ UNARY_UNARY = 1,
8395
+ UNARY_STREAMING = 2,
8396
+ STREAMING_UNARY = 3,
8397
+ STREAMING_STREAMING = 4,
8398
+ }