From 8e26a334bb7b6bd2bda452284705525c84623f7d Mon Sep 17 00:00:00 2001 From: Rok Povsic Date: Tue, 15 Sep 2020 21:52:11 +0200 Subject: [PATCH] Version 6.8.0 --- VERSION | 2 +- package.json | 2 +- proto/clarifai/api/resources.proto | 11 ++ proto/clarifai/api/service.proto | 9 ++ proto/clarifai/api/service_processed.proto | 9 ++ proto/clarifai/api/status/status_code.proto | 6 + proto/clarifai/auth/scope/scope.proto | 129 ++++++++++++++++---- proto/clarifai/auth/util/extension.proto | 2 +- 8 files changed, 140 insertions(+), 30 deletions(-) diff --git a/VERSION b/VERSION index f0e13c5..e029aa9 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -6.7.0 +6.8.0 diff --git a/package.json b/package.json index 17459b7..a557387 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "clarifai-nodejs-grpc", - "version": "6.7.0", + "version": "6.8.0", "description": "The official Clarifai Node.js gRPC client", "main": "src/index.js", "repository": "https://github.com/Clarifai/clarifai-javascript-grpc", diff --git a/proto/clarifai/api/resources.proto b/proto/clarifai/api/resources.proto index 15582c8..148171e 100644 --- a/proto/clarifai/api/resources.proto +++ b/proto/clarifai/api/resources.proto @@ -1603,6 +1603,12 @@ message AnnotationSearchMetrics { // The metric result EvalMetrics metrics = 3; + + // data is filled out with the concepts used for this evaluation + Data data = 4; + + // active_concept_count is the number of concepts for this evaluation + uint32 active_concept_count = 5; } @@ -1613,6 +1619,7 @@ message AnnotationSearchMetrics { + //////////////////////////////////////////////////////////////////////////////// @@ -1816,6 +1823,8 @@ message WorkflowNode { // Each WorkflowNode can connect to multiple input nodes so that we can handle multi-model data // and more complex workflow operations. repeated NodeInput node_inputs = 3; + // suppress the output for workflow prediction + bool suppress_output = 4; } // NodeInput represents inputs to a node of the graph. @@ -1836,6 +1845,8 @@ message WorkflowResult { Model model = 4; Input input = 5; repeated Output outputs = 6; + // Indicate if the output of this model is suppressed. + bool suppress_output = 7; } diff --git a/proto/clarifai/api/service.proto b/proto/clarifai/api/service.proto index 33189b9..2de04e0 100644 --- a/proto/clarifai/api/service.proto +++ b/proto/clarifai/api/service.proto @@ -520,6 +520,7 @@ service V2 { + // Patch one or more inputs. rpc PatchInputs (PatchInputsRequest) returns (MultiInputResponse) { option (google.api.http) = { @@ -2491,6 +2492,8 @@ message PostInputsRequest { + + message PatchInputsRequest { clarifai.api.UserAppIDSet user_app_id = 1; @@ -3105,6 +3108,9 @@ message MultiAnnotationSearchMetricsResponse { + + + @@ -3334,6 +3340,9 @@ message ListTasksRequest { // Get tasks that have ANY user from this list assigned as reviewer. repeated string review_user_ids = 5; + + // Get label order tasks as well + bool including_label_order_tasks = 6; } // Request to patch a list of tasks. diff --git a/proto/clarifai/api/service_processed.proto b/proto/clarifai/api/service_processed.proto index 5a3b377..ed0d420 100644 --- a/proto/clarifai/api/service_processed.proto +++ b/proto/clarifai/api/service_processed.proto @@ -520,6 +520,7 @@ service V2 { + // Patch one or more inputs. rpc PatchInputs (PatchInputsRequest) returns (MultiInputResponse) { option (google.api.http) = { @@ -2491,6 +2492,8 @@ message PostInputsRequest { + + message PatchInputsRequest { clarifai.api.UserAppIDSet user_app_id = 1; @@ -3105,6 +3108,9 @@ message MultiAnnotationSearchMetricsResponse { + + + @@ -3334,6 +3340,9 @@ message ListTasksRequest { // Get tasks that have ANY user from this list assigned as reviewer. repeated string review_user_ids = 5; + + // Get label order tasks as well + bool including_label_order_tasks = 6; } // Request to patch a list of tasks. diff --git a/proto/clarifai/api/status/status_code.proto b/proto/clarifai/api/status/status_code.proto index 4fc0f7b..7f1aaab 100644 --- a/proto/clarifai/api/status/status_code.proto +++ b/proto/clarifai/api/status/status_code.proto @@ -326,6 +326,8 @@ enum StatusCode { TASK_IN_PROGRESS = 54001; // The task is closed. TASK_DONE = 54002; + // An error occurred during add-task-annotations pipeline. + TASK_ADD_ANNOTATIONS_FAILURE = 54005; // The task operation is in conflict with the current state of the server. TASK_CONFLICT = 54100; // Certain task-related scenarios are not implemented. @@ -351,6 +353,10 @@ enum StatusCode { PASSWORD_VALIDATION_FAILED = 61001; PASSWORDPOLICY_INVALID_ARGUMENT = 61002; + // Feature flags status code + FEATUREFLAG_CONFIG_NOT_FOUND = 62000; + FEATUREFLAG_INVALID_ARGUMENT = 62001; + // TODO: Knowledge graph related 80xxx // Internal issues: 98xxx diff --git a/proto/clarifai/auth/scope/scope.proto b/proto/clarifai/auth/scope/scope.proto index 781a711..b9edcc7 100644 --- a/proto/clarifai/auth/scope/scope.proto +++ b/proto/clarifai/auth/scope/scope.proto @@ -34,6 +34,7 @@ message ScopeList { // 3. *_Patch is deprecated and not check anywhere. // enum S { + reserved 30, 31, 32, 33, 34; // introduce undef so that the zero (default/unset) value of the enum is not a real // permission. undef is only present for this purpose and should not be used // to indicate any "real" value. @@ -43,10 +44,12 @@ enum S { // Make an rpc to our prediction services. Predict = 2 [(clarfai_exposed) = true]; - Predict_Feedback = 29 [(clarfai_exposed) = true]; + Predict_Feedback = 29 [(clarfai_exposed) = false, + deprecated = true]; // Make an rpc to our search services. Search = 3 [(clarfai_exposed) = true]; - Search_Feedback = 28 [(clarfai_exposed) = true]; + Search_Feedback = 28 [(clarfai_exposed) = false, + deprecated = true]; // Write to the inputs table in the DB. Inputs_Add = 4 [(clarfai_exposed) = true, @@ -120,12 +123,6 @@ enum S { // Internal only model syncing. Models_Sync = 27 [(clarifai_depending_scopes) = Models_Get]; - // Note: Models_Deploy is effectively doing POST /models/{models_id}/deployments so it's treated that - // way in terms of data access under the hood. - // Write to the model versions DB table. - Models_Deploy = 34 [(clarfai_exposed) = true, - (clarifai_depending_scopes) = Models_Get]; - // TODO: No model get metrics scope. // Write to the workflows DB table. @@ -156,22 +153,6 @@ enum S { // Deprecated TSNEVisualizations_Get = 25 [deprecated = true]; - // Write to the workers DB table. - Workers_Add = 30 [(clarfai_exposed) = true, - (clarifai_depending_scopes) = Workers_Get]; - - // Read from the workers DB table. - Workers_Get = 31 [(clarfai_exposed) = true]; - - // To delete we need read/write. - Workers_Delete = 32 [(clarfai_exposed) = true, - (clarifai_depending_scopes) = Workers_Add, - (clarifai_depending_scopes) = Workers_Get]; - - // Read from the templates DB table. - Templates_Get = 33 [(clarfai_exposed) = true]; - // left numbers for Add, Patch, Delete Templates - // Write to the annotations DB table. Annotations_Add = 37 [(clarfai_exposed) = true, (clarifai_depending_scopes) = Annotations_Get]; @@ -194,14 +175,14 @@ enum S { // Write to the collectors DB table. - Collectors_Add = 41 [(clarfai_exposed) = false, + Collectors_Add = 41 [(clarfai_exposed) = true, (clarifai_depending_scopes) = Collectors_Get]; // Read from the collectors DB table. - Collectors_Get = 42 [(clarfai_exposed) = false]; + Collectors_Get = 42 [(clarfai_exposed) = true]; // To delete we need read/write. - Collectors_Delete = 43 [(clarfai_exposed) = false, + Collectors_Delete = 43 [(clarfai_exposed) = true, (clarifai_depending_scopes) = Collectors_Add, (clarifai_depending_scopes) = Collectors_Get]; @@ -230,7 +211,101 @@ enum S { (clarifai_depending_scopes) = Keys_Add, (clarifai_depending_scopes) = Keys_Get]; + // Write to the app sharing DB table + Collaborators_Add = 51 [(clarfai_exposed) = true, + (clarifai_depending_scopes) = Collaborators_Get]; + + // Read from the app sharing DB table + Collaborators_Get = 50 [(clarfai_exposed) = true]; + + // To delete we need read/write + Collaborators_Delete = 52 [(clarfai_exposed) = true, + (clarifai_depending_scopes) = Collaborators_Add, + (clarifai_depending_scopes) = Collaborators_Get]; + + // Write to the metrics table + Metrics_Add = 54 [(clarfai_exposed) = true, + (clarifai_depending_scopes) = Metrics_Get]; + + // Read from metrics table + Metrics_Get = 53 [(clarfai_exposed) = true]; + + // To delete we need read/write + Metrics_Delete = 63 [(clarfai_exposed) = true, + (clarifai_depending_scopes) = Metrics_Add, + (clarifai_depending_scopes) = Metrics_Get]; + + // Write to tasks DB table. + Tasks_Add = 55 [(clarfai_exposed) = true, + (clarifai_depending_scopes) = Tasks_Get]; + + // Read from the tasks DB table. + Tasks_Get = 56 [(clarfai_exposed) = true]; + + // To delete we need read/write + Tasks_Delete = 70 [(clarfai_exposed) = true, + (clarifai_depending_scopes) = Tasks_Add, + (clarifai_depending_scopes) = Tasks_Get]; + + // Write to the password_policies DB table + PasswordPolicies_Add = 57 [(clarfai_exposed) = true, + (clarifai_depending_scopes) = PasswordPolicies_Get]; + + // Read from the password_policies DB table + PasswordPolicies_Get = 58 [(clarfai_exposed) = true]; + + // To delete password_policies we need read/write + PasswordPolicies_Delete = 59 [(clarfai_exposed) = true, + (clarifai_depending_scopes) = PasswordPolicies_Add, + (clarifai_depending_scopes) = PasswordPolicies_Get]; + + // Write to password_history table + PasswordHistory_Add = 60 [(clarfai_exposed) = false, + (clarifai_depending_scopes) = PasswordHistory_Get]; + + // Read from password_history table + PasswordHistory_Get = 61 [(clarfai_exposed) = false]; + + // To delete password history we need read/write + PasswordHistory_Delete = 62 [(clarfai_exposed) = false, + (clarifai_depending_scopes) = PasswordHistory_Add, + (clarifai_depending_scopes) = PasswordHistory_Get]; + + // Read from notifications table + Notifications_Get = 64 [(clarfai_exposed) = false]; + + // Write to notifications table + Notifications_Add = 65 [(clarfai_exposed) = false, + (clarifai_depending_scopes) = Notifications_Get]; + + // To delete notifications we need read/write + Notifications_Delete = 66 [(clarfai_exposed) = false, + (clarifai_depending_scopes) = Notifications_Add, + (clarifai_depending_scopes) = Notifications_Get]; + + // Read from label orders table + LabelOrders_Get = 67 [(clarfai_exposed) = true]; + + // Write to label orders table + LabelOrders_Add = 68 [(clarfai_exposed) = true, + (clarifai_depending_scopes) = LabelOrders_Get]; + + // To delete label orders we need read/write + LabelOrders_Delete = 69 [(clarfai_exposed) = true, + (clarifai_depending_scopes) = LabelOrders_Add, + (clarifai_depending_scopes) = LabelOrders_Get]; + + // Read from user_feature_configs table + UserFeatureConfigs_Get = 71 [(clarfai_exposed) = true]; + + // Write to configs table + UserFeatureConfigs_Add = 72 [(clarfai_exposed) = false, + (clarifai_depending_scopes) = UserFeatureConfigs_Get]; + // To delete configs we need read/write + UserFeatureConfigs_Delete = 73 [(clarfai_exposed) = false, + (clarifai_depending_scopes) = UserFeatureConfigs_Add, + (clarifai_depending_scopes) = UserFeatureConfigs_Get]; } extend google.protobuf.EnumValueOptions { diff --git a/proto/clarifai/auth/util/extension.proto b/proto/clarifai/auth/util/extension.proto index eabcdeb..af058c1 100644 --- a/proto/clarifai/auth/util/extension.proto +++ b/proto/clarifai/auth/util/extension.proto @@ -20,7 +20,7 @@ extend google.protobuf.FieldOptions { extend google.protobuf.MethodOptions { // indicates if this rpc should be private. If true, then internal use only. If False, - // then publicly avaliable to world. + // then publicly available to world. bool cl_private_rpc = 80321; // For each grpc method we define a list of required low-level auth scopes that are needed