Skip to content

Commit

Permalink
GRPC clients version 10.1.5
Browse files Browse the repository at this point in the history
  • Loading branch information
clarifai-prod committed Feb 20, 2024
1 parent 33ca947 commit 4d6751d
Show file tree
Hide file tree
Showing 10 changed files with 254 additions and 10 deletions.
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
10.1.4
10.1.5
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "clarifai-nodejs-grpc",
"version": "10.1.4",
"version": "10.1.5",
"description": "The official Clarifai Node.js gRPC client",
"main": "src/index.js",
"repository": "https://github.com/Clarifai/clarifai-javascript-grpc",
Expand Down
14 changes: 12 additions & 2 deletions proto/clarifai/api/resources.proto
Original file line number Diff line number Diff line change
Expand Up @@ -1758,6 +1758,7 @@ enum EvaluationType {
Segmentation = 3;
Clustering = 4;
Tracker = 5;
Generation = 6;
}


Expand Down Expand Up @@ -3053,6 +3054,9 @@ message Task {
// Specify whether existing Annotations within the same app that are generated by other auto annotation tasks
// with the specified Concept from the selected Model or Workflow should deleted before executing the Task
bool delete_previous_annotations = 20;

// Tasks metrics are filled in upon user-request.
TaskMetrics metrics = 21;
}

// AiAssistParameters
Expand Down Expand Up @@ -3243,8 +3247,10 @@ message ThresholdRange {
}

message TaskConceptAutoAnnotationConfig {
// Filter anontations by their annotation data type.
// This specifies types in an OR fashion, e.g. a `dog` concept that appears as a mask or a bbox.
// Filter annotations by their annotation data type.
// This is a bit-mask field that holds multiple AnnotationDataType values that are combined in an OR fashion.
// Example: if annotation_data_types = 34, then we filter annotations that appear as a mask or a bounding box,
// because MASK = 32 and BOUNDING_BOX = 2.
uint32 annotation_data_types = 1;

// Filter annotations by concept value.
Expand All @@ -3270,6 +3276,10 @@ enum AnnotationDataType {
}


message TaskMetrics {
uint64 estimated_labeled_inputs_count = 1;
}

enum RoleType {
TEAM = 0;
ORG = 1;
Expand Down
27 changes: 27 additions & 0 deletions proto/clarifai/api/resources_pb.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5507,6 +5507,11 @@ export class Task extends jspb.Message {
getDeletePreviousAnnotations(): boolean;
setDeletePreviousAnnotations(value: boolean): Task;

hasMetrics(): boolean;
clearMetrics(): void;
getMetrics(): TaskMetrics | undefined;
setMetrics(value?: TaskMetrics): Task;

serializeBinary(): Uint8Array;
toObject(includeInstance?: boolean): Task.AsObject;
static toObject(includeInstance: boolean, msg: Task): Task.AsObject;
Expand Down Expand Up @@ -5539,6 +5544,7 @@ export namespace Task {
labelOrderId: string,
conceptsList: Array<TaskConcept.AsObject>,
deletePreviousAnnotations: boolean,
metrics?: TaskMetrics.AsObject,
}

export enum TaskType {
Expand Down Expand Up @@ -5947,6 +5953,26 @@ export namespace TaskConcept {
}
}

export class TaskMetrics extends jspb.Message {
getEstimatedLabeledInputsCount(): number;
setEstimatedLabeledInputsCount(value: number): TaskMetrics;

serializeBinary(): Uint8Array;
toObject(includeInstance?: boolean): TaskMetrics.AsObject;
static toObject(includeInstance: boolean, msg: TaskMetrics): TaskMetrics.AsObject;
static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};
static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
static serializeBinaryToWriter(message: TaskMetrics, writer: jspb.BinaryWriter): void;
static deserializeBinary(bytes: Uint8Array): TaskMetrics;
static deserializeBinaryFromReader(message: TaskMetrics, reader: jspb.BinaryReader): TaskMetrics;
}

export namespace TaskMetrics {
export type AsObject = {
estimatedLabeledInputsCount: number,
}
}

export class Collector extends jspb.Message {
getId(): string;
setId(value: string): Collector;
Expand Down Expand Up @@ -7782,6 +7808,7 @@ export enum EvaluationType {
SEGMENTATION = 3,
CLUSTERING = 4,
TRACKER = 5,
GENERATION = 6,
}

export enum APIEventType {
Expand Down
208 changes: 206 additions & 2 deletions proto/clarifai/api/resources_pb.js
Original file line number Diff line number Diff line change
Expand Up @@ -221,6 +221,7 @@ goog.exportSymbol('proto.clarifai.api.TaskConcept', null, global);
goog.exportSymbol('proto.clarifai.api.TaskConceptAutoAnnotationConfig', null, global);
goog.exportSymbol('proto.clarifai.api.TaskInputSource', null, global);
goog.exportSymbol('proto.clarifai.api.TaskInputSource.TaskInputSourceType', null, global);
goog.exportSymbol('proto.clarifai.api.TaskMetrics', null, global);
goog.exportSymbol('proto.clarifai.api.TaskReview', null, global);
goog.exportSymbol('proto.clarifai.api.TaskReview.StrategyInfoCase', null, global);
goog.exportSymbol('proto.clarifai.api.TaskReview.TaskReviewStrategy', null, global);
Expand Down Expand Up @@ -3312,6 +3313,27 @@ if (goog.DEBUG && !COMPILED) {
*/
proto.clarifai.api.TaskConcept.displayName = 'proto.clarifai.api.TaskConcept';
}
/**
* Generated by JsPbCodeGenerator.
* @param {Array=} opt_data Optional initial data array, typically from a
* server response, or constructed directly in Javascript. The array is used
* in place and becomes part of the constructed object. It is not cloned.
* If no data is provided, the constructed object will be empty, but still
* valid.
* @extends {jspb.Message}
* @constructor
*/
proto.clarifai.api.TaskMetrics = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.clarifai.api.TaskMetrics, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.clarifai.api.TaskMetrics.displayName = 'proto.clarifai.api.TaskMetrics';
}
/**
* Generated by JsPbCodeGenerator.
* @param {Array=} opt_data Optional initial data array, typically from a
Expand Down Expand Up @@ -47020,7 +47042,8 @@ proto.clarifai.api.Task.toObject = function(includeInstance, msg) {
labelOrderId: jspb.Message.getFieldWithDefault(msg, 18, ""),
conceptsList: jspb.Message.toObjectList(msg.getConceptsList(),
proto.clarifai.api.TaskConcept.toObject, includeInstance),
deletePreviousAnnotations: jspb.Message.getBooleanFieldWithDefault(msg, 20, false)
deletePreviousAnnotations: jspb.Message.getBooleanFieldWithDefault(msg, 20, false),
metrics: (f = msg.getMetrics()) && proto.clarifai.api.TaskMetrics.toObject(includeInstance, f)
};

if (includeInstance) {
Expand Down Expand Up @@ -47147,6 +47170,11 @@ proto.clarifai.api.Task.deserializeBinaryFromReader = function(msg, reader) {
var value = /** @type {boolean} */ (reader.readBool());
msg.setDeletePreviousAnnotations(value);
break;
case 21:
var value = new proto.clarifai.api.TaskMetrics;
reader.readMessage(value,proto.clarifai.api.TaskMetrics.deserializeBinaryFromReader);
msg.setMetrics(value);
break;
default:
reader.skipField();
break;
Expand Down Expand Up @@ -47326,6 +47354,14 @@ proto.clarifai.api.Task.serializeBinaryToWriter = function(message, writer) {
f
);
}
f = message.getMetrics();
if (f != null) {
writer.writeMessage(
21,
f,
proto.clarifai.api.TaskMetrics.serializeBinaryToWriter
);
}
};


Expand Down Expand Up @@ -47909,6 +47945,43 @@ proto.clarifai.api.Task.prototype.setDeletePreviousAnnotations = function(value)
};


/**
* optional TaskMetrics metrics = 21;
* @return {?proto.clarifai.api.TaskMetrics}
*/
proto.clarifai.api.Task.prototype.getMetrics = function() {
return /** @type{?proto.clarifai.api.TaskMetrics} */ (
jspb.Message.getWrapperField(this, proto.clarifai.api.TaskMetrics, 21));
};


/**
* @param {?proto.clarifai.api.TaskMetrics|undefined} value
* @return {!proto.clarifai.api.Task} returns this
*/
proto.clarifai.api.Task.prototype.setMetrics = function(value) {
return jspb.Message.setWrapperField(this, 21, value);
};


/**
* Clears the message field making it undefined.
* @return {!proto.clarifai.api.Task} returns this
*/
proto.clarifai.api.Task.prototype.clearMetrics = function() {
return this.setMetrics(undefined);
};


/**
* Returns whether this field is set.
* @return {boolean}
*/
proto.clarifai.api.Task.prototype.hasMetrics = function() {
return jspb.Message.getField(this, 21) != null;
};



/**
* List of repeated fields within this message type.
Expand Down Expand Up @@ -50628,6 +50701,136 @@ proto.clarifai.api.TaskConcept.prototype.hasAutoAnnotationConfig = function() {



if (jspb.Message.GENERATE_TO_OBJECT) {
/**
* Creates an object representation of this proto.
* Field names that are reserved in JavaScript and will be renamed to pb_name.
* Optional fields that are not set will be set to undefined.
* To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
* For the list of reserved names please see:
* net/proto2/compiler/js/internal/generator.cc#kKeyword.
* @param {boolean=} opt_includeInstance Deprecated. whether to include the
* JSPB instance for transitional soy proto support:
* http://goto/soy-param-migration
* @return {!Object}
*/
proto.clarifai.api.TaskMetrics.prototype.toObject = function(opt_includeInstance) {
return proto.clarifai.api.TaskMetrics.toObject(opt_includeInstance, this);
};


/**
* Static version of the {@see toObject} method.
* @param {boolean|undefined} includeInstance Deprecated. Whether to include
* the JSPB instance for transitional soy proto support:
* http://goto/soy-param-migration
* @param {!proto.clarifai.api.TaskMetrics} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.clarifai.api.TaskMetrics.toObject = function(includeInstance, msg) {
var f, obj = {
estimatedLabeledInputsCount: jspb.Message.getFieldWithDefault(msg, 1, 0)
};

if (includeInstance) {
obj.$jspbMessageInstance = msg;
}
return obj;
};
}


/**
* Deserializes binary data (in protobuf wire format).
* @param {jspb.ByteSource} bytes The bytes to deserialize.
* @return {!proto.clarifai.api.TaskMetrics}
*/
proto.clarifai.api.TaskMetrics.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.clarifai.api.TaskMetrics;
return proto.clarifai.api.TaskMetrics.deserializeBinaryFromReader(msg, reader);
};


/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.clarifai.api.TaskMetrics} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.clarifai.api.TaskMetrics}
*/
proto.clarifai.api.TaskMetrics.deserializeBinaryFromReader = function(msg, reader) {
while (reader.nextField()) {
if (reader.isEndGroup()) {
break;
}
var field = reader.getFieldNumber();
switch (field) {
case 1:
var value = /** @type {number} */ (reader.readUint64());
msg.setEstimatedLabeledInputsCount(value);
break;
default:
reader.skipField();
break;
}
}
return msg;
};


/**
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.clarifai.api.TaskMetrics.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
proto.clarifai.api.TaskMetrics.serializeBinaryToWriter(this, writer);
return writer.getResultBuffer();
};


/**
* Serializes the given message to binary data (in protobuf wire
* format), writing to the given BinaryWriter.
* @param {!proto.clarifai.api.TaskMetrics} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.clarifai.api.TaskMetrics.serializeBinaryToWriter = function(message, writer) {
var f = undefined;
f = message.getEstimatedLabeledInputsCount();
if (f !== 0) {
writer.writeUint64(
1,
f
);
}
};


/**
* optional uint64 estimated_labeled_inputs_count = 1;
* @return {number}
*/
proto.clarifai.api.TaskMetrics.prototype.getEstimatedLabeledInputsCount = function() {
return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0));
};


/**
* @param {number} value
* @return {!proto.clarifai.api.TaskMetrics} returns this
*/
proto.clarifai.api.TaskMetrics.prototype.setEstimatedLabeledInputsCount = function(value) {
return jspb.Message.setProto3IntField(this, 1, value);
};





if (jspb.Message.GENERATE_TO_OBJECT) {
/**
* Creates an object representation of this proto.
Expand Down Expand Up @@ -63817,7 +64020,8 @@ proto.clarifai.api.EvaluationType = {
DETECTION: 2,
SEGMENTATION: 3,
CLUSTERING: 4,
TRACKER: 5
TRACKER: 5,
GENERATION: 6
};

/**
Expand Down
4 changes: 2 additions & 2 deletions proto/clarifai/api/service.proto
Original file line number Diff line number Diff line change
Expand Up @@ -6403,7 +6403,7 @@ message GetTaskRequest {
string task_id = 2;

// (optional URL parameter) List of additional fields to be included in the response.
// Currently supported: all, worker.users, review.users.
// Currently supported: all, worker.users, review.users, metrics.estimated_labeled_inputs_count.
repeated string additional_fields = 3;
}

Expand All @@ -6428,7 +6428,7 @@ message ListTasksRequest {
bool including_label_order_tasks = 6;

// (optional URL parameter) List of additional fields to be included in the response.
// Currently supported: all, worker.users, review.users.
// Currently supported: all, worker.users, review.users, metrics.estimated_labeled_inputs_count.
repeated string additional_fields = 7;

// (optional) task IDs to filter on
Expand Down
Loading

0 comments on commit 4d6751d

Please sign in to comment.