From dd0075b787a19b930881de3250395eb5e0ac4ba7 Mon Sep 17 00:00:00 2001 From: Lahabar Sheetal Madhukar Date: Wed, 18 Aug 2021 15:54:11 -0700 Subject: [PATCH 01/12] personalizer v2.1-preview.1 --- .../preview/v2.1-preview.1/Personalizer.json | 1911 +++++++++++++++++ .../examples/Evaluation_Apply.json | 15 + .../examples/Evaluations_Create.json | 45 + .../examples/Evaluations_Delete.json | 12 + .../examples/Evaluations_Get.json | 76 + .../examples/Evaluations_List.json | 62 + .../examples/Events_Activate.json | 12 + .../examples/Events_Reward.json | 15 + .../v2.1-preview.1/examples/Log_Delete.json | 11 + .../examples/Log_GetProperties.json | 19 + .../examples/Log_Interactions.json | 14 + .../examples/Log_Observations.json | 14 + .../v2.1-preview.1/examples/Model_Get.json | 14 + .../examples/Model_GetProperties.json | 17 + .../v2.1-preview.1/examples/Model_Reset.json | 11 + .../examples/MultiSlotEvents_Activate.json | 12 + .../examples/MultiSlotEvents_Reward.json | 24 + .../examples/MultiSlot_Rank.json | 106 + .../v2.1-preview.1/examples/Policy_Get.json | 17 + .../v2.1-preview.1/examples/Policy_Reset.json | 17 + .../examples/Policy_Update.json | 21 + .../preview/v2.1-preview.1/examples/Rank.json | 90 + .../examples/ServiceConfiguration_Get.json | 28 + .../examples/ServiceConfiguration_Update.json | 43 + 24 files changed, 2606 insertions(+) create mode 100644 specification/cognitiveservices/data-plane/Personalizer/preview/v2.1-preview.1/Personalizer.json create mode 100644 specification/cognitiveservices/data-plane/Personalizer/preview/v2.1-preview.1/examples/Evaluation_Apply.json create mode 100644 specification/cognitiveservices/data-plane/Personalizer/preview/v2.1-preview.1/examples/Evaluations_Create.json create mode 100644 specification/cognitiveservices/data-plane/Personalizer/preview/v2.1-preview.1/examples/Evaluations_Delete.json create mode 100644 specification/cognitiveservices/data-plane/Personalizer/preview/v2.1-preview.1/examples/Evaluations_Get.json create mode 100644 specification/cognitiveservices/data-plane/Personalizer/preview/v2.1-preview.1/examples/Evaluations_List.json create mode 100644 specification/cognitiveservices/data-plane/Personalizer/preview/v2.1-preview.1/examples/Events_Activate.json create mode 100644 specification/cognitiveservices/data-plane/Personalizer/preview/v2.1-preview.1/examples/Events_Reward.json create mode 100644 specification/cognitiveservices/data-plane/Personalizer/preview/v2.1-preview.1/examples/Log_Delete.json create mode 100644 specification/cognitiveservices/data-plane/Personalizer/preview/v2.1-preview.1/examples/Log_GetProperties.json create mode 100644 specification/cognitiveservices/data-plane/Personalizer/preview/v2.1-preview.1/examples/Log_Interactions.json create mode 100644 specification/cognitiveservices/data-plane/Personalizer/preview/v2.1-preview.1/examples/Log_Observations.json create mode 100644 specification/cognitiveservices/data-plane/Personalizer/preview/v2.1-preview.1/examples/Model_Get.json create mode 100644 specification/cognitiveservices/data-plane/Personalizer/preview/v2.1-preview.1/examples/Model_GetProperties.json create mode 100644 specification/cognitiveservices/data-plane/Personalizer/preview/v2.1-preview.1/examples/Model_Reset.json create mode 100644 specification/cognitiveservices/data-plane/Personalizer/preview/v2.1-preview.1/examples/MultiSlotEvents_Activate.json create mode 100644 specification/cognitiveservices/data-plane/Personalizer/preview/v2.1-preview.1/examples/MultiSlotEvents_Reward.json create mode 100644 specification/cognitiveservices/data-plane/Personalizer/preview/v2.1-preview.1/examples/MultiSlot_Rank.json create mode 100644 specification/cognitiveservices/data-plane/Personalizer/preview/v2.1-preview.1/examples/Policy_Get.json create mode 100644 specification/cognitiveservices/data-plane/Personalizer/preview/v2.1-preview.1/examples/Policy_Reset.json create mode 100644 specification/cognitiveservices/data-plane/Personalizer/preview/v2.1-preview.1/examples/Policy_Update.json create mode 100644 specification/cognitiveservices/data-plane/Personalizer/preview/v2.1-preview.1/examples/Rank.json create mode 100644 specification/cognitiveservices/data-plane/Personalizer/preview/v2.1-preview.1/examples/ServiceConfiguration_Get.json create mode 100644 specification/cognitiveservices/data-plane/Personalizer/preview/v2.1-preview.1/examples/ServiceConfiguration_Update.json diff --git a/specification/cognitiveservices/data-plane/Personalizer/preview/v2.1-preview.1/Personalizer.json b/specification/cognitiveservices/data-plane/Personalizer/preview/v2.1-preview.1/Personalizer.json new file mode 100644 index 000000000000..70614a53a697 --- /dev/null +++ b/specification/cognitiveservices/data-plane/Personalizer/preview/v2.1-preview.1/Personalizer.json @@ -0,0 +1,1911 @@ +{ + "swagger": "2.0", + "info": { + "title": "Personalizer Client v2.1-preview.1", + "description": "Personalizer Service is an Azure Cognitive Service that makes it easy to target content and experiences without complex pre-analysis or cleanup of past data. Given a context and featurized content, the Personalizer Service returns which content item to show to users in rewardActionId. As rewards are sent in response to the use of rewardActionId, the reinforcement learning algorithm will improve the model and improve performance of future rank calls.", + "version": "v2.1-preview.1" + }, + "host": "localhost:5001", + "basePath": "/personalizer/v2.1-preview.1", + "schemes": [ + "https" + ], + "paths": { + "/configurations/service": { + "put": { + "tags": [ + "ConfigurationsV1Dot1Preview1" + ], + "summary": "Update Service Configuration.", + "description": "Update the Personalizer service configuration.", + "operationId": "ServiceConfiguration_Update", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "parameters": [ + { + "in": "body", + "name": "body", + "description": "The personalizer service configuration.", + "required": true, + "schema": { + "$ref": "#/definitions/ServiceConfiguration" + } + } + ], + "responses": { + "200": { + "description": "Success", + "schema": { + "$ref": "#/definitions/ServiceConfiguration" + } + }, + "default": { + "description": "Updating defaultReward, rewardWaitTime and rewardAggregation when changing learning mode from Online to Apprentice mode and vice versa is not allowed. Make the mode change and then change the additional settings with an additional API call.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "Successful ServiceConfiguration_Update request": { + "$ref": "./examples/ServiceConfiguration_Update.json" + } + } + }, + "get": { + "tags": [ + "ConfigurationsV1Dot1Preview1" + ], + "summary": "Get Service Configuration.", + "description": "Get the Personalizer service configuration.", + "operationId": "ServiceConfiguration_Get", + "produces": [ + "application/json" + ], + "responses": { + "200": { + "description": "Success", + "schema": { + "$ref": "#/definitions/ServiceConfiguration" + } + } + }, + "x-ms-examples": { + "Successful ServiceConfiguration_Get request": { + "$ref": "./examples/ServiceConfiguration_Get.json" + } + } + } + }, + "/configurations/policy": { + "get": { + "tags": [ + "ConfigurationsV1Dot1Preview1" + ], + "summary": "Get Policy.", + "description": "Get the Learning Settings currently used by the Personalizer service.", + "operationId": "Policy_Get", + "produces": [ + "application/json" + ], + "responses": { + "200": { + "description": "Success", + "schema": { + "$ref": "#/definitions/PolicyContract" + } + } + }, + "x-ms-examples": { + "Successful Policy_Get request": { + "$ref": "./examples/Policy_Get.json" + } + } + }, + "put": { + "tags": [ + "ConfigurationsV1Dot1Preview1" + ], + "summary": "Update Policy.", + "description": "Update the Learning Settings that the Personalizer service will use to train models.", + "operationId": "Policy_Update", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "parameters": [ + { + "in": "body", + "name": "body", + "description": "The learning settings.", + "required": true, + "schema": { + "$ref": "#/definitions/PolicyContract" + } + } + ], + "responses": { + "200": { + "description": "Success", + "schema": { + "$ref": "#/definitions/PolicyContract" + } + }, + "default": { + "description": "Invalid policy configuration.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "Successful Policy_Update request": { + "$ref": "./examples/Policy_Update.json" + } + } + }, + "delete": { + "tags": [ + "ConfigurationsV1Dot1Preview1" + ], + "summary": "Reset Policy.", + "description": "Resets the learning settings of the Personalizer service to default.", + "operationId": "Policy_Reset", + "produces": [ + "application/json" + ], + "responses": { + "200": { + "description": "Success", + "schema": { + "$ref": "#/definitions/PolicyContract" + } + } + }, + "x-ms-examples": { + "Successful Policy_Reset request": { + "$ref": "./examples/Policy_Reset.json" + } + } + } + }, + "/configurations/applyFromEvaluation": { + "post": { + "tags": [ + "ConfigurationsV1Dot1Preview1" + ], + "summary": "Apply Learning Settings and model from a pre-existing Offline Evaluation, making them the current online Learning Settings and model and replacing the previous ones.", + "operationId": "Evaluation_Apply", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "parameters": [ + { + "in": "body", + "name": "body", + "required": true, + "schema": { + "$ref": "#/definitions/PolicyReferenceContract" + } + } + ], + "responses": { + "204": { + "description": "Success" + }, + "default": { + "description": "Learning Settings not found in evaluation.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "Successful Evaluation_Apply request": { + "$ref": "./examples/Evaluation_Apply.json" + } + } + } + }, + "/evaluations/{evaluationId}": { + "delete": { + "tags": [ + "EvaluationsV1Dot1Preview1" + ], + "summary": "Delete Evaluation.", + "description": "Delete the Offline Evaluation associated with the Id.", + "operationId": "Evaluations_Delete", + "parameters": [ + { + "in": "path", + "name": "evaluationId", + "description": "Id of the Offline Evaluation to delete.", + "required": true, + "type": "string", + "maxLength": 256 + } + ], + "responses": { + "204": { + "description": "Success" + } + }, + "x-ms-examples": { + "Successful Evaluations_Delete request": { + "$ref": "./examples/Evaluations_Delete.json" + } + } + }, + "get": { + "tags": [ + "EvaluationsV1Dot1Preview1" + ], + "summary": "Get Evaluation.", + "description": "Get the Offline Evaluation associated with the Id.", + "operationId": "Evaluations_Get", + "produces": [ + "application/json" + ], + "parameters": [ + { + "in": "path", + "name": "evaluationId", + "description": "Id of the Offline Evaluation.", + "required": true, + "type": "string", + "maxLength": 256 + } + ], + "responses": { + "200": { + "description": "Success", + "schema": { + "$ref": "#/definitions/Evaluation" + } + }, + "default": { + "description": "Offline Evaluation not found.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "Successful Evaluations_Get request": { + "$ref": "./examples/Evaluations_Get.json" + } + } + } + }, + "/evaluations": { + "get": { + "tags": [ + "EvaluationsV1Dot1Preview1" + ], + "summary": "List Offline Evaluations.", + "description": "List of all Offline Evaluations.", + "operationId": "Evaluations_List", + "produces": [ + "application/json" + ], + "responses": { + "200": { + "description": "Success", + "schema": { + "type": "array", + "items": { + "$ref": "#/definitions/Evaluation" + } + } + } + }, + "x-ms-examples": { + "Successful Evaluations_List request": { + "$ref": "./examples/Evaluations_List.json" + } + } + }, + "post": { + "tags": [ + "EvaluationsV1Dot1Preview1" + ], + "summary": "Create Offline Evaluation.", + "description": "Submit a new Offline Evaluation job.", + "operationId": "Evaluations_Create", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "parameters": [ + { + "in": "body", + "name": "body", + "description": "The Offline Evaluation job definition.", + "required": true, + "schema": { + "$ref": "#/definitions/EvaluationContract" + } + } + ], + "responses": { + "201": { + "description": "Success", + "schema": { + "$ref": "#/definitions/Evaluation" + }, + "headers": { + "Location": { + "description": "Location of the Offline Evaluation status and data.", + "type": "string" + } + } + }, + "default": { + "description": "Invalid evaluation contract.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "Successful Evaluations_Create request": { + "$ref": "./examples/Evaluations_Create.json" + } + } + } + }, + "/events/{eventId}/reward": { + "post": { + "tags": [ + "Events" + ], + "summary": "Post Reward.", + "description": "Report reward between 0 and 1 that resulted from using the action specified in rewardActionId, for the specified event.", + "operationId": "Events_Reward", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "parameters": [ + { + "in": "path", + "name": "eventId", + "description": "The event id this reward applies to.", + "required": true, + "type": "string", + "maxLength": 256 + }, + { + "in": "body", + "name": "body", + "description": "The reward should be a floating point number, typically between 0 and 1.", + "required": true, + "schema": { + "$ref": "#/definitions/RewardRequest" + } + } + ], + "responses": { + "204": { + "description": "Success" + }, + "default": { + "description": "Invalid reward request.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "Successful Events_Reward request": { + "$ref": "./examples/Events_Reward.json" + } + } + } + }, + "/events/{eventId}/activate": { + "post": { + "tags": [ + "Events" + ], + "summary": "Activate Event.", + "description": "Report that the specified event was actually used (e.g. by being displayed to the user) and a reward should be expected for it.", + "operationId": "Events_Activate", + "produces": [ + "application/json" + ], + "parameters": [ + { + "in": "path", + "name": "eventId", + "description": "The event ID to be activated.", + "required": true, + "type": "string", + "maxLength": 256 + } + ], + "responses": { + "204": { + "description": "Success" + }, + "default": { + "description": "Invalid activate event request.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "Successful Events_Activate request": { + "$ref": "./examples/Events_Activate.json" + } + } + } + }, + "/logs/interactions": { + "post": { + "tags": [ + "LogsV2Dot1Preview1" + ], + "summary": "Logs interactions.", + "description": "Logs interactions that will be used by Personalizer for training the model.", + "operationId": "Log_Interactions", + "consumes": [ + "application/octet-stream" + ], + "parameters": [ + { + "in": "body", + "name": "body", + "required": true, + "schema": { + "format": "byte", + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Success" + } + }, + "x-ms-examples": { + "Successful Log_Interactions request": { + "$ref": "./examples/Log_Interactions.json" + } + } + } + }, + "/logs/observations": { + "post": { + "tags": [ + "LogsV2Dot1Preview1" + ], + "summary": "Logs observations.", + "description": "Logs observations that will be used by Personalizer for training the model.", + "operationId": "Log_Observations", + "consumes": [ + "application/octet-stream" + ], + "parameters": [ + { + "in": "body", + "name": "body", + "required": true, + "schema": { + "format": "byte", + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Success" + } + }, + "x-ms-examples": { + "Successful Log_Observations request": { + "$ref": "./examples/Log_Observations.json" + } + } + } + }, + "/logs": { + "delete": { + "tags": [ + "LogsV2Dot1Preview1" + ], + "summary": "Deletes Logs.", + "description": "Delete all logs of Rank and Reward calls stored by Personalizer.", + "operationId": "Log_Delete", + "responses": { + "204": { + "description": "Success" + } + }, + "x-ms-examples": { + "Successful Log_Delete request": { + "$ref": "./examples/Log_Delete.json" + } + } + } + }, + "/logs/properties": { + "get": { + "tags": [ + "LogsV2Dot1Preview1" + ], + "summary": "Get Log Properties.", + "description": "Get properties of the Personalizer logs.", + "operationId": "Log_GetProperties", + "produces": [ + "application/json" + ], + "responses": { + "200": { + "description": "Success", + "schema": { + "$ref": "#/definitions/LogsProperties" + } + }, + "default": { + "description": "Log properties not found.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "Successful Log_GetProperties request": { + "$ref": "./examples/Log_GetProperties.json" + } + } + } + }, + "/model": { + "get": { + "tags": [ + "Model" + ], + "summary": "Get Model.", + "description": "Get the model file generated by Personalizer service.", + "operationId": "Model_Get", + "produces": [ + "application/octet-stream" + ], + "responses": { + "200": { + "description": "Success", + "schema": { + "type": "file" + } + } + }, + "x-ms-examples": { + "Successful Model_Get request": { + "$ref": "./examples/Model_Get.json" + } + } + }, + "delete": { + "tags": [ + "Model" + ], + "summary": "Reset Model.", + "description": "Resets the model file generated by Personalizer service.", + "operationId": "Model_Reset", + "produces": [ + "application/json" + ], + "responses": { + "204": { + "description": "Success" + }, + "default": { + "description": "Model reset failed.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "Successful Model_Reset request": { + "$ref": "./examples/Model_Reset.json" + } + } + } + }, + "/model/properties": { + "get": { + "tags": [ + "Model" + ], + "summary": "Get Model Properties.", + "description": "Get properties of the model file generated by Personalizer service.", + "operationId": "Model_GetProperties", + "produces": [ + "application/json" + ], + "responses": { + "200": { + "description": "Success", + "schema": { + "$ref": "#/definitions/ModelProperties" + } + } + }, + "x-ms-examples": { + "Successful Model_GetProperties request": { + "$ref": "./examples/Model_GetProperties.json" + } + } + } + }, + "/multislot/events/{eventId}/reward": { + "post": { + "tags": [ + "MultiSlotEvents" + ], + "summary": "Post multi-slot Rewards.", + "description": "Report reward that resulted from using the action specified in rewardActionId for the slot.", + "operationId": "MultiSlotEvents_Reward", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "parameters": [ + { + "in": "path", + "name": "eventId", + "description": "The event id this reward applies to.", + "required": true, + "type": "string", + "maxLength": 256 + }, + { + "in": "body", + "name": "body", + "description": "List of slot id and reward values. The reward should be a floating point number, typically between 0 and 1.", + "required": true, + "schema": { + "$ref": "#/definitions/MultiSlotRewardRequest" + } + } + ], + "responses": { + "204": { + "description": "Success" + }, + "default": { + "description": "Invalid reward request.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "Successful MultiSlotEvents_Reward request": { + "$ref": "./examples/MultiSlotEvents_Reward.json" + } + } + } + }, + "/multislot/events/{eventId}/activate": { + "post": { + "tags": [ + "MultiSlotEvents" + ], + "summary": "Activate multi-slot Event.", + "description": "Report that the specified event was actually used or displayed to the user and a rewards should be expected for it.", + "operationId": "MultiSlotEvents_Activate", + "produces": [ + "application/json" + ], + "parameters": [ + { + "in": "path", + "name": "eventId", + "description": "The event ID this activation applies to.", + "required": true, + "type": "string", + "maxLength": 256 + } + ], + "responses": { + "204": { + "description": "Success" + }, + "default": { + "description": "Invalid activate event request.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "Successful MultiSlotEvents_Activate request": { + "$ref": "./examples/MultiSlotEvents_Activate.json" + } + } + } + }, + "/multislot/rank": { + "post": { + "tags": [ + "MultiSlotRank" + ], + "summary": "Post multi-slot Rank.", + "description": "Submit a Personalizer multi-slot rank request. Receives a context, a list of actions, and a list of slots. Returns which of the provided actions should be used in each slot, in each rewardActionId.", + "operationId": "MultiSlot_Rank", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "parameters": [ + { + "in": "body", + "name": "body", + "description": "A Personalizer multi-slot Rank request.", + "required": true, + "schema": { + "$ref": "#/definitions/MultiSlotRankRequest" + } + } + ], + "responses": { + "201": { + "description": "Success", + "schema": { + "$ref": "#/definitions/MultiSlotRankResponse" + } + }, + "default": { + "description": "Invalid request.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "Successful MultiSlot_Rank request": { + "$ref": "./examples/MultiSlot_Rank.json" + } + } + } + }, + "/rank": { + "post": { + "tags": [ + "Rank" + ], + "summary": "Post Rank.", + "description": "Submit a Personalizer rank request. Receives a context and a list of actions. Returns which of the provided actions should be used by your application, in rewardActionId.", + "operationId": "Rank", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "parameters": [ + { + "in": "body", + "name": "body", + "description": "A Personalizer Rank request.", + "required": true, + "schema": { + "$ref": "#/definitions/RankRequest" + } + } + ], + "responses": { + "201": { + "description": "Success", + "schema": { + "$ref": "#/definitions/RankResponse" + } + }, + "default": { + "description": "Invalid request.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "Successful Rank request": { + "$ref": "./examples/Rank.json" + } + } + } + } + }, + "definitions": { + "ApprenticeLearningMetrics": { + "required": [ + "numberOfEvents", + "numberOfImitatedEvents", + "sumOfImitatedRewards", + "sumOfRewards" + ], + "type": "object", + "properties": { + "numberOfEvents": { + "format": "int64", + "type": "integer" + }, + "sumOfRewards": { + "format": "float", + "type": "number" + }, + "numberOfImitatedEvents": { + "format": "int64", + "type": "integer" + }, + "sumOfImitatedRewards": { + "format": "float", + "type": "number" + } + } + }, + "ApprenticeModeMetrics": { + "required": [ + "lastProcessedEventTime", + "numberOfEvents", + "numberOfImitatedEvents", + "startTime", + "sumOfImitatedRewards", + "sumOfRewards" + ], + "type": "object", + "properties": { + "startTime": { + "format": "date-time", + "type": "string" + }, + "lastProcessedEventTime": { + "format": "date-time", + "type": "string" + }, + "lastBatchMetrics": { + "$ref": "#/definitions/ApprenticeLearningMetrics" + }, + "numberOfEvents": { + "format": "int64", + "type": "integer" + }, + "sumOfRewards": { + "format": "float", + "type": "number" + }, + "numberOfImitatedEvents": { + "format": "int64", + "type": "integer" + }, + "sumOfImitatedRewards": { + "format": "float", + "type": "number" + } + } + }, + "ServiceConfiguration": { + "description": "The configuration of the service.", + "required": [ + "defaultReward", + "explorationPercentage", + "logRetentionDays", + "modelExportFrequency", + "rewardAggregation", + "rewardWaitTime" + ], + "type": "object", + "properties": { + "rewardWaitTime": { + "format": "duration", + "description": "The time span waited until a request is marked with the default reward\r\nand should be between 5 seconds and 2 days.\r\nFor example, PT5M (5 mins). For information about the time format,\r\nsee http://en.wikipedia.org/wiki/ISO_8601#Durations", + "type": "string" + }, + "defaultReward": { + "format": "float", + "description": "The reward given if a reward is not received within the specified wait time.", + "maximum": 1, + "minimum": -1, + "type": "number" + }, + "rewardAggregation": { + "description": "The function used to process rewards, if multiple reward scores are received before rewardWaitTime is over.", + "maxLength": 256, + "type": "string" + }, + "explorationPercentage": { + "format": "float", + "description": "The percentage of rank responses that will use exploration.", + "maximum": 1, + "minimum": 0, + "type": "number" + }, + "modelExportFrequency": { + "format": "duration", + "description": "Personalizer will start using the most updated trained model for online ranks automatically every specified time period.\r\nFor example, PT5M (5 mins). For information about the time format,\r\nsee http://en.wikipedia.org/wiki/ISO_8601#Durations", + "type": "string" + }, + "logMirrorEnabled": { + "description": "Flag indicates whether log mirroring is enabled.", + "type": "boolean" + }, + "logMirrorSasUri": { + "description": "Azure storage account container SAS URI for log mirroring.", + "type": "string" + }, + "logRetentionDays": { + "format": "int32", + "description": "Number of days historical logs are to be maintained. -1 implies the logs will never be deleted.", + "maximum": 2147483647, + "minimum": -1, + "type": "integer" + }, + "lastConfigurationEditDate": { + "format": "date-time", + "description": "Last time model training configuration was updated", + "type": "string" + }, + "learningMode": { + "description": "Learning Modes for Personalizer", + "enum": [ + "Online", + "Apprentice", + "LoggingOnly" + ], + "type": "string", + "x-ms-enum": { + "name": "LearningMode", + "modelAsString": true + } + }, + "latestApprenticeModeMetrics": { + "$ref": "#/definitions/ApprenticeModeMetrics" + }, + "isAutoOptimizationEnabled": { + "description": "Flag indicating whether Personalizer will automatically optimize Learning Settings by running Offline Evaluations periodically.", + "type": "boolean" + }, + "autoOptimizationFrequency": { + "format": "duration", + "description": "Frequency of automatic optimization. Only relevant if IsAutoOptimizationEnabled is true.\r\nFor example, PT5M (5 mins). For information about the time format,\r\n\\r\\nsee http://en.wikipedia.org/wiki/ISO_8601#Durations", + "type": "string" + }, + "autoOptimizationStartDate": { + "format": "date-time", + "description": "Date when the first automatic optimization evaluation must be performed. Only relevant if IsAutoOptimizationEnabled is true.", + "type": "string" + } + } + }, + "InternalError": { + "description": "An object containing more specific information than the parent object about the error.", + "type": "object", + "properties": { + "code": { + "description": "Detailed error code.", + "type": "string" + }, + "innererror": { + "$ref": "#/definitions/InternalError" + } + } + }, + "PersonalizerError": { + "description": "The error object.", + "required": [ + "code", + "message" + ], + "type": "object", + "properties": { + "code": { + "description": "Error Codes returned by Personalizer", + "enum": [ + "BadRequest", + "InvalidServiceConfiguration", + "InvalidLearningModeServiceConfiguration", + "InvalidPolicyConfiguration", + "InvalidPolicyContract", + "InvalidEvaluationContract", + "DuplicateCustomPolicyNames", + "NoLogsExistInDateRange", + "LogsSizeExceedAllowedLimit", + "InvalidRewardRequest", + "InvalidEventIdToActivate", + "InvalidRankRequest", + "InvalidExportLogsRequest", + "InvalidContainer", + "InvalidModelMetadata", + "ApprenticeModeNeverTurnedOn", + "MissingAppId", + "InvalidRewardWaitTime", + "InvalidMultiSlotApiAccess", + "ModelFileAccessDenied", + "ProblemTypeIncompatibleWithAutoOptimization", + "ResourceNotFound", + "FrontEndNotFound", + "EvaluationNotFound", + "LearningSettingsNotFound", + "EvaluationModelNotFound", + "LogsPropertiesNotFound", + "ModelRankingError", + "InternalServerError", + "RankNullResponse", + "UpdateConfigurationFailed", + "ModelResetFailed", + "ModelPublishFailed", + "ModelMetadataUpdateFailed", + "OperationNotAllowed" + ], + "type": "string", + "x-ms-enum": { + "name": "PersonalizerErrorCode", + "modelAsString": true, + "values": [ + { + "value": "BadRequest", + "description": "Request could not be understood by the server." + }, + { + "value": "InvalidServiceConfiguration", + "description": "Invalid service configuration." + }, + { + "value": "InvalidLearningModeServiceConfiguration", + "description": "Updating defaultReward, rewardWaitTime and rewardAggregation when changing learning mode from Online to Apprentice mode and vice versa is not allowed. Make the mode change and then change the additional settings with an additional API call." + }, + { + "value": "InvalidPolicyConfiguration", + "description": "Invalid policy configuration." + }, + { + "value": "InvalidPolicyContract", + "description": "Invalid policy contract." + }, + { + "value": "InvalidEvaluationContract", + "description": "Invalid evaluation contract." + }, + { + "value": "DuplicateCustomPolicyNames", + "description": "Custom policy names should be unique." + }, + { + "value": "NoLogsExistInDateRange", + "description": "No logs exist in date range." + }, + { + "value": "LogsSizeExceedAllowedLimit", + "description": "Total size of logs exceed allowed limit." + }, + { + "value": "InvalidRewardRequest", + "description": "Invalid reward request." + }, + { + "value": "InvalidEventIdToActivate", + "description": "Invalid activate event request." + }, + { + "value": "InvalidRankRequest", + "description": "Invalid request." + }, + { + "value": "InvalidExportLogsRequest", + "description": "Invalid request." + }, + { + "value": "InvalidContainer", + "description": "SAS Uri must be the Uri to a container that has write permissions." + }, + { + "value": "InvalidModelMetadata", + "description": "Invalid model metadata." + }, + { + "value": "ApprenticeModeNeverTurnedOn", + "description": "Apprentice mode never turned on." + }, + { + "value": "MissingAppId", + "description": "AppId is missing in the header." + }, + { + "value": "InvalidRewardWaitTime", + "description": "Reward wait time should be between 5 seconds and 2 days" + }, + { + "value": "InvalidMultiSlotApiAccess", + "description": "Multi-slot feature is currently disabled. Please follow multi-slot Personalizer documentation to update your loop settings to enable multi-slot functionality." + }, + { + "value": "ModelFileAccessDenied", + "description": "Key vault Key used for customer managed key cannot be accessed." + }, + { + "value": "ProblemTypeIncompatibleWithAutoOptimization", + "description": "Auto-optimization is not compatible with multi-slot personalization." + }, + { + "value": "ResourceNotFound", + "description": "Requested resource does not exist on the server." + }, + { + "value": "FrontEndNotFound", + "description": "Front end not found." + }, + { + "value": "EvaluationNotFound", + "description": "Offline Evaluation not found." + }, + { + "value": "LearningSettingsNotFound", + "description": "Learning Settings not found in evaluation." + }, + { + "value": "EvaluationModelNotFound", + "description": "Model not found in evaluation." + }, + { + "value": "LogsPropertiesNotFound", + "description": "Log properties not found." + }, + { + "value": "ModelRankingError", + "description": "Error while ranking actions using model. Please verify the learning settings are valid." + }, + { + "value": "InternalServerError", + "description": "A generic error has occurred on the server." + }, + { + "value": "RankNullResponse", + "description": "Rank call returned null response." + }, + { + "value": "UpdateConfigurationFailed", + "description": "Failed to update configuration." + }, + { + "value": "ModelResetFailed", + "description": "Model reset failed." + }, + { + "value": "ModelPublishFailed", + "description": "Model publish failed." + }, + { + "value": "ModelMetadataUpdateFailed", + "description": "Model metadata update failed." + }, + { + "value": "OperationNotAllowed", + "description": "This operation is not allowed at this time." + } + ] + } + }, + "message": { + "description": "A message explaining the error reported by the service.", + "type": "string" + }, + "target": { + "description": "Error source element.", + "type": "string" + }, + "details": { + "description": "An array of details about specific errors that led to this reported error.", + "type": "array", + "items": { + "$ref": "#/definitions/PersonalizerError" + } + }, + "innerError": { + "$ref": "#/definitions/InternalError" + } + } + }, + "ErrorResponse": { + "description": "Used to return an error to the client", + "required": [ + "error" + ], + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/PersonalizerError" + } + } + }, + "PolicyContract": { + "description": "Learning settings specifying how to train the model.", + "required": [ + "arguments", + "name" + ], + "type": "object", + "properties": { + "name": { + "description": "Name of the learning settings.", + "maxLength": 256, + "type": "string" + }, + "arguments": { + "description": "Arguments of the learning settings.", + "maxLength": 1024, + "type": "string" + } + } + }, + "PolicyReferenceContract": { + "description": "Reference to the policy within the evaluation.", + "required": [ + "evaluationId", + "policyName" + ], + "type": "object", + "properties": { + "evaluationId": { + "description": "Evaluation Id of the evaluation.", + "maxLength": 256, + "type": "string" + }, + "policyName": { + "description": "Name of the learning settings.", + "maxLength": 256, + "type": "string" + } + } + }, + "PolicyResultSummary": { + "description": "This class contains the summary of evaluating a policy on a counterfactual evaluation.", + "type": "object", + "properties": { + "timeStamp": { + "format": "date-time", + "description": "Timestamp of the aggregation.", + "type": "string", + "readOnly": true + }, + "ipsEstimatorNumerator": { + "format": "float", + "description": "Numerator for IPS estimator.", + "type": "number", + "readOnly": true + }, + "ipsEstimatorDenominator": { + "format": "float", + "description": "Denominator for IPS estimator.", + "type": "number", + "readOnly": true + }, + "snipsEstimatorDenominator": { + "format": "float", + "description": "Denominator for SNIPS estimator.", + "type": "number", + "readOnly": true + }, + "aggregateTimeWindow": { + "format": "duration", + "description": "Time window for aggregation.\r\nFor example, PT5M (5 mins). For information about the time format,\r\nsee http://en.wikipedia.org/wiki/ISO_8601#Durations", + "type": "string", + "readOnly": true + }, + "nonZeroProbability": { + "format": "float", + "description": "Probability of non-zero values for the Policy evaluation.", + "type": "number" + }, + "sumOfSquares": { + "format": "float", + "description": "Sum of Squares for the Policy evaluation results.", + "type": "number", + "readOnly": true + }, + "confidenceInterval": { + "format": "float", + "description": "Gaussian confidence interval for the Policy evaluation.", + "type": "number", + "readOnly": true + }, + "averageReward": { + "format": "float", + "description": "Average reward.", + "type": "number", + "readOnly": true + } + } + }, + "PolicyResult": { + "description": "This class contains the Learning Settings information and the results of the Offline Evaluation using that policy.", + "type": "object", + "properties": { + "name": { + "description": "The name of the Learning Settings.", + "type": "string", + "readOnly": true + }, + "arguments": { + "description": "The arguments of the Learning Settings.", + "type": "string", + "readOnly": true + }, + "policySource": { + "description": "The source of the Learning Settings.", + "enum": [ + "Online", + "Baseline", + "Random", + "Custom", + "OfflineExperimentation" + ], + "type": "string", + "readOnly": true, + "x-ms-enum": { + "name": "PolicySource", + "modelAsString": true + } + }, + "summary": { + "description": "The aggregate results of the Offline Evaluation.", + "type": "array", + "items": { + "$ref": "#/definitions/PolicyResultSummary" + }, + "readOnly": true + }, + "totalSummary": { + "allOf": [ + { + "$ref": "#/definitions/PolicyResultSummary" + } + ], + "readOnly": true + } + } + }, + "Evaluation": { + "description": "A counterfactual evaluation.", + "type": "object", + "properties": { + "id": { + "description": "The ID of the evaluation.", + "maxLength": 256, + "type": "string", + "readOnly": true + }, + "name": { + "description": "The name of the evaluation.", + "maxLength": 256, + "type": "string", + "readOnly": true + }, + "startTime": { + "format": "date-time", + "description": "The start time of the evaluation.", + "type": "string", + "readOnly": true + }, + "endTime": { + "format": "date-time", + "description": "The end time of the evaluation.", + "type": "string", + "readOnly": true + }, + "jobId": { + "description": "The ID of the job processing the evaluation.", + "type": "string", + "readOnly": true + }, + "status": { + "description": "The status of the job processing the evaluation.", + "enum": [ + "completed", + "pending", + "failed", + "notSubmitted", + "timeout", + "optimalPolicyApplied", + "onlinePolicyRetained" + ], + "type": "string", + "readOnly": true, + "x-ms-enum": { + "name": "EvaluationJobStatus", + "modelAsString": true + } + }, + "policyResults": { + "description": "The results of the evaluation.", + "type": "array", + "items": { + "$ref": "#/definitions/PolicyResult" + } + }, + "featureImportance": { + "type": "array", + "items": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "evaluationType": { + "enum": [ + "Manual", + "Auto" + ], + "type": "string", + "x-ms-enum": { + "name": "EvaluationType", + "modelAsString": true + } + }, + "optimalPolicy": { + "type": "string" + }, + "creationTime": { + "format": "date-time", + "type": "string" + } + } + }, + "EvaluationContract": { + "description": "A counterfactual evaluation.", + "required": [ + "endTime", + "name", + "policies", + "startTime" + ], + "type": "object", + "properties": { + "enableOfflineExperimentation": { + "description": "True if the evaluation should explore for a more optimal learning settings.", + "type": "boolean" + }, + "name": { + "description": "The name of the evaluation.", + "maxLength": 256, + "type": "string" + }, + "startTime": { + "format": "date-time", + "description": "The start time of the evaluation.", + "type": "string" + }, + "endTime": { + "format": "date-time", + "description": "The end time of the evaluation.", + "type": "string" + }, + "policies": { + "description": "Additional learning settings to evaluate.", + "type": "array", + "items": { + "$ref": "#/definitions/PolicyContract" + } + } + } + }, + "RewardRequest": { + "description": "Reward given to a rank response.", + "required": [ + "value" + ], + "type": "object", + "properties": { + "value": { + "format": "float", + "description": "Reward to be assigned to an action. Value is a float calculated by your application, typically between 0 and 1, and must be between -1 and 1.", + "type": "number" + } + } + }, + "DateRange": { + "description": "A date range starting at From and ending at To.", + "type": "object", + "properties": { + "from": { + "format": "date-time", + "description": "Start date for the range.", + "type": "string", + "readOnly": true + }, + "to": { + "format": "date-time", + "description": "End date for the range.", + "type": "string", + "readOnly": true + } + } + }, + "LogsProperties": { + "description": "Properties related to data used to train the model.", + "type": "object", + "properties": { + "dateRange": { + "allOf": [ + { + "$ref": "#/definitions/DateRange" + } + ], + "readOnly": true + } + } + }, + "ModelProperties": { + "description": "Properties related to the trained model.", + "type": "object", + "properties": { + "creationTime": { + "format": "date-time", + "description": "Creation time of the model.", + "type": "string", + "readOnly": true + }, + "lastModifiedTime": { + "format": "date-time", + "description": "Last time the model was modified.", + "type": "string", + "readOnly": true + } + } + }, + "SlotReward": { + "required": [ + "slotId", + "value" + ], + "type": "object", + "properties": { + "slotId": { + "description": "Slot id for which we are sending the reward.", + "maxLength": 256, + "minLength": 1, + "type": "string" + }, + "value": { + "format": "float", + "description": "Reward to be assigned to slotId. Value should be between -1 and 1 inclusive.", + "type": "number" + } + } + }, + "MultiSlotRewardRequest": { + "description": "Reward given to a list of slots.", + "required": [ + "reward" + ], + "type": "object", + "properties": { + "reward": { + "type": "array", + "items": { + "$ref": "#/definitions/SlotReward" + } + } + } + }, + "RankableAction": { + "description": "An action with its associated features used for ranking.", + "required": [ + "features", + "id" + ], + "type": "object", + "properties": { + "id": { + "description": "Id of the action.", + "maxLength": 256, + "type": "string" + }, + "features": { + "description": "List of dictionaries containing features.", + "type": "array", + "items": { + "type": "object" + } + } + } + }, + "SlotRequest": { + "description": "A slot with it\u0027s associated features and list of excluded actions", + "required": [ + "baselineAction", + "id" + ], + "type": "object", + "properties": { + "id": { + "description": "Slot ID", + "type": "string" + }, + "features": { + "description": "List of dictionaries containing slot features.", + "type": "array", + "items": { + "type": "object" + } + }, + "excludedActions": { + "description": "List of excluded action Ids.", + "type": "array", + "items": { + "type": "string" + } + }, + "baselineAction": { + "description": "The \u0027baseline action\u0027 ID for the slot.\r\nThe BaselineAction is the Id of the Action your application would use in that slot if Personalizer didn\u0027t exist.\r\nBaselineAction must be defined for every slot.\r\nBaselineAction should never be part of ExcludedActions.\r\nEach slot must have a unique BaselineAction which corresponds to an an action from the event\u0027s Actions list.", + "type": "string" + } + } + }, + "MultiSlotRankRequest": { + "required": [ + "actions", + "slots" + ], + "type": "object", + "properties": { + "contextFeatures": { + "description": "Features of the context used for Personalizer as a\r\ndictionary of dictionaries. This is determined by your application, and\r\ntypically includes features about the current user, their\r\ndevice, profile information, aggregated data about time and date, etc.\r\nFeatures should not include personally identifiable information (PII),\r\nunique UserIDs, or precise timestamps.", + "type": "array", + "items": { + "type": "object" + } + }, + "actions": { + "description": "The set of actions the Personalizer service can pick from.\r\nThe set should not contain more than 50 actions.\r\nThe order of the actions does not affect the rank result but the order\r\nshould match the sequence your application would have used to display them.\r\nThe first item in the array will be used as Baseline item in Offline Evaluations.", + "type": "array", + "items": { + "$ref": "#/definitions/RankableAction" + } + }, + "slots": { + "description": "The set of slots the Personalizer service should select actions for.\r\nThe set should not contain more than 50 slots.", + "type": "array", + "items": { + "$ref": "#/definitions/SlotRequest" + } + }, + "eventId": { + "description": "Optionally pass an eventId that uniquely identifies this Rank event.\r\nIf null, the service generates a unique eventId. The eventId will be used for\r\nassociating this request with its reward, as well as seeding the pseudo-random\r\ngenerator when making a Personalizer call.", + "maxLength": 256, + "type": "string" + }, + "deferActivation": { + "description": "Send false if it is certain the rewardActionId in rank results will be shown to the user, therefore\r\nPersonalizer will expect a Reward call, otherwise it will assign the default\r\nReward to the event. Send true if it is possible the user will not see the action specified in the rank results,\r\n(e.g. because the page is rendering later, or the Rank results may be overridden by code further downstream).\r\nYou must call the Activate Event API if the event output is shown to users, otherwise Rewards will be ignored.", + "default": false, + "type": "boolean" + } + } + }, + "SlotResponse": { + "required": [ + "id" + ], + "type": "object", + "properties": { + "id": { + "description": "Id is the slot ID.", + "maxLength": 256, + "type": "string" + }, + "rewardActionId": { + "description": "RewardActionID is the action ID recommended by Personalizer.", + "maxLength": 256, + "type": "string", + "readOnly": true + } + } + }, + "MultiSlotRankResponse": { + "type": "object", + "properties": { + "slots": { + "description": "Each slot has a corresponding rewardActionID which is the action ID recommended by Personalizer.", + "type": "array", + "items": { + "$ref": "#/definitions/SlotResponse" + }, + "readOnly": true + }, + "eventId": { + "description": "The eventId for the round trip from request to response.", + "maxLength": 256, + "type": "string", + "readOnly": true + } + } + }, + "RankRequest": { + "description": "Request a set of actions to be ranked by the Personalizer service.", + "required": [ + "actions" + ], + "type": "object", + "properties": { + "contextFeatures": { + "description": "Features of the context used for Personalizer as a\r\ndictionary of dictionaries. This is determined by your application, and\r\ntypically includes features about the current user, their\r\ndevice, profile information, aggregated data about time and date, etc.\r\nFeatures should not include personally identifiable information (PII),\r\nunique UserIDs, or precise timestamps.", + "type": "array", + "items": { + "type": "object" + } + }, + "actions": { + "description": "The set of actions the Personalizer service can pick from.\r\nThe set should not contain more than 50 actions.\r\nThe order of the actions does not affect the rank result but the order\r\nshould match the sequence your application would have used to display them.\r\nThe first item in the array will be used as Baseline item in Offline Evaluations.", + "type": "array", + "items": { + "$ref": "#/definitions/RankableAction" + } + }, + "excludedActions": { + "description": "The set of action ids to exclude from ranking.\r\nPersonalizer will consider the first non-excluded item in the array as the Baseline action when performing Offline Evaluations.", + "type": "array", + "items": { + "type": "string" + } + }, + "eventId": { + "description": "Optionally pass an eventId that uniquely identifies this Rank event.\r\nIf null, the service generates a unique eventId. The eventId will be used for\r\nassociating this request with its reward, as well as seeding the pseudo-random\r\ngenerator when making a Personalizer call.", + "maxLength": 256, + "type": "string" + }, + "deferActivation": { + "description": "Send false if it is certain the rewardActionId in rank results will be shown to the user, therefore\r\nPersonalizer will expect a Reward call, otherwise it will assign the default\r\nReward to the event. Send true if it is possible the user will not see the action specified in the rank results,\r\n(e.g. because the page is rendering later, or the Rank results may be overridden by code further downstream).\r\nYou must call the Activate Event API if the event output is shown to users, otherwise Rewards will be ignored.", + "default": false, + "type": "boolean" + } + } + }, + "RankedAction": { + "description": "A ranked action with its resulting probability.", + "type": "object", + "properties": { + "id": { + "description": "Id of the action", + "maxLength": 256, + "type": "string", + "readOnly": true + }, + "probability": { + "format": "float", + "description": "Probability of the action", + "maximum": 1, + "minimum": 0, + "type": "number", + "readOnly": true + } + } + }, + "RankResponse": { + "description": "Returns which action to use as rewardActionId, and additional information about each action as a result of a Rank request.", + "type": "object", + "properties": { + "ranking": { + "description": "The calculated ranking for the current request.", + "type": "array", + "items": { + "$ref": "#/definitions/RankedAction" + }, + "readOnly": true + }, + "eventId": { + "description": "The eventId for the round trip from request to response.", + "maxLength": 256, + "type": "string", + "readOnly": true + }, + "rewardActionId": { + "description": "The action chosen by the Personalizer service.\r\nThis is the action your application should display, and for which to report the reward.\r\nThis might not be the first found in \u0027ranking\u0027.", + "maxLength": 256, + "type": "string", + "readOnly": true + } + } + }, + "ServiceStatus": { + "type": "object", + "properties": { + "service": { + "type": "string" + }, + "apiStatus": { + "type": "string" + }, + "apiStatusMessage": { + "type": "string" + } + } + } + }, + "parameters": { + "Endpoint": { + "in": "path", + "name": "Endpoint", + "description": "Supported Cognitive Services endpoint.", + "required": true, + "type": "string", + "x-ms-parameter-location": "client", + "x-ms-skip-url-encoding": true + } + }, + "securityDefinitions": { + "apim_key": { + "type": "apiKey", + "name": "Ocp-Apim-Subscription-Key", + "in": "header" + } + }, + "security": [ + { + + } + ], + "tags": [ + { + "name": "ConfigurationsV1Dot1Preview1", + "description": "Manages configuration operations." + }, + { + "name": "EvaluationsV1Dot1Preview1", + "description": "Manages counterfactual evaluation operations." + }, + { + "name": "MultiSlotEvents", + "description": "Manages multi-slot event operations." + }, + { + "name": "MultiSlotRank", + "description": "Manages multi-slot ranking operations." + }, + { + "name": "Events", + "description": "Manages event operations." + }, + { + "name": "Model", + "description": "Manages reinforcement learning configuration operations." + }, + { + "name": "Rank", + "description": "Manages ranking operations." + }, + { + "name": "LogsV2Dot1Preview1", + "description": "Manages reinforcement learning logs." + } + ], + "x-ms-parameterized-host": { + "hostTemplate": "{Endpoint}", + "useSchemePrefix": false, + "parameters": [ + { + "$ref": "#/parameters/Endpoint" + } + ] + } +} diff --git a/specification/cognitiveservices/data-plane/Personalizer/preview/v2.1-preview.1/examples/Evaluation_Apply.json b/specification/cognitiveservices/data-plane/Personalizer/preview/v2.1-preview.1/examples/Evaluation_Apply.json new file mode 100644 index 000000000000..26b18de7f138 --- /dev/null +++ b/specification/cognitiveservices/data-plane/Personalizer/preview/v2.1-preview.1/examples/Evaluation_Apply.json @@ -0,0 +1,15 @@ +{ + "parameters": { + "Endpoint": "{Endpoint}", + "body": { + "evaluationId": "b58c6d92-b727-48c1-9487-4be2782c9e0a", + "policyName": "online" + }, + "Ocp-Apim-Subscription-Key": "{API key}" + }, + "responses": { + "204": { + + } + } +} diff --git a/specification/cognitiveservices/data-plane/Personalizer/preview/v2.1-preview.1/examples/Evaluations_Create.json b/specification/cognitiveservices/data-plane/Personalizer/preview/v2.1-preview.1/examples/Evaluations_Create.json new file mode 100644 index 000000000000..ea522d574714 --- /dev/null +++ b/specification/cognitiveservices/data-plane/Personalizer/preview/v2.1-preview.1/examples/Evaluations_Create.json @@ -0,0 +1,45 @@ +{ + "parameters": { + "Endpoint": "{Endpoint}", + "body": { + "enableOfflineExperimentation": true, + "name": "myFirstEvaluation", + "startTime": "2018-12-19T00:00:00Z", + "endTime": "2019-01-19T00:00:00Z", + "policies": [ + { + "name": "Custom learning settings 1", + "arguments": "--cb_explore_adf --epsilon 0.2 --dsjson --cb_type ips -l 0.5 --l1 1E-07 --power_t 0.5" + } + ] + }, + "Ocp-Apim-Subscription-Key": "{API key}" + }, + "responses": { + "201": { + "headers": { + "Location": "{endpoint}/personalizer/v2.1-preview.1/evaluations/{evaluationId}" + }, + "body": { + "id": "b58c6d92-b727-48c1-9487-4be2782c9e0a", + "name": "myFirstEvaluation", + "startTime": "2018-12-19T00:00:00Z", + "endTime": "2019-01-19T00:00:00Z", + "status": "pending", + "policyResults": [ + { + "name": "Custom learning settings 1", + "arguments": "--cb_explore_adf --epsilon 0.2 --dsjson --cb_type ips -l 0.5 --l1 1E-07 --power_t 0.5", + "policySource": "Online" + } + ], + "featureImportance": [ + + ], + "evaluationType": "Manual", + "optimalPolicy": "", + "creationTime": "2019-01-20T00:00:00Z" + } + } + } +} diff --git a/specification/cognitiveservices/data-plane/Personalizer/preview/v2.1-preview.1/examples/Evaluations_Delete.json b/specification/cognitiveservices/data-plane/Personalizer/preview/v2.1-preview.1/examples/Evaluations_Delete.json new file mode 100644 index 000000000000..7f7dcdfff75d --- /dev/null +++ b/specification/cognitiveservices/data-plane/Personalizer/preview/v2.1-preview.1/examples/Evaluations_Delete.json @@ -0,0 +1,12 @@ +{ + "parameters": { + "Endpoint": "{Endpoint}", + "evaluationId": "id", + "Ocp-Apim-Subscription-Key": "{API key}" + }, + "responses": { + "204": { + + } + } +} diff --git a/specification/cognitiveservices/data-plane/Personalizer/preview/v2.1-preview.1/examples/Evaluations_Get.json b/specification/cognitiveservices/data-plane/Personalizer/preview/v2.1-preview.1/examples/Evaluations_Get.json new file mode 100644 index 000000000000..6eaa3414bfbc --- /dev/null +++ b/specification/cognitiveservices/data-plane/Personalizer/preview/v2.1-preview.1/examples/Evaluations_Get.json @@ -0,0 +1,76 @@ +{ + "parameters": { + "Endpoint": "{Endpoint}", + "evaluationId": "id", + "Ocp-Apim-Subscription-Key": "{API key}" + }, + "responses": { + "200": { + "headers": { + + }, + "body": { + "id": "b58c6d92-b727-48c1-9487-4be2782c9e0a", + "name": "myFirstEvaluation", + "startTime": "2018-12-19T00:00:00Z", + "endTime": "2019-01-19T00:00:00Z", + "status": "completed", + "policyResults": [ + { + "name": "Custom learning settings 1", + "arguments": "--cb_explore_adf --epsilon 0.2 --dsjson --cb_type ips -l 0.5 --l1 1E-07 --power_t 0.5", + "policySource": "Custom", + "summary": [ + { + "timeStamp": "2018-12-19T00:00:00Z", + "ipsEstimatorNumerator": 0.0, + "ipsEstimatorDenominator": 170.0, + "snipsEstimatorDenominator": 308.25, + "aggregateTimeWindow": "PT0S", + "nonZeroProbability": 64.0, + "sumOfSquares": 0.0, + "confidenceInterval": 0.0, + "averageReward": 0.0 + }, + { + "timeStamp": "2018-12-19T00:05:00Z", + "ipsEstimatorNumerator": 2.2, + "ipsEstimatorDenominator": 196.0, + "snipsEstimatorDenominator": 193.761, + "aggregateTimeWindow": "PT0S", + "nonZeroProbability": 68.0, + "sumOfSquares": 2.424, + "confidenceInterval": 0.015529361, + "averageReward": 0.01122449 + } + ], + "totalSummary": { + "timeStamp": "2019-01-19T00:00:00Z", + "ipsEstimatorNumerator": 22.2, + "ipsEstimatorDenominator": 1906.0, + "snipsEstimatorDenominator": 1993.761, + "aggregateTimeWindow": "PT0S", + "nonZeroProbability": 68.0, + "sumOfSquares": 2.484, + "confidenceInterval": 0.0015344538, + "averageReward": 0.011647429 + } + } + ], + "featureImportance": [ + [ + "f1", + "f2" + ], + [ + "f3", + "f4" + ] + ], + "evaluationType": "Manual", + "optimalPolicy": "Custom learning settings 1", + "creationTime": "2019-01-20T00:00:00Z" + } + } + } +} diff --git a/specification/cognitiveservices/data-plane/Personalizer/preview/v2.1-preview.1/examples/Evaluations_List.json b/specification/cognitiveservices/data-plane/Personalizer/preview/v2.1-preview.1/examples/Evaluations_List.json new file mode 100644 index 000000000000..7c09d8fc76d9 --- /dev/null +++ b/specification/cognitiveservices/data-plane/Personalizer/preview/v2.1-preview.1/examples/Evaluations_List.json @@ -0,0 +1,62 @@ +{ + "parameters": { + "Ocp-Apim-Subscription-Key": "{API key}", + "Endpoint": "{Endpoint}" + }, + "responses": { + "200": { + "headers": { + + }, + "body": [ + { + "id": "b58c6d92-b727-48c1-9487-4be2782c9e0a", + "name": "myFirstEvaluation", + "startTime": "2018-11-19T00:00:00Z", + "endTime": "2018-12-19T00:00:00Z", + "status": "completed", + "policyResults": [ + { + "name": "Custom learning settings 1", + "arguments": "--cb_explore_adf --epsilon 0.2 --dsjson --cb_type ips -l 0.5 --l1 1E-07 --power_t 0.5", + "policySource": "Online", + "totalSummary": { + "timeStamp": "2018-12-19T00:00:00Z", + "ipsEstimatorNumerator": 18.0, + "ipsEstimatorDenominator": 36.0, + "snipsEstimatorDenominator": 1.0, + "aggregateTimeWindow": "PT0S", + "nonZeroProbability": 1.1, + "sumOfSquares": 12.28, + "confidenceInterval": 0.100001775, + "averageReward": 0.5 + } + } + ], + "featureImportance": [ + + ], + "evaluationType": "Manual", + "optimalPolicy": "Custom learning settings 1", + "creationTime": "2019-01-19T00:00:00Z" + }, + { + "id": "21d03972-9130-4be9-8c8b-8ac3ec9b9dd1", + "name": "mySecondEvaluation", + "startTime": "2018-12-19T00:00:00Z", + "endTime": "2019-01-19T00:00:00Z", + "status": "pending", + "policyResults": [ + + ], + "featureImportance": [ + + ], + "evaluationType": "Manual", + "optimalPolicy": "", + "creationTime": "2019-01-19T00:00:00Z" + } + ] + } + } +} diff --git a/specification/cognitiveservices/data-plane/Personalizer/preview/v2.1-preview.1/examples/Events_Activate.json b/specification/cognitiveservices/data-plane/Personalizer/preview/v2.1-preview.1/examples/Events_Activate.json new file mode 100644 index 000000000000..7163b64c65f1 --- /dev/null +++ b/specification/cognitiveservices/data-plane/Personalizer/preview/v2.1-preview.1/examples/Events_Activate.json @@ -0,0 +1,12 @@ +{ + "parameters": { + "eventId": "id", + "Endpoint": "{Endpoint}", + "Ocp-Apim-Subscription-Key": "{API key}" + }, + "responses": { + "204": { + + } + } +} diff --git a/specification/cognitiveservices/data-plane/Personalizer/preview/v2.1-preview.1/examples/Events_Reward.json b/specification/cognitiveservices/data-plane/Personalizer/preview/v2.1-preview.1/examples/Events_Reward.json new file mode 100644 index 000000000000..dcb8f81b334a --- /dev/null +++ b/specification/cognitiveservices/data-plane/Personalizer/preview/v2.1-preview.1/examples/Events_Reward.json @@ -0,0 +1,15 @@ +{ + "parameters": { + "eventId": "id", + "Endpoint": "{Endpoint}", + "body": { + "value": 1.0 + }, + "Ocp-Apim-Subscription-Key": "{API key}" + }, + "responses": { + "204": { + + } + } +} diff --git a/specification/cognitiveservices/data-plane/Personalizer/preview/v2.1-preview.1/examples/Log_Delete.json b/specification/cognitiveservices/data-plane/Personalizer/preview/v2.1-preview.1/examples/Log_Delete.json new file mode 100644 index 000000000000..66b2b3a50c4b --- /dev/null +++ b/specification/cognitiveservices/data-plane/Personalizer/preview/v2.1-preview.1/examples/Log_Delete.json @@ -0,0 +1,11 @@ +{ + "parameters": { + "Ocp-Apim-Subscription-Key": "{API key}", + "Endpoint": "{Endpoint}" + }, + "responses": { + "204": { + + } + } +} diff --git a/specification/cognitiveservices/data-plane/Personalizer/preview/v2.1-preview.1/examples/Log_GetProperties.json b/specification/cognitiveservices/data-plane/Personalizer/preview/v2.1-preview.1/examples/Log_GetProperties.json new file mode 100644 index 000000000000..38e6fc08ba34 --- /dev/null +++ b/specification/cognitiveservices/data-plane/Personalizer/preview/v2.1-preview.1/examples/Log_GetProperties.json @@ -0,0 +1,19 @@ +{ + "parameters": { + "Ocp-Apim-Subscription-Key": "{API key}", + "Endpoint": "{Endpoint}" + }, + "responses": { + "200": { + "headers": { + + }, + "body": { + "dateRange": { + "from": "2019-01-19T00:00:00+00:00", + "to": "2019-02-19T00:00:00+00:00" + } + } + } + } +} diff --git a/specification/cognitiveservices/data-plane/Personalizer/preview/v2.1-preview.1/examples/Log_Interactions.json b/specification/cognitiveservices/data-plane/Personalizer/preview/v2.1-preview.1/examples/Log_Interactions.json new file mode 100644 index 000000000000..964e5bdea13e --- /dev/null +++ b/specification/cognitiveservices/data-plane/Personalizer/preview/v2.1-preview.1/examples/Log_Interactions.json @@ -0,0 +1,14 @@ +{ + "parameters": { + "Endpoint": "{Endpoint}", + "body": { + "value": 1.0 + }, + "Ocp-Apim-Subscription-Key": "{API key}" + }, + "responses": { + "200": { + + } + } +} diff --git a/specification/cognitiveservices/data-plane/Personalizer/preview/v2.1-preview.1/examples/Log_Observations.json b/specification/cognitiveservices/data-plane/Personalizer/preview/v2.1-preview.1/examples/Log_Observations.json new file mode 100644 index 000000000000..964e5bdea13e --- /dev/null +++ b/specification/cognitiveservices/data-plane/Personalizer/preview/v2.1-preview.1/examples/Log_Observations.json @@ -0,0 +1,14 @@ +{ + "parameters": { + "Endpoint": "{Endpoint}", + "body": { + "value": 1.0 + }, + "Ocp-Apim-Subscription-Key": "{API key}" + }, + "responses": { + "200": { + + } + } +} diff --git a/specification/cognitiveservices/data-plane/Personalizer/preview/v2.1-preview.1/examples/Model_Get.json b/specification/cognitiveservices/data-plane/Personalizer/preview/v2.1-preview.1/examples/Model_Get.json new file mode 100644 index 000000000000..502cc938327a --- /dev/null +++ b/specification/cognitiveservices/data-plane/Personalizer/preview/v2.1-preview.1/examples/Model_Get.json @@ -0,0 +1,14 @@ +{ + "parameters": { + "Ocp-Apim-Subscription-Key": "{API key}", + "Endpoint": "{Endpoint}" + }, + "responses": { + "200": { + "headers": { + + }, + "body": "" + } + } +} diff --git a/specification/cognitiveservices/data-plane/Personalizer/preview/v2.1-preview.1/examples/Model_GetProperties.json b/specification/cognitiveservices/data-plane/Personalizer/preview/v2.1-preview.1/examples/Model_GetProperties.json new file mode 100644 index 000000000000..cde7a07c4530 --- /dev/null +++ b/specification/cognitiveservices/data-plane/Personalizer/preview/v2.1-preview.1/examples/Model_GetProperties.json @@ -0,0 +1,17 @@ +{ + "parameters": { + "Ocp-Apim-Subscription-Key": "{API key}", + "Endpoint": "{Endpoint}" + }, + "responses": { + "200": { + "headers": { + + }, + "body": { + "creationTime": "2019-01-19T00:00:00+00:00", + "lastModifiedTime": "2019-01-19T00:00:00+00:00" + } + } + } +} diff --git a/specification/cognitiveservices/data-plane/Personalizer/preview/v2.1-preview.1/examples/Model_Reset.json b/specification/cognitiveservices/data-plane/Personalizer/preview/v2.1-preview.1/examples/Model_Reset.json new file mode 100644 index 000000000000..66b2b3a50c4b --- /dev/null +++ b/specification/cognitiveservices/data-plane/Personalizer/preview/v2.1-preview.1/examples/Model_Reset.json @@ -0,0 +1,11 @@ +{ + "parameters": { + "Ocp-Apim-Subscription-Key": "{API key}", + "Endpoint": "{Endpoint}" + }, + "responses": { + "204": { + + } + } +} diff --git a/specification/cognitiveservices/data-plane/Personalizer/preview/v2.1-preview.1/examples/MultiSlotEvents_Activate.json b/specification/cognitiveservices/data-plane/Personalizer/preview/v2.1-preview.1/examples/MultiSlotEvents_Activate.json new file mode 100644 index 000000000000..7163b64c65f1 --- /dev/null +++ b/specification/cognitiveservices/data-plane/Personalizer/preview/v2.1-preview.1/examples/MultiSlotEvents_Activate.json @@ -0,0 +1,12 @@ +{ + "parameters": { + "eventId": "id", + "Endpoint": "{Endpoint}", + "Ocp-Apim-Subscription-Key": "{API key}" + }, + "responses": { + "204": { + + } + } +} diff --git a/specification/cognitiveservices/data-plane/Personalizer/preview/v2.1-preview.1/examples/MultiSlotEvents_Reward.json b/specification/cognitiveservices/data-plane/Personalizer/preview/v2.1-preview.1/examples/MultiSlotEvents_Reward.json new file mode 100644 index 000000000000..db8facac3b47 --- /dev/null +++ b/specification/cognitiveservices/data-plane/Personalizer/preview/v2.1-preview.1/examples/MultiSlotEvents_Reward.json @@ -0,0 +1,24 @@ +{ + "parameters": { + "eventId": "id", + "Endpoint": "{Endpoint}", + "body": { + "reward": [ + { + "slotId": "Heroposition", + "value": 0.5 + }, + { + "slotId": "SideBar", + "value": 0.6 + } + ] + }, + "Ocp-Apim-Subscription-Key": "{API key}" + }, + "responses": { + "204": { + + } + } +} diff --git a/specification/cognitiveservices/data-plane/Personalizer/preview/v2.1-preview.1/examples/MultiSlot_Rank.json b/specification/cognitiveservices/data-plane/Personalizer/preview/v2.1-preview.1/examples/MultiSlot_Rank.json new file mode 100644 index 000000000000..74dbfe5065af --- /dev/null +++ b/specification/cognitiveservices/data-plane/Personalizer/preview/v2.1-preview.1/examples/MultiSlot_Rank.json @@ -0,0 +1,106 @@ +{ + "parameters": { + "Endpoint": "{Endpoint}", + "body": { + "contextFeatures": [ + { + "user": { + "profileType": "AnonymousUser", + "latLong": "47.6,-122.1" + } + }, + { + "environment": { + "dayOfMonth": "28", + "monthOfYear": "8", + "weather": "Sunny" + } + }, + { + "device": { + "mobile": true, + "windows": true + } + }, + { + "recentActivity": { + "itemsInCart": 3 + } + } + ], + "actions": [ + { + "id": "NewsArticle", + "features": [ + { + "type": "News" + } + ] + }, + { + "id": "SportsArticle", + "features": [ + { + "type": "Sports" + } + ] + }, + { + "id": "EntertainmentArticle", + "features": [ + { + "type": "Entertainment" + } + ] + } + ], + "slots": [ + { + "id": "Main Article", + "features": [ + { + "size": "Large", + "position": "Top Middle" + } + ], + "excludedActions": [ + "SportsArticle" + ], + "baselineAction": "EntertainmentArticle" + }, + { + "id": "Side Bar", + "features": [ + { + "size": "Small" + } + ], + "baselineAction": "NewsArticle" + } + ], + "eventId": "75269AD0-BFEE-4598-8196-C57383D38E10", + "deferActivation": false + }, + "Ocp-Apim-Subscription-Key": "{API key}" + }, + "responses": { + "201": { + "headers": { + + }, + "body": { + "slots": [ + { + "id": "Main Article", + "rewardActionId": "EntertainmentArticle" + }, + { + "id": "Side Bar", + "rewardActionId": "SportsArticle" + } + ], + "eventId": "75269AD0-BFEE-4598-8196-C57383D38E10" + } + } + } +} diff --git a/specification/cognitiveservices/data-plane/Personalizer/preview/v2.1-preview.1/examples/Policy_Get.json b/specification/cognitiveservices/data-plane/Personalizer/preview/v2.1-preview.1/examples/Policy_Get.json new file mode 100644 index 000000000000..68a3bbdc47ff --- /dev/null +++ b/specification/cognitiveservices/data-plane/Personalizer/preview/v2.1-preview.1/examples/Policy_Get.json @@ -0,0 +1,17 @@ +{ + "parameters": { + "Ocp-Apim-Subscription-Key": "{API key}", + "Endpoint": "{Endpoint}" + }, + "responses": { + "200": { + "headers": { + + }, + "body": { + "name": "myPersonalizer", + "arguments": "--cb_explore_adf --epsilon 0.2 --dsjson --cb_type ips -l 0.5 --l1 1E-07 --power_t 0.5" + } + } + } +} diff --git a/specification/cognitiveservices/data-plane/Personalizer/preview/v2.1-preview.1/examples/Policy_Reset.json b/specification/cognitiveservices/data-plane/Personalizer/preview/v2.1-preview.1/examples/Policy_Reset.json new file mode 100644 index 000000000000..68a3bbdc47ff --- /dev/null +++ b/specification/cognitiveservices/data-plane/Personalizer/preview/v2.1-preview.1/examples/Policy_Reset.json @@ -0,0 +1,17 @@ +{ + "parameters": { + "Ocp-Apim-Subscription-Key": "{API key}", + "Endpoint": "{Endpoint}" + }, + "responses": { + "200": { + "headers": { + + }, + "body": { + "name": "myPersonalizer", + "arguments": "--cb_explore_adf --epsilon 0.2 --dsjson --cb_type ips -l 0.5 --l1 1E-07 --power_t 0.5" + } + } + } +} diff --git a/specification/cognitiveservices/data-plane/Personalizer/preview/v2.1-preview.1/examples/Policy_Update.json b/specification/cognitiveservices/data-plane/Personalizer/preview/v2.1-preview.1/examples/Policy_Update.json new file mode 100644 index 000000000000..73d8af798985 --- /dev/null +++ b/specification/cognitiveservices/data-plane/Personalizer/preview/v2.1-preview.1/examples/Policy_Update.json @@ -0,0 +1,21 @@ +{ + "parameters": { + "Endpoint": "{Endpoint}", + "body": { + "name": "myPersonalizer", + "arguments": "--cb_explore_adf --epsilon 0.2 --dsjson --cb_type ips -l 0.5 --l1 1E-07 --power_t 0.5" + }, + "Ocp-Apim-Subscription-Key": "{API key}" + }, + "responses": { + "200": { + "headers": { + + }, + "body": { + "name": "myPersonalizer", + "arguments": "--cb_explore_adf --epsilon 0.2 --dsjson --cb_type ips -l 0.5 --l1 1E-07 --power_t 0.5" + } + } + } +} diff --git a/specification/cognitiveservices/data-plane/Personalizer/preview/v2.1-preview.1/examples/Rank.json b/specification/cognitiveservices/data-plane/Personalizer/preview/v2.1-preview.1/examples/Rank.json new file mode 100644 index 000000000000..865ca31fbcb0 --- /dev/null +++ b/specification/cognitiveservices/data-plane/Personalizer/preview/v2.1-preview.1/examples/Rank.json @@ -0,0 +1,90 @@ +{ + "parameters": { + "Endpoint": "{Endpoint}", + "body": { + "contextFeatures": [ + { + "user": { + "profileType": "AnonymousUser", + "latLong": "47.6,-122.1" + } + }, + { + "environment": { + "dayOfMonth": "28", + "monthOfYear": "8", + "weather": "Sunny" + } + }, + { + "device": { + "mobile": true, + "windows": true + } + }, + { + "recentActivity": { + "itemsInCart": 3 + } + } + ], + "actions": [ + { + "id": "NewsArticle", + "features": [ + { + "type": "News" + } + ] + }, + { + "id": "SportsArticle", + "features": [ + { + "type": "Sports" + } + ] + }, + { + "id": "EntertainmentArticle", + "features": [ + { + "type": "Entertainment" + } + ] + } + ], + "excludedActions": [ + "SportsArticle" + ], + "eventId": "75269AD0-BFEE-4598-8196-C57383D38E10", + "deferActivation": false + }, + "Ocp-Apim-Subscription-Key": "{API key}" + }, + "responses": { + "201": { + "headers": { + + }, + "body": { + "ranking": [ + { + "id": "EntertainmentArticle", + "probability": 0.8 + }, + { + "id": "SportsArticle", + "probability": 0.0 + }, + { + "id": "NewsArticle", + "probability": 0.2 + } + ], + "eventId": "75269AD0-BFEE-4598-8196-C57383D38E10", + "rewardActionId": "EntertainmentArticle" + } + } + } +} diff --git a/specification/cognitiveservices/data-plane/Personalizer/preview/v2.1-preview.1/examples/ServiceConfiguration_Get.json b/specification/cognitiveservices/data-plane/Personalizer/preview/v2.1-preview.1/examples/ServiceConfiguration_Get.json new file mode 100644 index 000000000000..5d03b58fe313 --- /dev/null +++ b/specification/cognitiveservices/data-plane/Personalizer/preview/v2.1-preview.1/examples/ServiceConfiguration_Get.json @@ -0,0 +1,28 @@ +{ + "parameters": { + "Ocp-Apim-Subscription-Key": "{API key}", + "Endpoint": "{Endpoint}" + }, + "responses": { + "200": { + "headers": { + + }, + "body": { + "rewardWaitTime": "PT10M", + "defaultReward": 0.0, + "rewardAggregation": "earliest", + "explorationPercentage": 0.2, + "modelExportFrequency": "PT5M", + "logMirrorEnabled": true, + "logMirrorSasUri": "https://testblob.blob.core.windows.net/container?se=2020-08-13T00%3A00Z\u0026sp=rwl\u0026spr=https\u0026sv=2018-11-09\u0026sr=c\u0026sig=signature", + "logRetentionDays": 7, + "lastConfigurationEditDate": "0001-01-01T00:00:00", + "learningMode": "Online", + "isAutoOptimizationEnabled": true, + "autoOptimizationFrequency": "P7D", + "autoOptimizationStartDate": "2019-01-19T00:00:00Z" + } + } + } +} diff --git a/specification/cognitiveservices/data-plane/Personalizer/preview/v2.1-preview.1/examples/ServiceConfiguration_Update.json b/specification/cognitiveservices/data-plane/Personalizer/preview/v2.1-preview.1/examples/ServiceConfiguration_Update.json new file mode 100644 index 000000000000..9bafe7d3fe44 --- /dev/null +++ b/specification/cognitiveservices/data-plane/Personalizer/preview/v2.1-preview.1/examples/ServiceConfiguration_Update.json @@ -0,0 +1,43 @@ +{ + "parameters": { + "Endpoint": "{Endpoint}", + "body": { + "rewardWaitTime": "PT10M", + "defaultReward": 0.0, + "rewardAggregation": "earliest", + "explorationPercentage": 0.2, + "modelExportFrequency": "PT5M", + "logMirrorEnabled": true, + "logMirrorSasUri": "https://testblob.blob.core.windows.net/container?se=2020-08-13T00%3A00Z\u0026sp=rwl\u0026spr=https\u0026sv=2018-11-09\u0026sr=c\u0026sig=signature", + "logRetentionDays": 7, + "lastConfigurationEditDate": "0001-01-01T00:00:00", + "learningMode": "Online", + "isAutoOptimizationEnabled": true, + "autoOptimizationFrequency": "P7D", + "autoOptimizationStartDate": "2019-01-19T00:00:00Z" + }, + "Ocp-Apim-Subscription-Key": "{API key}" + }, + "responses": { + "200": { + "headers": { + + }, + "body": { + "rewardWaitTime": "PT10M", + "defaultReward": 0.0, + "rewardAggregation": "earliest", + "explorationPercentage": 0.2, + "modelExportFrequency": "PT5M", + "logMirrorEnabled": true, + "logMirrorSasUri": "https://testblob.blob.core.windows.net/container?se=2020-08-13T00%3A00Z\u0026sp=rwl\u0026spr=https\u0026sv=2018-11-09\u0026sr=c\u0026sig=signature", + "logRetentionDays": 7, + "lastConfigurationEditDate": "0001-01-01T00:00:00", + "learningMode": "Online", + "isAutoOptimizationEnabled": true, + "autoOptimizationFrequency": "P7D", + "autoOptimizationStartDate": "2019-01-19T00:00:00Z" + } + } + } +} From 95d4fbd8be231ed4da991dbfbf14422bb92f4e4f Mon Sep 17 00:00:00 2001 From: Lahabar Sheetal Madhukar Date: Thu, 26 Aug 2021 14:23:10 -0700 Subject: [PATCH 02/12] addresses feedback --- .../Personalizer.json | 56 +++++++++++++------ .../examples/Evaluation_Apply.json | 0 .../examples/Evaluations_Create.json | 2 +- .../examples/Evaluations_Delete.json | 0 .../examples/Evaluations_Get.json | 0 .../examples/Evaluations_List.json | 0 .../examples/Events_Activate.json | 0 .../examples/Events_Reward.json | 0 .../examples/Log_Delete.json | 0 .../examples/Log_GetProperties.json | 0 .../examples/Log_Interactions.json | 6 +- .../examples/Log_Observations.json | 6 +- .../examples/Model_Get.json | 0 .../examples/Model_GetProperties.json | 0 .../examples/Model_Reset.json | 0 .../examples/MultiSlotEvents_Activate.json | 0 .../examples/MultiSlotEvents_Reward.json | 0 .../examples/MultiSlot_Rank.json | 0 .../examples/Policy_Get.json | 0 .../examples/Policy_Reset.json | 0 .../examples/Policy_Update.json | 0 .../examples/Rank.json | 0 .../examples/ServiceConfiguration_Get.json | 0 .../examples/ServiceConfiguration_Update.json | 0 24 files changed, 44 insertions(+), 26 deletions(-) rename specification/cognitiveservices/data-plane/Personalizer/preview/{v2.1-preview.1 => v1.1-preview.2}/Personalizer.json (97%) rename specification/cognitiveservices/data-plane/Personalizer/preview/{v2.1-preview.1 => v1.1-preview.2}/examples/Evaluation_Apply.json (100%) rename specification/cognitiveservices/data-plane/Personalizer/preview/{v2.1-preview.1 => v1.1-preview.2}/examples/Evaluations_Create.json (95%) rename specification/cognitiveservices/data-plane/Personalizer/preview/{v2.1-preview.1 => v1.1-preview.2}/examples/Evaluations_Delete.json (100%) rename specification/cognitiveservices/data-plane/Personalizer/preview/{v2.1-preview.1 => v1.1-preview.2}/examples/Evaluations_Get.json (100%) rename specification/cognitiveservices/data-plane/Personalizer/preview/{v2.1-preview.1 => v1.1-preview.2}/examples/Evaluations_List.json (100%) rename specification/cognitiveservices/data-plane/Personalizer/preview/{v2.1-preview.1 => v1.1-preview.2}/examples/Events_Activate.json (100%) rename specification/cognitiveservices/data-plane/Personalizer/preview/{v2.1-preview.1 => v1.1-preview.2}/examples/Events_Reward.json (100%) rename specification/cognitiveservices/data-plane/Personalizer/preview/{v2.1-preview.1 => v1.1-preview.2}/examples/Log_Delete.json (100%) rename specification/cognitiveservices/data-plane/Personalizer/preview/{v2.1-preview.1 => v1.1-preview.2}/examples/Log_GetProperties.json (100%) rename specification/cognitiveservices/data-plane/Personalizer/preview/{v2.1-preview.1 => v1.1-preview.2}/examples/Log_Interactions.json (71%) rename specification/cognitiveservices/data-plane/Personalizer/preview/{v2.1-preview.1 => v1.1-preview.2}/examples/Log_Observations.json (71%) rename specification/cognitiveservices/data-plane/Personalizer/preview/{v2.1-preview.1 => v1.1-preview.2}/examples/Model_Get.json (100%) rename specification/cognitiveservices/data-plane/Personalizer/preview/{v2.1-preview.1 => v1.1-preview.2}/examples/Model_GetProperties.json (100%) rename specification/cognitiveservices/data-plane/Personalizer/preview/{v2.1-preview.1 => v1.1-preview.2}/examples/Model_Reset.json (100%) rename specification/cognitiveservices/data-plane/Personalizer/preview/{v2.1-preview.1 => v1.1-preview.2}/examples/MultiSlotEvents_Activate.json (100%) rename specification/cognitiveservices/data-plane/Personalizer/preview/{v2.1-preview.1 => v1.1-preview.2}/examples/MultiSlotEvents_Reward.json (100%) rename specification/cognitiveservices/data-plane/Personalizer/preview/{v2.1-preview.1 => v1.1-preview.2}/examples/MultiSlot_Rank.json (100%) rename specification/cognitiveservices/data-plane/Personalizer/preview/{v2.1-preview.1 => v1.1-preview.2}/examples/Policy_Get.json (100%) rename specification/cognitiveservices/data-plane/Personalizer/preview/{v2.1-preview.1 => v1.1-preview.2}/examples/Policy_Reset.json (100%) rename specification/cognitiveservices/data-plane/Personalizer/preview/{v2.1-preview.1 => v1.1-preview.2}/examples/Policy_Update.json (100%) rename specification/cognitiveservices/data-plane/Personalizer/preview/{v2.1-preview.1 => v1.1-preview.2}/examples/Rank.json (100%) rename specification/cognitiveservices/data-plane/Personalizer/preview/{v2.1-preview.1 => v1.1-preview.2}/examples/ServiceConfiguration_Get.json (100%) rename specification/cognitiveservices/data-plane/Personalizer/preview/{v2.1-preview.1 => v1.1-preview.2}/examples/ServiceConfiguration_Update.json (100%) diff --git a/specification/cognitiveservices/data-plane/Personalizer/preview/v2.1-preview.1/Personalizer.json b/specification/cognitiveservices/data-plane/Personalizer/preview/v1.1-preview.2/Personalizer.json similarity index 97% rename from specification/cognitiveservices/data-plane/Personalizer/preview/v2.1-preview.1/Personalizer.json rename to specification/cognitiveservices/data-plane/Personalizer/preview/v1.1-preview.2/Personalizer.json index 70614a53a697..0ce4f4dfe9e4 100644 --- a/specification/cognitiveservices/data-plane/Personalizer/preview/v2.1-preview.1/Personalizer.json +++ b/specification/cognitiveservices/data-plane/Personalizer/preview/v1.1-preview.2/Personalizer.json @@ -1,12 +1,11 @@ { "swagger": "2.0", "info": { - "title": "Personalizer Client v2.1-preview.1", + "title": "Personalizer Client v1.1-preview.2", "description": "Personalizer Service is an Azure Cognitive Service that makes it easy to target content and experiences without complex pre-analysis or cleanup of past data. Given a context and featurized content, the Personalizer Service returns which content item to show to users in rewardActionId. As rewards are sent in response to the use of rewardActionId, the reinforcement learning algorithm will improve the model and improve performance of future rank calls.", - "version": "v2.1-preview.1" + "version": "v1.1-preview.2" }, - "host": "localhost:5001", - "basePath": "/personalizer/v2.1-preview.1", + "basePath": "/personalizer/v1.1-preview.2", "schemes": [ "https" ], @@ -458,28 +457,37 @@ "/logs/interactions": { "post": { "tags": [ - "LogsV2Dot1Preview1" + "LogsV1Dot1Preview2" ], - "summary": "Logs interactions.", - "description": "Logs interactions that will be used by Personalizer for training the model.", + "summary": "Post interactions.", + "description": "The endpoint is intended to be used from within a SDK for logging interactions and accepts specific format defined in https://github.com/VowpalWabbit/reinforcement_learning. This endpoint should not be used by the customer.", "operationId": "Log_Interactions", "consumes": [ "application/octet-stream" ], + "produces": [ + "application/json" + ], "parameters": [ { "in": "body", "name": "body", "required": true, "schema": { - "format": "byte", + "format": "binary", "type": "string" } } ], "responses": { - "200": { + "204": { "description": "Success" + }, + "default": { + "description": "Invalid request.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } } }, "x-ms-examples": { @@ -492,28 +500,37 @@ "/logs/observations": { "post": { "tags": [ - "LogsV2Dot1Preview1" + "LogsV1Dot1Preview2" ], - "summary": "Logs observations.", - "description": "Logs observations that will be used by Personalizer for training the model.", + "summary": "Post observations.", + "description": "The endpoint is intended to be used from within a SDK for logging observations and accepts specific format defined in https://github.com/VowpalWabbit/reinforcement_learning. This endpoint should not be used by the customer.", "operationId": "Log_Observations", "consumes": [ "application/octet-stream" ], + "produces": [ + "application/json" + ], "parameters": [ { "in": "body", "name": "body", "required": true, "schema": { - "format": "byte", + "format": "binary", "type": "string" } } ], "responses": { - "200": { + "204": { "description": "Success" + }, + "default": { + "description": "Invalid request.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } } }, "x-ms-examples": { @@ -526,7 +543,7 @@ "/logs": { "delete": { "tags": [ - "LogsV2Dot1Preview1" + "LogsV1Dot1Preview2" ], "summary": "Deletes Logs.", "description": "Delete all logs of Rank and Reward calls stored by Personalizer.", @@ -546,7 +563,7 @@ "/logs/properties": { "get": { "tags": [ - "LogsV2Dot1Preview1" + "LogsV1Dot1Preview2" ], "summary": "Get Log Properties.", "description": "Get properties of the Personalizer logs.", @@ -1035,6 +1052,7 @@ "InvalidEventIdToActivate", "InvalidRankRequest", "InvalidExportLogsRequest", + "InvalidRequest", "InvalidContainer", "InvalidModelMetadata", "ApprenticeModeNeverTurnedOn", @@ -1115,6 +1133,10 @@ "value": "InvalidExportLogsRequest", "description": "Invalid request." }, + { + "value": "InvalidRequest", + "description": "Invalid request." + }, { "value": "InvalidContainer", "description": "SAS Uri must be the Uri to a container that has write permissions." @@ -1895,7 +1917,7 @@ "description": "Manages ranking operations." }, { - "name": "LogsV2Dot1Preview1", + "name": "LogsV1Dot1Preview2", "description": "Manages reinforcement learning logs." } ], diff --git a/specification/cognitiveservices/data-plane/Personalizer/preview/v2.1-preview.1/examples/Evaluation_Apply.json b/specification/cognitiveservices/data-plane/Personalizer/preview/v1.1-preview.2/examples/Evaluation_Apply.json similarity index 100% rename from specification/cognitiveservices/data-plane/Personalizer/preview/v2.1-preview.1/examples/Evaluation_Apply.json rename to specification/cognitiveservices/data-plane/Personalizer/preview/v1.1-preview.2/examples/Evaluation_Apply.json diff --git a/specification/cognitiveservices/data-plane/Personalizer/preview/v2.1-preview.1/examples/Evaluations_Create.json b/specification/cognitiveservices/data-plane/Personalizer/preview/v1.1-preview.2/examples/Evaluations_Create.json similarity index 95% rename from specification/cognitiveservices/data-plane/Personalizer/preview/v2.1-preview.1/examples/Evaluations_Create.json rename to specification/cognitiveservices/data-plane/Personalizer/preview/v1.1-preview.2/examples/Evaluations_Create.json index ea522d574714..0237c8bf9640 100644 --- a/specification/cognitiveservices/data-plane/Personalizer/preview/v2.1-preview.1/examples/Evaluations_Create.json +++ b/specification/cognitiveservices/data-plane/Personalizer/preview/v1.1-preview.2/examples/Evaluations_Create.json @@ -18,7 +18,7 @@ "responses": { "201": { "headers": { - "Location": "{endpoint}/personalizer/v2.1-preview.1/evaluations/{evaluationId}" + "Location": "{endpoint}/personalizer/v1.1-preview.2/evaluations/{evaluationId}" }, "body": { "id": "b58c6d92-b727-48c1-9487-4be2782c9e0a", diff --git a/specification/cognitiveservices/data-plane/Personalizer/preview/v2.1-preview.1/examples/Evaluations_Delete.json b/specification/cognitiveservices/data-plane/Personalizer/preview/v1.1-preview.2/examples/Evaluations_Delete.json similarity index 100% rename from specification/cognitiveservices/data-plane/Personalizer/preview/v2.1-preview.1/examples/Evaluations_Delete.json rename to specification/cognitiveservices/data-plane/Personalizer/preview/v1.1-preview.2/examples/Evaluations_Delete.json diff --git a/specification/cognitiveservices/data-plane/Personalizer/preview/v2.1-preview.1/examples/Evaluations_Get.json b/specification/cognitiveservices/data-plane/Personalizer/preview/v1.1-preview.2/examples/Evaluations_Get.json similarity index 100% rename from specification/cognitiveservices/data-plane/Personalizer/preview/v2.1-preview.1/examples/Evaluations_Get.json rename to specification/cognitiveservices/data-plane/Personalizer/preview/v1.1-preview.2/examples/Evaluations_Get.json diff --git a/specification/cognitiveservices/data-plane/Personalizer/preview/v2.1-preview.1/examples/Evaluations_List.json b/specification/cognitiveservices/data-plane/Personalizer/preview/v1.1-preview.2/examples/Evaluations_List.json similarity index 100% rename from specification/cognitiveservices/data-plane/Personalizer/preview/v2.1-preview.1/examples/Evaluations_List.json rename to specification/cognitiveservices/data-plane/Personalizer/preview/v1.1-preview.2/examples/Evaluations_List.json diff --git a/specification/cognitiveservices/data-plane/Personalizer/preview/v2.1-preview.1/examples/Events_Activate.json b/specification/cognitiveservices/data-plane/Personalizer/preview/v1.1-preview.2/examples/Events_Activate.json similarity index 100% rename from specification/cognitiveservices/data-plane/Personalizer/preview/v2.1-preview.1/examples/Events_Activate.json rename to specification/cognitiveservices/data-plane/Personalizer/preview/v1.1-preview.2/examples/Events_Activate.json diff --git a/specification/cognitiveservices/data-plane/Personalizer/preview/v2.1-preview.1/examples/Events_Reward.json b/specification/cognitiveservices/data-plane/Personalizer/preview/v1.1-preview.2/examples/Events_Reward.json similarity index 100% rename from specification/cognitiveservices/data-plane/Personalizer/preview/v2.1-preview.1/examples/Events_Reward.json rename to specification/cognitiveservices/data-plane/Personalizer/preview/v1.1-preview.2/examples/Events_Reward.json diff --git a/specification/cognitiveservices/data-plane/Personalizer/preview/v2.1-preview.1/examples/Log_Delete.json b/specification/cognitiveservices/data-plane/Personalizer/preview/v1.1-preview.2/examples/Log_Delete.json similarity index 100% rename from specification/cognitiveservices/data-plane/Personalizer/preview/v2.1-preview.1/examples/Log_Delete.json rename to specification/cognitiveservices/data-plane/Personalizer/preview/v1.1-preview.2/examples/Log_Delete.json diff --git a/specification/cognitiveservices/data-plane/Personalizer/preview/v2.1-preview.1/examples/Log_GetProperties.json b/specification/cognitiveservices/data-plane/Personalizer/preview/v1.1-preview.2/examples/Log_GetProperties.json similarity index 100% rename from specification/cognitiveservices/data-plane/Personalizer/preview/v2.1-preview.1/examples/Log_GetProperties.json rename to specification/cognitiveservices/data-plane/Personalizer/preview/v1.1-preview.2/examples/Log_GetProperties.json diff --git a/specification/cognitiveservices/data-plane/Personalizer/preview/v2.1-preview.1/examples/Log_Interactions.json b/specification/cognitiveservices/data-plane/Personalizer/preview/v1.1-preview.2/examples/Log_Interactions.json similarity index 71% rename from specification/cognitiveservices/data-plane/Personalizer/preview/v2.1-preview.1/examples/Log_Interactions.json rename to specification/cognitiveservices/data-plane/Personalizer/preview/v1.1-preview.2/examples/Log_Interactions.json index 964e5bdea13e..79627d9505b6 100644 --- a/specification/cognitiveservices/data-plane/Personalizer/preview/v2.1-preview.1/examples/Log_Interactions.json +++ b/specification/cognitiveservices/data-plane/Personalizer/preview/v1.1-preview.2/examples/Log_Interactions.json @@ -1,13 +1,11 @@ { "parameters": { "Endpoint": "{Endpoint}", - "body": { - "value": 1.0 - }, + "body": "id", "Ocp-Apim-Subscription-Key": "{API key}" }, "responses": { - "200": { + "204": { } } diff --git a/specification/cognitiveservices/data-plane/Personalizer/preview/v2.1-preview.1/examples/Log_Observations.json b/specification/cognitiveservices/data-plane/Personalizer/preview/v1.1-preview.2/examples/Log_Observations.json similarity index 71% rename from specification/cognitiveservices/data-plane/Personalizer/preview/v2.1-preview.1/examples/Log_Observations.json rename to specification/cognitiveservices/data-plane/Personalizer/preview/v1.1-preview.2/examples/Log_Observations.json index 964e5bdea13e..79627d9505b6 100644 --- a/specification/cognitiveservices/data-plane/Personalizer/preview/v2.1-preview.1/examples/Log_Observations.json +++ b/specification/cognitiveservices/data-plane/Personalizer/preview/v1.1-preview.2/examples/Log_Observations.json @@ -1,13 +1,11 @@ { "parameters": { "Endpoint": "{Endpoint}", - "body": { - "value": 1.0 - }, + "body": "id", "Ocp-Apim-Subscription-Key": "{API key}" }, "responses": { - "200": { + "204": { } } diff --git a/specification/cognitiveservices/data-plane/Personalizer/preview/v2.1-preview.1/examples/Model_Get.json b/specification/cognitiveservices/data-plane/Personalizer/preview/v1.1-preview.2/examples/Model_Get.json similarity index 100% rename from specification/cognitiveservices/data-plane/Personalizer/preview/v2.1-preview.1/examples/Model_Get.json rename to specification/cognitiveservices/data-plane/Personalizer/preview/v1.1-preview.2/examples/Model_Get.json diff --git a/specification/cognitiveservices/data-plane/Personalizer/preview/v2.1-preview.1/examples/Model_GetProperties.json b/specification/cognitiveservices/data-plane/Personalizer/preview/v1.1-preview.2/examples/Model_GetProperties.json similarity index 100% rename from specification/cognitiveservices/data-plane/Personalizer/preview/v2.1-preview.1/examples/Model_GetProperties.json rename to specification/cognitiveservices/data-plane/Personalizer/preview/v1.1-preview.2/examples/Model_GetProperties.json diff --git a/specification/cognitiveservices/data-plane/Personalizer/preview/v2.1-preview.1/examples/Model_Reset.json b/specification/cognitiveservices/data-plane/Personalizer/preview/v1.1-preview.2/examples/Model_Reset.json similarity index 100% rename from specification/cognitiveservices/data-plane/Personalizer/preview/v2.1-preview.1/examples/Model_Reset.json rename to specification/cognitiveservices/data-plane/Personalizer/preview/v1.1-preview.2/examples/Model_Reset.json diff --git a/specification/cognitiveservices/data-plane/Personalizer/preview/v2.1-preview.1/examples/MultiSlotEvents_Activate.json b/specification/cognitiveservices/data-plane/Personalizer/preview/v1.1-preview.2/examples/MultiSlotEvents_Activate.json similarity index 100% rename from specification/cognitiveservices/data-plane/Personalizer/preview/v2.1-preview.1/examples/MultiSlotEvents_Activate.json rename to specification/cognitiveservices/data-plane/Personalizer/preview/v1.1-preview.2/examples/MultiSlotEvents_Activate.json diff --git a/specification/cognitiveservices/data-plane/Personalizer/preview/v2.1-preview.1/examples/MultiSlotEvents_Reward.json b/specification/cognitiveservices/data-plane/Personalizer/preview/v1.1-preview.2/examples/MultiSlotEvents_Reward.json similarity index 100% rename from specification/cognitiveservices/data-plane/Personalizer/preview/v2.1-preview.1/examples/MultiSlotEvents_Reward.json rename to specification/cognitiveservices/data-plane/Personalizer/preview/v1.1-preview.2/examples/MultiSlotEvents_Reward.json diff --git a/specification/cognitiveservices/data-plane/Personalizer/preview/v2.1-preview.1/examples/MultiSlot_Rank.json b/specification/cognitiveservices/data-plane/Personalizer/preview/v1.1-preview.2/examples/MultiSlot_Rank.json similarity index 100% rename from specification/cognitiveservices/data-plane/Personalizer/preview/v2.1-preview.1/examples/MultiSlot_Rank.json rename to specification/cognitiveservices/data-plane/Personalizer/preview/v1.1-preview.2/examples/MultiSlot_Rank.json diff --git a/specification/cognitiveservices/data-plane/Personalizer/preview/v2.1-preview.1/examples/Policy_Get.json b/specification/cognitiveservices/data-plane/Personalizer/preview/v1.1-preview.2/examples/Policy_Get.json similarity index 100% rename from specification/cognitiveservices/data-plane/Personalizer/preview/v2.1-preview.1/examples/Policy_Get.json rename to specification/cognitiveservices/data-plane/Personalizer/preview/v1.1-preview.2/examples/Policy_Get.json diff --git a/specification/cognitiveservices/data-plane/Personalizer/preview/v2.1-preview.1/examples/Policy_Reset.json b/specification/cognitiveservices/data-plane/Personalizer/preview/v1.1-preview.2/examples/Policy_Reset.json similarity index 100% rename from specification/cognitiveservices/data-plane/Personalizer/preview/v2.1-preview.1/examples/Policy_Reset.json rename to specification/cognitiveservices/data-plane/Personalizer/preview/v1.1-preview.2/examples/Policy_Reset.json diff --git a/specification/cognitiveservices/data-plane/Personalizer/preview/v2.1-preview.1/examples/Policy_Update.json b/specification/cognitiveservices/data-plane/Personalizer/preview/v1.1-preview.2/examples/Policy_Update.json similarity index 100% rename from specification/cognitiveservices/data-plane/Personalizer/preview/v2.1-preview.1/examples/Policy_Update.json rename to specification/cognitiveservices/data-plane/Personalizer/preview/v1.1-preview.2/examples/Policy_Update.json diff --git a/specification/cognitiveservices/data-plane/Personalizer/preview/v2.1-preview.1/examples/Rank.json b/specification/cognitiveservices/data-plane/Personalizer/preview/v1.1-preview.2/examples/Rank.json similarity index 100% rename from specification/cognitiveservices/data-plane/Personalizer/preview/v2.1-preview.1/examples/Rank.json rename to specification/cognitiveservices/data-plane/Personalizer/preview/v1.1-preview.2/examples/Rank.json diff --git a/specification/cognitiveservices/data-plane/Personalizer/preview/v2.1-preview.1/examples/ServiceConfiguration_Get.json b/specification/cognitiveservices/data-plane/Personalizer/preview/v1.1-preview.2/examples/ServiceConfiguration_Get.json similarity index 100% rename from specification/cognitiveservices/data-plane/Personalizer/preview/v2.1-preview.1/examples/ServiceConfiguration_Get.json rename to specification/cognitiveservices/data-plane/Personalizer/preview/v1.1-preview.2/examples/ServiceConfiguration_Get.json diff --git a/specification/cognitiveservices/data-plane/Personalizer/preview/v2.1-preview.1/examples/ServiceConfiguration_Update.json b/specification/cognitiveservices/data-plane/Personalizer/preview/v1.1-preview.2/examples/ServiceConfiguration_Update.json similarity index 100% rename from specification/cognitiveservices/data-plane/Personalizer/preview/v2.1-preview.1/examples/ServiceConfiguration_Update.json rename to specification/cognitiveservices/data-plane/Personalizer/preview/v1.1-preview.2/examples/ServiceConfiguration_Update.json From 9658d4997b8c0a3d320c2bb118bdbc2f57ee68d7 Mon Sep 17 00:00:00 2001 From: Lahabar Sheetal Madhukar Date: Fri, 27 Aug 2021 12:31:52 -0700 Subject: [PATCH 03/12] minor manual cleanups --- .../preview/v1.1-preview.2/Personalizer.json | 114 ++++-------------- ...iceConfiguration_ApplyFromEvaluation.json} | 0 2 files changed, 21 insertions(+), 93 deletions(-) rename specification/cognitiveservices/data-plane/Personalizer/preview/v1.1-preview.2/examples/{Evaluation_Apply.json => ServiceConfiguration_ApplyFromEvaluation.json} (100%) diff --git a/specification/cognitiveservices/data-plane/Personalizer/preview/v1.1-preview.2/Personalizer.json b/specification/cognitiveservices/data-plane/Personalizer/preview/v1.1-preview.2/Personalizer.json index 0ce4f4dfe9e4..8a76afecdd5a 100644 --- a/specification/cognitiveservices/data-plane/Personalizer/preview/v1.1-preview.2/Personalizer.json +++ b/specification/cognitiveservices/data-plane/Personalizer/preview/v1.1-preview.2/Personalizer.json @@ -1,7 +1,7 @@ { "swagger": "2.0", "info": { - "title": "Personalizer Client v1.1-preview.2", + "title": "Personalizer Base", "description": "Personalizer Service is an Azure Cognitive Service that makes it easy to target content and experiences without complex pre-analysis or cleanup of past data. Given a context and featurized content, the Personalizer Service returns which content item to show to users in rewardActionId. As rewards are sent in response to the use of rewardActionId, the reinforcement learning algorithm will improve the model and improve performance of future rank calls.", "version": "v1.1-preview.2" }, @@ -27,7 +27,7 @@ "parameters": [ { "in": "body", - "name": "body", + "name": "config", "description": "The personalizer service configuration.", "required": true, "schema": { @@ -121,7 +121,7 @@ "parameters": [ { "in": "body", - "name": "body", + "name": "policy", "description": "The learning settings.", "required": true, "schema": { @@ -180,7 +180,7 @@ "ConfigurationsV1Dot1Preview1" ], "summary": "Apply Learning Settings and model from a pre-existing Offline Evaluation, making them the current online Learning Settings and model and replacing the previous ones.", - "operationId": "Evaluation_Apply", + "operationId": "ServiceConfiguration_ApplyFromEvaluation", "consumes": [ "application/json" ], @@ -209,8 +209,8 @@ } }, "x-ms-examples": { - "Successful Evaluation_Apply request": { - "$ref": "./examples/Evaluation_Apply.json" + "Successful ServiceConfiguration_ApplyFromEvaluation request": { + "$ref": "./examples/ServiceConfiguration_ApplyFromEvaluation.json" } } } @@ -329,7 +329,7 @@ "parameters": [ { "in": "body", - "name": "body", + "name": "evaluation", "description": "The Offline Evaluation job definition.", "required": true, "schema": { @@ -389,7 +389,7 @@ }, { "in": "body", - "name": "body", + "name": "reward", "description": "The reward should be a floating point number, typically between 0 and 1.", "required": true, "schema": { @@ -824,7 +824,7 @@ "parameters": [ { "in": "body", - "name": "body", + "name": "rankRequest", "description": "A Personalizer Rank request.", "required": true, "schema": { @@ -855,73 +855,6 @@ } }, "definitions": { - "ApprenticeLearningMetrics": { - "required": [ - "numberOfEvents", - "numberOfImitatedEvents", - "sumOfImitatedRewards", - "sumOfRewards" - ], - "type": "object", - "properties": { - "numberOfEvents": { - "format": "int64", - "type": "integer" - }, - "sumOfRewards": { - "format": "float", - "type": "number" - }, - "numberOfImitatedEvents": { - "format": "int64", - "type": "integer" - }, - "sumOfImitatedRewards": { - "format": "float", - "type": "number" - } - } - }, - "ApprenticeModeMetrics": { - "required": [ - "lastProcessedEventTime", - "numberOfEvents", - "numberOfImitatedEvents", - "startTime", - "sumOfImitatedRewards", - "sumOfRewards" - ], - "type": "object", - "properties": { - "startTime": { - "format": "date-time", - "type": "string" - }, - "lastProcessedEventTime": { - "format": "date-time", - "type": "string" - }, - "lastBatchMetrics": { - "$ref": "#/definitions/ApprenticeLearningMetrics" - }, - "numberOfEvents": { - "format": "int64", - "type": "integer" - }, - "sumOfRewards": { - "format": "float", - "type": "number" - }, - "numberOfImitatedEvents": { - "format": "int64", - "type": "integer" - }, - "sumOfImitatedRewards": { - "format": "float", - "type": "number" - } - } - }, "ServiceConfiguration": { "description": "The configuration of the service.", "required": [ @@ -996,9 +929,6 @@ "modelAsString": true } }, - "latestApprenticeModeMetrics": { - "$ref": "#/definitions/ApprenticeModeMetrics" - }, "isAutoOptimizationEnabled": { "description": "Flag indicating whether Personalizer will automatically optimize Learning Settings by running Offline Evaluations periodically.", "type": "boolean" @@ -1398,6 +1328,8 @@ "readOnly": true }, "totalSummary": { + "description": "The aggregate total of the Offline Evaluation.", + "type": "object", "allOf": [ { "$ref": "#/definitions/PolicyResultSummary" @@ -1466,6 +1398,7 @@ } }, "featureImportance": { + "description": "Feature Importance.", "type": "array", "items": { "type": "array", @@ -1475,6 +1408,7 @@ } }, "evaluationType": { + "description": "Evaluation type (manual or through Automatic Optimization).", "enum": [ "Manual", "Auto" @@ -1486,9 +1420,11 @@ } }, "optimalPolicy": { + "description": "Thr optimal policy.", "type": "string" }, "creationTime": { + "description": "Creation time.", "format": "date-time", "type": "string" } @@ -1569,6 +1505,8 @@ "type": "object", "properties": { "dateRange": { + "description": "Date range.", + "type": "object", "allOf": [ { "$ref": "#/definitions/DateRange" @@ -1624,6 +1562,7 @@ "type": "object", "properties": { "reward": { + "description": "List of SlotRewards", "type": "array", "items": { "$ref": "#/definitions/SlotReward" @@ -1654,7 +1593,7 @@ } }, "SlotRequest": { - "description": "A slot with it\u0027s associated features and list of excluded actions", + "description": "A slot with it's associated features and list of excluded actions", "required": [ "baselineAction", "id" @@ -1680,7 +1619,7 @@ } }, "baselineAction": { - "description": "The \u0027baseline action\u0027 ID for the slot.\r\nThe BaselineAction is the Id of the Action your application would use in that slot if Personalizer didn\u0027t exist.\r\nBaselineAction must be defined for every slot.\r\nBaselineAction should never be part of ExcludedActions.\r\nEach slot must have a unique BaselineAction which corresponds to an an action from the event\u0027s Actions list.", + "description": "The 'baseline action' ID for the slot.\r\nThe BaselineAction is the Id of the Action your application would use in that slot if Personalizer didn't exist.\r\nBaselineAction must be defined for every slot.\r\nBaselineAction should never be part of ExcludedActions.\r\nEach slot must have a unique BaselineAction which corresponds to an an action from the event's Actions list.", "type": "string" } } @@ -1842,7 +1781,7 @@ "readOnly": true }, "rewardActionId": { - "description": "The action chosen by the Personalizer service.\r\nThis is the action your application should display, and for which to report the reward.\r\nThis might not be the first found in \u0027ranking\u0027.", + "description": "The action chosen by the Personalizer service.\r\nThis is the action your application should display, and for which to report the reward.\r\nThis might not be the first found in 'ranking'.", "maxLength": 256, "type": "string", "readOnly": true @@ -1875,18 +1814,7 @@ "x-ms-skip-url-encoding": true } }, - "securityDefinitions": { - "apim_key": { - "type": "apiKey", - "name": "Ocp-Apim-Subscription-Key", - "in": "header" - } - }, - "security": [ - { - } - ], "tags": [ { "name": "ConfigurationsV1Dot1Preview1", diff --git a/specification/cognitiveservices/data-plane/Personalizer/preview/v1.1-preview.2/examples/Evaluation_Apply.json b/specification/cognitiveservices/data-plane/Personalizer/preview/v1.1-preview.2/examples/ServiceConfiguration_ApplyFromEvaluation.json similarity index 100% rename from specification/cognitiveservices/data-plane/Personalizer/preview/v1.1-preview.2/examples/Evaluation_Apply.json rename to specification/cognitiveservices/data-plane/Personalizer/preview/v1.1-preview.2/examples/ServiceConfiguration_ApplyFromEvaluation.json From ee3052929246e309e53145525663c62279f29ca8 Mon Sep 17 00:00:00 2001 From: Lahabar Sheetal Madhukar Date: Mon, 30 Aug 2021 21:45:47 -0700 Subject: [PATCH 04/12] fix avocado errors --- .../data-plane/Personalizer/readme.md | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/specification/cognitiveservices/data-plane/Personalizer/readme.md b/specification/cognitiveservices/data-plane/Personalizer/readme.md index 326e97aec360..8c991b5241bd 100644 --- a/specification/cognitiveservices/data-plane/Personalizer/readme.md +++ b/specification/cognitiveservices/data-plane/Personalizer/readme.md @@ -4,10 +4,10 @@ > see https://aka.ms/autorest -The current release is `release_1_0`. A preview release release_1_1_preview.1 is also available +The current release is `release_1_0`. A preview release release_1_1_preview.2 is also available ``` yaml -tag: release_1_1_preview.1 +tag: release_1_1_preview.2 add-credentials: true openapi-type: data-plane ``` @@ -28,7 +28,7 @@ input-file: - preview/v1.0/Personalizer.json ``` -### Release 1.1-Preview +### Release 1.1-Preview.1 These settings apply only when `--tag=release_1_1_preview.1` is specified on the command line. ``` yaml $(tag) == 'release_1_1_preview.1' @@ -36,6 +36,13 @@ input-file: - preview/v1.1-preview.1/Personalizer.json ``` +### Release 1.1-Preview.2 +These settings apply only when `--tag=release_1_1_preview.2` is specified on the command line. + +``` yaml $(tag) == 'release_1_1_preview.2' +input-file: + - preview/v1.1-preview.2/Personalizer.json + ## Swagger to SDK This section describes what SDK should be generated by the automatic system. From 2ab8e90ac13372331b8a75f48dcab41b671db287 Mon Sep 17 00:00:00 2001 From: Lahabar Sheetal Madhukar Date: Mon, 30 Aug 2021 21:58:21 -0700 Subject: [PATCH 05/12] fix model validation errors --- .../preview/v1.1-preview.2/examples/Evaluations_Create.json | 2 +- .../preview/v1.1-preview.2/examples/Events_Reward.json | 2 +- .../preview/v1.1-preview.2/examples/Policy_Update.json | 2 +- .../Personalizer/preview/v1.1-preview.2/examples/Rank.json | 2 +- .../v1.1-preview.2/examples/ServiceConfiguration_Get.json | 2 +- .../examples/ServiceConfiguration_Update.json | 6 +++--- 6 files changed, 8 insertions(+), 8 deletions(-) diff --git a/specification/cognitiveservices/data-plane/Personalizer/preview/v1.1-preview.2/examples/Evaluations_Create.json b/specification/cognitiveservices/data-plane/Personalizer/preview/v1.1-preview.2/examples/Evaluations_Create.json index 0237c8bf9640..e847821190aa 100644 --- a/specification/cognitiveservices/data-plane/Personalizer/preview/v1.1-preview.2/examples/Evaluations_Create.json +++ b/specification/cognitiveservices/data-plane/Personalizer/preview/v1.1-preview.2/examples/Evaluations_Create.json @@ -20,7 +20,7 @@ "headers": { "Location": "{endpoint}/personalizer/v1.1-preview.2/evaluations/{evaluationId}" }, - "body": { + "evaluation": { "id": "b58c6d92-b727-48c1-9487-4be2782c9e0a", "name": "myFirstEvaluation", "startTime": "2018-12-19T00:00:00Z", diff --git a/specification/cognitiveservices/data-plane/Personalizer/preview/v1.1-preview.2/examples/Events_Reward.json b/specification/cognitiveservices/data-plane/Personalizer/preview/v1.1-preview.2/examples/Events_Reward.json index dcb8f81b334a..c00e9d27aee8 100644 --- a/specification/cognitiveservices/data-plane/Personalizer/preview/v1.1-preview.2/examples/Events_Reward.json +++ b/specification/cognitiveservices/data-plane/Personalizer/preview/v1.1-preview.2/examples/Events_Reward.json @@ -2,7 +2,7 @@ "parameters": { "eventId": "id", "Endpoint": "{Endpoint}", - "body": { + "reward": { "value": 1.0 }, "Ocp-Apim-Subscription-Key": "{API key}" diff --git a/specification/cognitiveservices/data-plane/Personalizer/preview/v1.1-preview.2/examples/Policy_Update.json b/specification/cognitiveservices/data-plane/Personalizer/preview/v1.1-preview.2/examples/Policy_Update.json index 73d8af798985..eba64d2aec5f 100644 --- a/specification/cognitiveservices/data-plane/Personalizer/preview/v1.1-preview.2/examples/Policy_Update.json +++ b/specification/cognitiveservices/data-plane/Personalizer/preview/v1.1-preview.2/examples/Policy_Update.json @@ -12,7 +12,7 @@ "headers": { }, - "body": { + "policy": { "name": "myPersonalizer", "arguments": "--cb_explore_adf --epsilon 0.2 --dsjson --cb_type ips -l 0.5 --l1 1E-07 --power_t 0.5" } diff --git a/specification/cognitiveservices/data-plane/Personalizer/preview/v1.1-preview.2/examples/Rank.json b/specification/cognitiveservices/data-plane/Personalizer/preview/v1.1-preview.2/examples/Rank.json index 865ca31fbcb0..a85b81130a37 100644 --- a/specification/cognitiveservices/data-plane/Personalizer/preview/v1.1-preview.2/examples/Rank.json +++ b/specification/cognitiveservices/data-plane/Personalizer/preview/v1.1-preview.2/examples/Rank.json @@ -1,7 +1,7 @@ { "parameters": { "Endpoint": "{Endpoint}", - "body": { + "rankRequest": { "contextFeatures": [ { "user": { diff --git a/specification/cognitiveservices/data-plane/Personalizer/preview/v1.1-preview.2/examples/ServiceConfiguration_Get.json b/specification/cognitiveservices/data-plane/Personalizer/preview/v1.1-preview.2/examples/ServiceConfiguration_Get.json index 5d03b58fe313..272689971c41 100644 --- a/specification/cognitiveservices/data-plane/Personalizer/preview/v1.1-preview.2/examples/ServiceConfiguration_Get.json +++ b/specification/cognitiveservices/data-plane/Personalizer/preview/v1.1-preview.2/examples/ServiceConfiguration_Get.json @@ -17,7 +17,7 @@ "logMirrorEnabled": true, "logMirrorSasUri": "https://testblob.blob.core.windows.net/container?se=2020-08-13T00%3A00Z\u0026sp=rwl\u0026spr=https\u0026sv=2018-11-09\u0026sr=c\u0026sig=signature", "logRetentionDays": 7, - "lastConfigurationEditDate": "0001-01-01T00:00:00", + "lastConfigurationEditDate": "0001-01-01T00:00:00Z", "learningMode": "Online", "isAutoOptimizationEnabled": true, "autoOptimizationFrequency": "P7D", diff --git a/specification/cognitiveservices/data-plane/Personalizer/preview/v1.1-preview.2/examples/ServiceConfiguration_Update.json b/specification/cognitiveservices/data-plane/Personalizer/preview/v1.1-preview.2/examples/ServiceConfiguration_Update.json index 9bafe7d3fe44..4f0995023b28 100644 --- a/specification/cognitiveservices/data-plane/Personalizer/preview/v1.1-preview.2/examples/ServiceConfiguration_Update.json +++ b/specification/cognitiveservices/data-plane/Personalizer/preview/v1.1-preview.2/examples/ServiceConfiguration_Update.json @@ -10,7 +10,7 @@ "logMirrorEnabled": true, "logMirrorSasUri": "https://testblob.blob.core.windows.net/container?se=2020-08-13T00%3A00Z\u0026sp=rwl\u0026spr=https\u0026sv=2018-11-09\u0026sr=c\u0026sig=signature", "logRetentionDays": 7, - "lastConfigurationEditDate": "0001-01-01T00:00:00", + "lastConfigurationEditDate": "0001-01-01T00:00:00Z", "learningMode": "Online", "isAutoOptimizationEnabled": true, "autoOptimizationFrequency": "P7D", @@ -23,7 +23,7 @@ "headers": { }, - "body": { + "config": { "rewardWaitTime": "PT10M", "defaultReward": 0.0, "rewardAggregation": "earliest", @@ -32,7 +32,7 @@ "logMirrorEnabled": true, "logMirrorSasUri": "https://testblob.blob.core.windows.net/container?se=2020-08-13T00%3A00Z\u0026sp=rwl\u0026spr=https\u0026sv=2018-11-09\u0026sr=c\u0026sig=signature", "logRetentionDays": 7, - "lastConfigurationEditDate": "0001-01-01T00:00:00", + "lastConfigurationEditDate": "0001-01-01T00:00:00Z", "learningMode": "Online", "isAutoOptimizationEnabled": true, "autoOptimizationFrequency": "P7D", From 8cc620f6639ba465b2e30caab2364ad04c28fa7a Mon Sep 17 00:00:00 2001 From: Lahabar Sheetal Madhukar Date: Mon, 30 Aug 2021 22:04:39 -0700 Subject: [PATCH 06/12] fix model validation errors --- .../preview/v1.1-preview.2/examples/Evaluations_Create.json | 4 ++-- .../preview/v1.1-preview.2/examples/Policy_Update.json | 4 ++-- .../v1.1-preview.2/examples/ServiceConfiguration_Update.json | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/specification/cognitiveservices/data-plane/Personalizer/preview/v1.1-preview.2/examples/Evaluations_Create.json b/specification/cognitiveservices/data-plane/Personalizer/preview/v1.1-preview.2/examples/Evaluations_Create.json index e847821190aa..a14011ed1375 100644 --- a/specification/cognitiveservices/data-plane/Personalizer/preview/v1.1-preview.2/examples/Evaluations_Create.json +++ b/specification/cognitiveservices/data-plane/Personalizer/preview/v1.1-preview.2/examples/Evaluations_Create.json @@ -1,7 +1,7 @@ { "parameters": { "Endpoint": "{Endpoint}", - "body": { + "evaluation": { "enableOfflineExperimentation": true, "name": "myFirstEvaluation", "startTime": "2018-12-19T00:00:00Z", @@ -20,7 +20,7 @@ "headers": { "Location": "{endpoint}/personalizer/v1.1-preview.2/evaluations/{evaluationId}" }, - "evaluation": { + "body": { "id": "b58c6d92-b727-48c1-9487-4be2782c9e0a", "name": "myFirstEvaluation", "startTime": "2018-12-19T00:00:00Z", diff --git a/specification/cognitiveservices/data-plane/Personalizer/preview/v1.1-preview.2/examples/Policy_Update.json b/specification/cognitiveservices/data-plane/Personalizer/preview/v1.1-preview.2/examples/Policy_Update.json index eba64d2aec5f..ec29bd3d85bf 100644 --- a/specification/cognitiveservices/data-plane/Personalizer/preview/v1.1-preview.2/examples/Policy_Update.json +++ b/specification/cognitiveservices/data-plane/Personalizer/preview/v1.1-preview.2/examples/Policy_Update.json @@ -1,7 +1,7 @@ { "parameters": { "Endpoint": "{Endpoint}", - "body": { + "policy": { "name": "myPersonalizer", "arguments": "--cb_explore_adf --epsilon 0.2 --dsjson --cb_type ips -l 0.5 --l1 1E-07 --power_t 0.5" }, @@ -12,7 +12,7 @@ "headers": { }, - "policy": { + "body": { "name": "myPersonalizer", "arguments": "--cb_explore_adf --epsilon 0.2 --dsjson --cb_type ips -l 0.5 --l1 1E-07 --power_t 0.5" } diff --git a/specification/cognitiveservices/data-plane/Personalizer/preview/v1.1-preview.2/examples/ServiceConfiguration_Update.json b/specification/cognitiveservices/data-plane/Personalizer/preview/v1.1-preview.2/examples/ServiceConfiguration_Update.json index 4f0995023b28..d2c2a282c048 100644 --- a/specification/cognitiveservices/data-plane/Personalizer/preview/v1.1-preview.2/examples/ServiceConfiguration_Update.json +++ b/specification/cognitiveservices/data-plane/Personalizer/preview/v1.1-preview.2/examples/ServiceConfiguration_Update.json @@ -1,7 +1,7 @@ { "parameters": { "Endpoint": "{Endpoint}", - "body": { + "config": { "rewardWaitTime": "PT10M", "defaultReward": 0.0, "rewardAggregation": "earliest", @@ -23,7 +23,7 @@ "headers": { }, - "config": { + "body": { "rewardWaitTime": "PT10M", "defaultReward": 0.0, "rewardAggregation": "earliest", From a6237f7aaa278ea662de089cee921b6b3efc53dd Mon Sep 17 00:00:00 2001 From: Lahabar Sheetal Madhukar Date: Mon, 30 Aug 2021 22:24:41 -0700 Subject: [PATCH 07/12] fix lintdiff --- .../cognitiveservices/data-plane/Personalizer/readme.md | 1 + 1 file changed, 1 insertion(+) diff --git a/specification/cognitiveservices/data-plane/Personalizer/readme.md b/specification/cognitiveservices/data-plane/Personalizer/readme.md index 8c991b5241bd..cf33e5ecdf36 100644 --- a/specification/cognitiveservices/data-plane/Personalizer/readme.md +++ b/specification/cognitiveservices/data-plane/Personalizer/readme.md @@ -42,6 +42,7 @@ These settings apply only when `--tag=release_1_1_preview.2` is specified on the ``` yaml $(tag) == 'release_1_1_preview.2' input-file: - preview/v1.1-preview.2/Personalizer.json +``` ## Swagger to SDK From 9c423a3b03c58d5d38d37f0eebe2a428813c04fe Mon Sep 17 00:00:00 2001 From: Lahabar Sheetal Madhukar Date: Mon, 30 Aug 2021 23:05:07 -0700 Subject: [PATCH 08/12] prettier run --- .../preview/v1.1-preview.2/Personalizer.json | 1 - .../examples/Evaluations_Create.json | 4 +--- .../examples/Evaluations_Delete.json | 4 +--- .../v1.1-preview.2/examples/Evaluations_Get.json | 4 +--- .../examples/Evaluations_List.json | 16 ++++------------ .../v1.1-preview.2/examples/Events_Activate.json | 4 +--- .../v1.1-preview.2/examples/Events_Reward.json | 4 +--- .../v1.1-preview.2/examples/Log_Delete.json | 4 +--- .../examples/Log_GetProperties.json | 4 +--- .../examples/Log_Interactions.json | 4 +--- .../examples/Log_Observations.json | 4 +--- .../v1.1-preview.2/examples/Model_Get.json | 4 +--- .../examples/Model_GetProperties.json | 4 +--- .../v1.1-preview.2/examples/Model_Reset.json | 4 +--- .../examples/MultiSlotEvents_Activate.json | 4 +--- .../examples/MultiSlotEvents_Reward.json | 4 +--- .../v1.1-preview.2/examples/MultiSlot_Rank.json | 4 +--- .../v1.1-preview.2/examples/Policy_Get.json | 4 +--- .../v1.1-preview.2/examples/Policy_Reset.json | 4 +--- .../v1.1-preview.2/examples/Policy_Update.json | 4 +--- .../preview/v1.1-preview.2/examples/Rank.json | 4 +--- ...ServiceConfiguration_ApplyFromEvaluation.json | 4 +--- .../examples/ServiceConfiguration_Get.json | 6 ++---- .../examples/ServiceConfiguration_Update.json | 8 +++----- 24 files changed, 29 insertions(+), 82 deletions(-) diff --git a/specification/cognitiveservices/data-plane/Personalizer/preview/v1.1-preview.2/Personalizer.json b/specification/cognitiveservices/data-plane/Personalizer/preview/v1.1-preview.2/Personalizer.json index 8a76afecdd5a..db47637f66aa 100644 --- a/specification/cognitiveservices/data-plane/Personalizer/preview/v1.1-preview.2/Personalizer.json +++ b/specification/cognitiveservices/data-plane/Personalizer/preview/v1.1-preview.2/Personalizer.json @@ -1814,7 +1814,6 @@ "x-ms-skip-url-encoding": true } }, - "tags": [ { "name": "ConfigurationsV1Dot1Preview1", diff --git a/specification/cognitiveservices/data-plane/Personalizer/preview/v1.1-preview.2/examples/Evaluations_Create.json b/specification/cognitiveservices/data-plane/Personalizer/preview/v1.1-preview.2/examples/Evaluations_Create.json index a14011ed1375..bcdb08877344 100644 --- a/specification/cognitiveservices/data-plane/Personalizer/preview/v1.1-preview.2/examples/Evaluations_Create.json +++ b/specification/cognitiveservices/data-plane/Personalizer/preview/v1.1-preview.2/examples/Evaluations_Create.json @@ -33,9 +33,7 @@ "policySource": "Online" } ], - "featureImportance": [ - - ], + "featureImportance": [], "evaluationType": "Manual", "optimalPolicy": "", "creationTime": "2019-01-20T00:00:00Z" diff --git a/specification/cognitiveservices/data-plane/Personalizer/preview/v1.1-preview.2/examples/Evaluations_Delete.json b/specification/cognitiveservices/data-plane/Personalizer/preview/v1.1-preview.2/examples/Evaluations_Delete.json index 7f7dcdfff75d..682e8a6a8084 100644 --- a/specification/cognitiveservices/data-plane/Personalizer/preview/v1.1-preview.2/examples/Evaluations_Delete.json +++ b/specification/cognitiveservices/data-plane/Personalizer/preview/v1.1-preview.2/examples/Evaluations_Delete.json @@ -5,8 +5,6 @@ "Ocp-Apim-Subscription-Key": "{API key}" }, "responses": { - "204": { - - } + "204": {} } } diff --git a/specification/cognitiveservices/data-plane/Personalizer/preview/v1.1-preview.2/examples/Evaluations_Get.json b/specification/cognitiveservices/data-plane/Personalizer/preview/v1.1-preview.2/examples/Evaluations_Get.json index 6eaa3414bfbc..513886aa3a29 100644 --- a/specification/cognitiveservices/data-plane/Personalizer/preview/v1.1-preview.2/examples/Evaluations_Get.json +++ b/specification/cognitiveservices/data-plane/Personalizer/preview/v1.1-preview.2/examples/Evaluations_Get.json @@ -6,9 +6,7 @@ }, "responses": { "200": { - "headers": { - - }, + "headers": {}, "body": { "id": "b58c6d92-b727-48c1-9487-4be2782c9e0a", "name": "myFirstEvaluation", diff --git a/specification/cognitiveservices/data-plane/Personalizer/preview/v1.1-preview.2/examples/Evaluations_List.json b/specification/cognitiveservices/data-plane/Personalizer/preview/v1.1-preview.2/examples/Evaluations_List.json index 7c09d8fc76d9..9bf183136839 100644 --- a/specification/cognitiveservices/data-plane/Personalizer/preview/v1.1-preview.2/examples/Evaluations_List.json +++ b/specification/cognitiveservices/data-plane/Personalizer/preview/v1.1-preview.2/examples/Evaluations_List.json @@ -5,9 +5,7 @@ }, "responses": { "200": { - "headers": { - - }, + "headers": {}, "body": [ { "id": "b58c6d92-b727-48c1-9487-4be2782c9e0a", @@ -33,9 +31,7 @@ } } ], - "featureImportance": [ - - ], + "featureImportance": [], "evaluationType": "Manual", "optimalPolicy": "Custom learning settings 1", "creationTime": "2019-01-19T00:00:00Z" @@ -46,12 +42,8 @@ "startTime": "2018-12-19T00:00:00Z", "endTime": "2019-01-19T00:00:00Z", "status": "pending", - "policyResults": [ - - ], - "featureImportance": [ - - ], + "policyResults": [], + "featureImportance": [], "evaluationType": "Manual", "optimalPolicy": "", "creationTime": "2019-01-19T00:00:00Z" diff --git a/specification/cognitiveservices/data-plane/Personalizer/preview/v1.1-preview.2/examples/Events_Activate.json b/specification/cognitiveservices/data-plane/Personalizer/preview/v1.1-preview.2/examples/Events_Activate.json index 7163b64c65f1..a7bec92839a5 100644 --- a/specification/cognitiveservices/data-plane/Personalizer/preview/v1.1-preview.2/examples/Events_Activate.json +++ b/specification/cognitiveservices/data-plane/Personalizer/preview/v1.1-preview.2/examples/Events_Activate.json @@ -5,8 +5,6 @@ "Ocp-Apim-Subscription-Key": "{API key}" }, "responses": { - "204": { - - } + "204": {} } } diff --git a/specification/cognitiveservices/data-plane/Personalizer/preview/v1.1-preview.2/examples/Events_Reward.json b/specification/cognitiveservices/data-plane/Personalizer/preview/v1.1-preview.2/examples/Events_Reward.json index c00e9d27aee8..3cec70597197 100644 --- a/specification/cognitiveservices/data-plane/Personalizer/preview/v1.1-preview.2/examples/Events_Reward.json +++ b/specification/cognitiveservices/data-plane/Personalizer/preview/v1.1-preview.2/examples/Events_Reward.json @@ -8,8 +8,6 @@ "Ocp-Apim-Subscription-Key": "{API key}" }, "responses": { - "204": { - - } + "204": {} } } diff --git a/specification/cognitiveservices/data-plane/Personalizer/preview/v1.1-preview.2/examples/Log_Delete.json b/specification/cognitiveservices/data-plane/Personalizer/preview/v1.1-preview.2/examples/Log_Delete.json index 66b2b3a50c4b..bd50cf1be127 100644 --- a/specification/cognitiveservices/data-plane/Personalizer/preview/v1.1-preview.2/examples/Log_Delete.json +++ b/specification/cognitiveservices/data-plane/Personalizer/preview/v1.1-preview.2/examples/Log_Delete.json @@ -4,8 +4,6 @@ "Endpoint": "{Endpoint}" }, "responses": { - "204": { - - } + "204": {} } } diff --git a/specification/cognitiveservices/data-plane/Personalizer/preview/v1.1-preview.2/examples/Log_GetProperties.json b/specification/cognitiveservices/data-plane/Personalizer/preview/v1.1-preview.2/examples/Log_GetProperties.json index 38e6fc08ba34..1df65f24582d 100644 --- a/specification/cognitiveservices/data-plane/Personalizer/preview/v1.1-preview.2/examples/Log_GetProperties.json +++ b/specification/cognitiveservices/data-plane/Personalizer/preview/v1.1-preview.2/examples/Log_GetProperties.json @@ -5,9 +5,7 @@ }, "responses": { "200": { - "headers": { - - }, + "headers": {}, "body": { "dateRange": { "from": "2019-01-19T00:00:00+00:00", diff --git a/specification/cognitiveservices/data-plane/Personalizer/preview/v1.1-preview.2/examples/Log_Interactions.json b/specification/cognitiveservices/data-plane/Personalizer/preview/v1.1-preview.2/examples/Log_Interactions.json index 79627d9505b6..f6ca04ff81d1 100644 --- a/specification/cognitiveservices/data-plane/Personalizer/preview/v1.1-preview.2/examples/Log_Interactions.json +++ b/specification/cognitiveservices/data-plane/Personalizer/preview/v1.1-preview.2/examples/Log_Interactions.json @@ -5,8 +5,6 @@ "Ocp-Apim-Subscription-Key": "{API key}" }, "responses": { - "204": { - - } + "204": {} } } diff --git a/specification/cognitiveservices/data-plane/Personalizer/preview/v1.1-preview.2/examples/Log_Observations.json b/specification/cognitiveservices/data-plane/Personalizer/preview/v1.1-preview.2/examples/Log_Observations.json index 79627d9505b6..f6ca04ff81d1 100644 --- a/specification/cognitiveservices/data-plane/Personalizer/preview/v1.1-preview.2/examples/Log_Observations.json +++ b/specification/cognitiveservices/data-plane/Personalizer/preview/v1.1-preview.2/examples/Log_Observations.json @@ -5,8 +5,6 @@ "Ocp-Apim-Subscription-Key": "{API key}" }, "responses": { - "204": { - - } + "204": {} } } diff --git a/specification/cognitiveservices/data-plane/Personalizer/preview/v1.1-preview.2/examples/Model_Get.json b/specification/cognitiveservices/data-plane/Personalizer/preview/v1.1-preview.2/examples/Model_Get.json index 502cc938327a..b8aee663b45a 100644 --- a/specification/cognitiveservices/data-plane/Personalizer/preview/v1.1-preview.2/examples/Model_Get.json +++ b/specification/cognitiveservices/data-plane/Personalizer/preview/v1.1-preview.2/examples/Model_Get.json @@ -5,9 +5,7 @@ }, "responses": { "200": { - "headers": { - - }, + "headers": {}, "body": "" } } diff --git a/specification/cognitiveservices/data-plane/Personalizer/preview/v1.1-preview.2/examples/Model_GetProperties.json b/specification/cognitiveservices/data-plane/Personalizer/preview/v1.1-preview.2/examples/Model_GetProperties.json index cde7a07c4530..b0cc4965f0f4 100644 --- a/specification/cognitiveservices/data-plane/Personalizer/preview/v1.1-preview.2/examples/Model_GetProperties.json +++ b/specification/cognitiveservices/data-plane/Personalizer/preview/v1.1-preview.2/examples/Model_GetProperties.json @@ -5,9 +5,7 @@ }, "responses": { "200": { - "headers": { - - }, + "headers": {}, "body": { "creationTime": "2019-01-19T00:00:00+00:00", "lastModifiedTime": "2019-01-19T00:00:00+00:00" diff --git a/specification/cognitiveservices/data-plane/Personalizer/preview/v1.1-preview.2/examples/Model_Reset.json b/specification/cognitiveservices/data-plane/Personalizer/preview/v1.1-preview.2/examples/Model_Reset.json index 66b2b3a50c4b..bd50cf1be127 100644 --- a/specification/cognitiveservices/data-plane/Personalizer/preview/v1.1-preview.2/examples/Model_Reset.json +++ b/specification/cognitiveservices/data-plane/Personalizer/preview/v1.1-preview.2/examples/Model_Reset.json @@ -4,8 +4,6 @@ "Endpoint": "{Endpoint}" }, "responses": { - "204": { - - } + "204": {} } } diff --git a/specification/cognitiveservices/data-plane/Personalizer/preview/v1.1-preview.2/examples/MultiSlotEvents_Activate.json b/specification/cognitiveservices/data-plane/Personalizer/preview/v1.1-preview.2/examples/MultiSlotEvents_Activate.json index 7163b64c65f1..a7bec92839a5 100644 --- a/specification/cognitiveservices/data-plane/Personalizer/preview/v1.1-preview.2/examples/MultiSlotEvents_Activate.json +++ b/specification/cognitiveservices/data-plane/Personalizer/preview/v1.1-preview.2/examples/MultiSlotEvents_Activate.json @@ -5,8 +5,6 @@ "Ocp-Apim-Subscription-Key": "{API key}" }, "responses": { - "204": { - - } + "204": {} } } diff --git a/specification/cognitiveservices/data-plane/Personalizer/preview/v1.1-preview.2/examples/MultiSlotEvents_Reward.json b/specification/cognitiveservices/data-plane/Personalizer/preview/v1.1-preview.2/examples/MultiSlotEvents_Reward.json index db8facac3b47..31d815841870 100644 --- a/specification/cognitiveservices/data-plane/Personalizer/preview/v1.1-preview.2/examples/MultiSlotEvents_Reward.json +++ b/specification/cognitiveservices/data-plane/Personalizer/preview/v1.1-preview.2/examples/MultiSlotEvents_Reward.json @@ -17,8 +17,6 @@ "Ocp-Apim-Subscription-Key": "{API key}" }, "responses": { - "204": { - - } + "204": {} } } diff --git a/specification/cognitiveservices/data-plane/Personalizer/preview/v1.1-preview.2/examples/MultiSlot_Rank.json b/specification/cognitiveservices/data-plane/Personalizer/preview/v1.1-preview.2/examples/MultiSlot_Rank.json index 74dbfe5065af..97dc17787cd1 100644 --- a/specification/cognitiveservices/data-plane/Personalizer/preview/v1.1-preview.2/examples/MultiSlot_Rank.json +++ b/specification/cognitiveservices/data-plane/Personalizer/preview/v1.1-preview.2/examples/MultiSlot_Rank.json @@ -85,9 +85,7 @@ }, "responses": { "201": { - "headers": { - - }, + "headers": {}, "body": { "slots": [ { diff --git a/specification/cognitiveservices/data-plane/Personalizer/preview/v1.1-preview.2/examples/Policy_Get.json b/specification/cognitiveservices/data-plane/Personalizer/preview/v1.1-preview.2/examples/Policy_Get.json index 68a3bbdc47ff..d454ebf852e5 100644 --- a/specification/cognitiveservices/data-plane/Personalizer/preview/v1.1-preview.2/examples/Policy_Get.json +++ b/specification/cognitiveservices/data-plane/Personalizer/preview/v1.1-preview.2/examples/Policy_Get.json @@ -5,9 +5,7 @@ }, "responses": { "200": { - "headers": { - - }, + "headers": {}, "body": { "name": "myPersonalizer", "arguments": "--cb_explore_adf --epsilon 0.2 --dsjson --cb_type ips -l 0.5 --l1 1E-07 --power_t 0.5" diff --git a/specification/cognitiveservices/data-plane/Personalizer/preview/v1.1-preview.2/examples/Policy_Reset.json b/specification/cognitiveservices/data-plane/Personalizer/preview/v1.1-preview.2/examples/Policy_Reset.json index 68a3bbdc47ff..d454ebf852e5 100644 --- a/specification/cognitiveservices/data-plane/Personalizer/preview/v1.1-preview.2/examples/Policy_Reset.json +++ b/specification/cognitiveservices/data-plane/Personalizer/preview/v1.1-preview.2/examples/Policy_Reset.json @@ -5,9 +5,7 @@ }, "responses": { "200": { - "headers": { - - }, + "headers": {}, "body": { "name": "myPersonalizer", "arguments": "--cb_explore_adf --epsilon 0.2 --dsjson --cb_type ips -l 0.5 --l1 1E-07 --power_t 0.5" diff --git a/specification/cognitiveservices/data-plane/Personalizer/preview/v1.1-preview.2/examples/Policy_Update.json b/specification/cognitiveservices/data-plane/Personalizer/preview/v1.1-preview.2/examples/Policy_Update.json index ec29bd3d85bf..a20c1b928b74 100644 --- a/specification/cognitiveservices/data-plane/Personalizer/preview/v1.1-preview.2/examples/Policy_Update.json +++ b/specification/cognitiveservices/data-plane/Personalizer/preview/v1.1-preview.2/examples/Policy_Update.json @@ -9,9 +9,7 @@ }, "responses": { "200": { - "headers": { - - }, + "headers": {}, "body": { "name": "myPersonalizer", "arguments": "--cb_explore_adf --epsilon 0.2 --dsjson --cb_type ips -l 0.5 --l1 1E-07 --power_t 0.5" diff --git a/specification/cognitiveservices/data-plane/Personalizer/preview/v1.1-preview.2/examples/Rank.json b/specification/cognitiveservices/data-plane/Personalizer/preview/v1.1-preview.2/examples/Rank.json index a85b81130a37..88f27ca4c5d6 100644 --- a/specification/cognitiveservices/data-plane/Personalizer/preview/v1.1-preview.2/examples/Rank.json +++ b/specification/cognitiveservices/data-plane/Personalizer/preview/v1.1-preview.2/examples/Rank.json @@ -64,9 +64,7 @@ }, "responses": { "201": { - "headers": { - - }, + "headers": {}, "body": { "ranking": [ { diff --git a/specification/cognitiveservices/data-plane/Personalizer/preview/v1.1-preview.2/examples/ServiceConfiguration_ApplyFromEvaluation.json b/specification/cognitiveservices/data-plane/Personalizer/preview/v1.1-preview.2/examples/ServiceConfiguration_ApplyFromEvaluation.json index 26b18de7f138..eac3177fd445 100644 --- a/specification/cognitiveservices/data-plane/Personalizer/preview/v1.1-preview.2/examples/ServiceConfiguration_ApplyFromEvaluation.json +++ b/specification/cognitiveservices/data-plane/Personalizer/preview/v1.1-preview.2/examples/ServiceConfiguration_ApplyFromEvaluation.json @@ -8,8 +8,6 @@ "Ocp-Apim-Subscription-Key": "{API key}" }, "responses": { - "204": { - - } + "204": {} } } diff --git a/specification/cognitiveservices/data-plane/Personalizer/preview/v1.1-preview.2/examples/ServiceConfiguration_Get.json b/specification/cognitiveservices/data-plane/Personalizer/preview/v1.1-preview.2/examples/ServiceConfiguration_Get.json index 272689971c41..a47f8e9ddaa8 100644 --- a/specification/cognitiveservices/data-plane/Personalizer/preview/v1.1-preview.2/examples/ServiceConfiguration_Get.json +++ b/specification/cognitiveservices/data-plane/Personalizer/preview/v1.1-preview.2/examples/ServiceConfiguration_Get.json @@ -5,9 +5,7 @@ }, "responses": { "200": { - "headers": { - - }, + "headers": {}, "body": { "rewardWaitTime": "PT10M", "defaultReward": 0.0, @@ -15,7 +13,7 @@ "explorationPercentage": 0.2, "modelExportFrequency": "PT5M", "logMirrorEnabled": true, - "logMirrorSasUri": "https://testblob.blob.core.windows.net/container?se=2020-08-13T00%3A00Z\u0026sp=rwl\u0026spr=https\u0026sv=2018-11-09\u0026sr=c\u0026sig=signature", + "logMirrorSasUri": "https://testblob.blob.core.windows.net/container?se=2020-08-13T00%3A00Z&sp=rwl&spr=https&sv=2018-11-09&sr=c&sig=signature", "logRetentionDays": 7, "lastConfigurationEditDate": "0001-01-01T00:00:00Z", "learningMode": "Online", diff --git a/specification/cognitiveservices/data-plane/Personalizer/preview/v1.1-preview.2/examples/ServiceConfiguration_Update.json b/specification/cognitiveservices/data-plane/Personalizer/preview/v1.1-preview.2/examples/ServiceConfiguration_Update.json index d2c2a282c048..22e6bb9c80dc 100644 --- a/specification/cognitiveservices/data-plane/Personalizer/preview/v1.1-preview.2/examples/ServiceConfiguration_Update.json +++ b/specification/cognitiveservices/data-plane/Personalizer/preview/v1.1-preview.2/examples/ServiceConfiguration_Update.json @@ -8,7 +8,7 @@ "explorationPercentage": 0.2, "modelExportFrequency": "PT5M", "logMirrorEnabled": true, - "logMirrorSasUri": "https://testblob.blob.core.windows.net/container?se=2020-08-13T00%3A00Z\u0026sp=rwl\u0026spr=https\u0026sv=2018-11-09\u0026sr=c\u0026sig=signature", + "logMirrorSasUri": "https://testblob.blob.core.windows.net/container?se=2020-08-13T00%3A00Z&sp=rwl&spr=https&sv=2018-11-09&sr=c&sig=signature", "logRetentionDays": 7, "lastConfigurationEditDate": "0001-01-01T00:00:00Z", "learningMode": "Online", @@ -20,9 +20,7 @@ }, "responses": { "200": { - "headers": { - - }, + "headers": {}, "body": { "rewardWaitTime": "PT10M", "defaultReward": 0.0, @@ -30,7 +28,7 @@ "explorationPercentage": 0.2, "modelExportFrequency": "PT5M", "logMirrorEnabled": true, - "logMirrorSasUri": "https://testblob.blob.core.windows.net/container?se=2020-08-13T00%3A00Z\u0026sp=rwl\u0026spr=https\u0026sv=2018-11-09\u0026sr=c\u0026sig=signature", + "logMirrorSasUri": "https://testblob.blob.core.windows.net/container?se=2020-08-13T00%3A00Z&sp=rwl&spr=https&sv=2018-11-09&sr=c&sig=signature", "logRetentionDays": 7, "lastConfigurationEditDate": "0001-01-01T00:00:00Z", "learningMode": "Online", From 1ca48e3380d578614e2b98f12c5a23f0072c857a Mon Sep 17 00:00:00 2001 From: Lahabar Sheetal Madhukar Date: Thu, 2 Sep 2021 01:13:16 -0700 Subject: [PATCH 09/12] rearrange --- .../preview/v1.1-preview.2/Personalizer.json | 696 +++++++++--------- 1 file changed, 366 insertions(+), 330 deletions(-) diff --git a/specification/cognitiveservices/data-plane/Personalizer/preview/v1.1-preview.2/Personalizer.json b/specification/cognitiveservices/data-plane/Personalizer/preview/v1.1-preview.2/Personalizer.json index db47637f66aa..1f0a35d7dbea 100644 --- a/specification/cognitiveservices/data-plane/Personalizer/preview/v1.1-preview.2/Personalizer.json +++ b/specification/cognitiveservices/data-plane/Personalizer/preview/v1.1-preview.2/Personalizer.json @@ -1,9 +1,10 @@ { "swagger": "2.0", "info": { + "version": "v1.1-preview.2", "title": "Personalizer Base", - "description": "Personalizer Service is an Azure Cognitive Service that makes it easy to target content and experiences without complex pre-analysis or cleanup of past data. Given a context and featurized content, the Personalizer Service returns which content item to show to users in rewardActionId. As rewards are sent in response to the use of rewardActionId, the reinforcement learning algorithm will improve the model and improve performance of future rank calls.", - "version": "v1.1-preview.2" + "description": "Personalizer Service is an Azure Cognitive Service that makes it easy to target content and experiences without complex pre-analysis or cleanup of past data. Given a context and featurized content, the Personalizer Service returns which content item to show to users in rewardActionId. As rewards are sent in response to the use of rewardActionId, the reinforcement learning algorithm will improve the model and improve performance of future rank calls." + }, "basePath": "/personalizer/v1.1-preview.2", "schemes": [ @@ -11,6 +12,32 @@ ], "paths": { "/configurations/service": { + "get": { + "tags": [ + "ConfigurationsV1Dot1Preview1" + ], + "summary": "Get Service Configuration.", + "description": "Get the Personalizer service configuration.", + "operationId": "ServiceConfiguration_Get", + "consumes": [], + "produces": [ + "application/json" + ], + "parameters": [], + "responses": { + "200": { + "description": "Success", + "schema": { + "$ref": "#/definitions/ServiceConfiguration" + } + } + }, + "x-ms-examples": { + "Successful ServiceConfiguration_Get request": { + "$ref": "./examples/ServiceConfiguration_Get.json" + } + } + }, "put": { "tags": [ "ConfigurationsV1Dot1Preview1" @@ -26,8 +53,8 @@ ], "parameters": [ { - "in": "body", "name": "config", + "in": "body", "description": "The personalizer service configuration.", "required": true, "schema": { @@ -54,31 +81,7 @@ "$ref": "./examples/ServiceConfiguration_Update.json" } } - }, - "get": { - "tags": [ - "ConfigurationsV1Dot1Preview1" - ], - "summary": "Get Service Configuration.", - "description": "Get the Personalizer service configuration.", - "operationId": "ServiceConfiguration_Get", - "produces": [ - "application/json" - ], - "responses": { - "200": { - "description": "Success", - "schema": { - "$ref": "#/definitions/ServiceConfiguration" - } - } - }, - "x-ms-examples": { - "Successful ServiceConfiguration_Get request": { - "$ref": "./examples/ServiceConfiguration_Get.json" - } - } - } + } }, "/configurations/policy": { "get": { @@ -88,9 +91,11 @@ "summary": "Get Policy.", "description": "Get the Learning Settings currently used by the Personalizer service.", "operationId": "Policy_Get", + "consumes": [], "produces": [ "application/json" ], + "parameters": [], "responses": { "200": { "description": "Success", @@ -120,8 +125,8 @@ ], "parameters": [ { - "in": "body", "name": "policy", + "in": "body", "description": "The learning settings.", "required": true, "schema": { @@ -156,9 +161,11 @@ "summary": "Reset Policy.", "description": "Resets the learning settings of the Personalizer service to default.", "operationId": "Policy_Reset", + "consumes": [], "produces": [ "application/json" ], + "parameters": [], "responses": { "200": { "description": "Success", @@ -173,49 +180,49 @@ } } } - }, - "/configurations/applyFromEvaluation": { - "post": { + }, + "/evaluations/{evaluationId}": { + "get": { "tags": [ - "ConfigurationsV1Dot1Preview1" - ], - "summary": "Apply Learning Settings and model from a pre-existing Offline Evaluation, making them the current online Learning Settings and model and replacing the previous ones.", - "operationId": "ServiceConfiguration_ApplyFromEvaluation", - "consumes": [ - "application/json" + "EvaluationsV1Dot1Preview1" ], + "summary": "Get Evaluation.", + "description": "Get the Offline Evaluation associated with the Id.", + "operationId": "Evaluations_Get", + "consumes": [], "produces": [ "application/json" ], "parameters": [ { - "in": "body", - "name": "body", + "name": "evaluationId", + "in": "path", + "description": "Id of the Offline Evaluation.", "required": true, - "schema": { - "$ref": "#/definitions/PolicyReferenceContract" - } + "type": "string", + "maxLength": 256 } ], "responses": { - "204": { - "description": "Success" + "200": { + "description": "Success", + "schema": { + "$ref": "#/definitions/Evaluation" + } }, "default": { - "description": "Learning Settings not found in evaluation.", + "description": "Offline Evaluation not found.", "schema": { "$ref": "#/definitions/ErrorResponse" } } }, "x-ms-examples": { - "Successful ServiceConfiguration_ApplyFromEvaluation request": { - "$ref": "./examples/ServiceConfiguration_ApplyFromEvaluation.json" + "Successful Evaluations_Get request": { + "$ref": "./examples/Evaluations_Get.json" } } - } - }, - "/evaluations/{evaluationId}": { + }, "delete": { "tags": [ "EvaluationsV1Dot1Preview1" @@ -223,10 +230,12 @@ "summary": "Delete Evaluation.", "description": "Delete the Offline Evaluation associated with the Id.", "operationId": "Evaluations_Delete", + "consumes": [], + "produces": [], "parameters": [ { - "in": "path", - "name": "evaluationId", + "name": "evaluationId", + "in": "path", "description": "Id of the Offline Evaluation to delete.", "required": true, "type": "string", @@ -243,47 +252,7 @@ "$ref": "./examples/Evaluations_Delete.json" } } - }, - "get": { - "tags": [ - "EvaluationsV1Dot1Preview1" - ], - "summary": "Get Evaluation.", - "description": "Get the Offline Evaluation associated with the Id.", - "operationId": "Evaluations_Get", - "produces": [ - "application/json" - ], - "parameters": [ - { - "in": "path", - "name": "evaluationId", - "description": "Id of the Offline Evaluation.", - "required": true, - "type": "string", - "maxLength": 256 - } - ], - "responses": { - "200": { - "description": "Success", - "schema": { - "$ref": "#/definitions/Evaluation" - } - }, - "default": { - "description": "Offline Evaluation not found.", - "schema": { - "$ref": "#/definitions/ErrorResponse" - } - } - }, - "x-ms-examples": { - "Successful Evaluations_Get request": { - "$ref": "./examples/Evaluations_Get.json" - } - } - } + } }, "/evaluations": { "get": { @@ -293,9 +262,11 @@ "summary": "List Offline Evaluations.", "description": "List of all Offline Evaluations.", "operationId": "Evaluations_List", + "consumes": [], "produces": [ "application/json" ], + "parameters": [], "responses": { "200": { "description": "Success", @@ -328,8 +299,8 @@ ], "parameters": [ { - "in": "body", - "name": "evaluation", + "name": "evaluation", + "in": "body", "description": "The Offline Evaluation job definition.", "required": true, "schema": { @@ -380,16 +351,16 @@ ], "parameters": [ { - "in": "path", "name": "eventId", + "in": "path", "description": "The event id this reward applies to.", "required": true, "type": "string", "maxLength": 256 }, { - "in": "body", "name": "reward", + "in": "body", "description": "The reward should be a floating point number, typically between 0 and 1.", "required": true, "schema": { @@ -423,13 +394,14 @@ "summary": "Activate Event.", "description": "Report that the specified event was actually used (e.g. by being displayed to the user) and a reward should be expected for it.", "operationId": "Events_Activate", + "consumes": [], "produces": [ "application/json" ], "parameters": [ { - "in": "path", - "name": "eventId", + "name": "eventId", + "in": "path", "description": "The event ID to be activated.", "required": true, "type": "string", @@ -454,6 +426,47 @@ } } }, + "/configurations/applyFromEvaluation": { + "post": { + "tags": [ + "ConfigurationsV1Dot1Preview1" + ], + "summary": "Apply Learning Settings and model from a pre-existing Offline Evaluation, making them the current online Learning Settings and model and replacing the previous ones.", + "operationId": "ServiceConfiguration_ApplyFromEvaluation", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "parameters": [ + { + "in": "body", + "name": "body", + "required": true, + "schema": { + "$ref": "#/definitions/PolicyReferenceContract" + } + } + ], + "responses": { + "204": { + "description": "Success" + }, + "default": { + "description": "Learning Settings not found in evaluation.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "Successful ServiceConfiguration_ApplyFromEvaluation request": { + "$ref": "./examples/ServiceConfiguration_ApplyFromEvaluation.json" + } + } + } + }, "/logs/interactions": { "post": { "tags": [ @@ -548,6 +561,9 @@ "summary": "Deletes Logs.", "description": "Delete all logs of Rank and Reward calls stored by Personalizer.", "operationId": "Log_Delete", + "consumes": [], + "produces": [], + "parameters": [], "responses": { "204": { "description": "Success" @@ -568,9 +584,11 @@ "summary": "Get Log Properties.", "description": "Get properties of the Personalizer logs.", "operationId": "Log_GetProperties", + "consumes": [], "produces": [ "application/json" ], + "parameters": [], "responses": { "200": { "description": "Success", @@ -600,9 +618,11 @@ "summary": "Get Model.", "description": "Get the model file generated by Personalizer service.", "operationId": "Model_Get", + "consumes": [], "produces": [ "application/octet-stream" ], + "parameters": [], "responses": { "200": { "description": "Success", @@ -624,9 +644,11 @@ "summary": "Reset Model.", "description": "Resets the model file generated by Personalizer service.", "operationId": "Model_Reset", + "consumes": [], "produces": [ "application/json" ], + "parameters": [], "responses": { "204": { "description": "Success" @@ -653,9 +675,11 @@ "summary": "Get Model Properties.", "description": "Get properties of the model file generated by Personalizer service.", "operationId": "Model_GetProperties", + "consumes": [], "produces": [ "application/json" ], + "parameters": [], "responses": { "200": { "description": "Success", @@ -823,8 +847,8 @@ ], "parameters": [ { + "name": "rankRequest", "in": "body", - "name": "rankRequest", "description": "A Personalizer Rank request.", "required": true, "schema": { @@ -858,12 +882,12 @@ "ServiceConfiguration": { "description": "The configuration of the service.", "required": [ + "rewardWaitTime", "defaultReward", + "rewardAggregation", "explorationPercentage", - "logRetentionDays", "modelExportFrequency", - "rewardAggregation", - "rewardWaitTime" + "logRetentionDays" ], "type": "object", "properties": { @@ -945,19 +969,18 @@ } } }, - "InternalError": { - "description": "An object containing more specific information than the parent object about the error.", + "ErrorResponse": { + "description": "Used to return an error to the client", + "required": [ + "error" + ], "type": "object", "properties": { - "code": { - "description": "Detailed error code.", - "type": "string" - }, - "innererror": { - "$ref": "#/definitions/InternalError" + "error": { + "$ref": "#/definitions/PersonalizerError" } } - }, + }, "PersonalizerError": { "description": "The error object.", "required": [ @@ -1178,23 +1201,24 @@ } } }, - "ErrorResponse": { - "description": "Used to return an error to the client", - "required": [ - "error" - ], + "InternalError": { + "description": "An object containing more specific information than the parent object about the error.", "type": "object", "properties": { - "error": { - "$ref": "#/definitions/PersonalizerError" + "code": { + "description": "Detailed error code.", + "type": "string" + }, + "innererror": { + "$ref": "#/definitions/InternalError" } } - }, + }, "PolicyContract": { "description": "Learning settings specifying how to train the model.", "required": [ - "arguments", - "name" + "name", + "arguments" ], "type": "object", "properties": { @@ -1210,82 +1234,94 @@ } } }, - "PolicyReferenceContract": { - "description": "Reference to the policy within the evaluation.", - "required": [ - "evaluationId", - "policyName" - ], + "Evaluation": { + "description": "A counterfactual evaluation.", "type": "object", "properties": { - "evaluationId": { - "description": "Evaluation Id of the evaluation.", + "id": { + "description": "The ID of the evaluation.", "maxLength": 256, - "type": "string" + "type": "string", + "readOnly": true }, - "policyName": { - "description": "Name of the learning settings.", + "name": { + "description": "The name of the evaluation.", "maxLength": 256, - "type": "string" - } - } - }, - "PolicyResultSummary": { - "description": "This class contains the summary of evaluating a policy on a counterfactual evaluation.", - "type": "object", - "properties": { - "timeStamp": { - "format": "date-time", - "description": "Timestamp of the aggregation.", "type": "string", "readOnly": true }, - "ipsEstimatorNumerator": { - "format": "float", - "description": "Numerator for IPS estimator.", - "type": "number", + "startTime": { + "format": "date-time", + "description": "The start time of the evaluation.", + "type": "string", "readOnly": true }, - "ipsEstimatorDenominator": { - "format": "float", - "description": "Denominator for IPS estimator.", - "type": "number", + "endTime": { + "format": "date-time", + "description": "The end time of the evaluation.", + "type": "string", "readOnly": true }, - "snipsEstimatorDenominator": { - "format": "float", - "description": "Denominator for SNIPS estimator.", - "type": "number", + "jobId": { + "description": "The ID of the job processing the evaluation.", + "type": "string", "readOnly": true }, - "aggregateTimeWindow": { - "format": "duration", - "description": "Time window for aggregation.\r\nFor example, PT5M (5 mins). For information about the time format,\r\nsee http://en.wikipedia.org/wiki/ISO_8601#Durations", + "status": { + "description": "The status of the job processing the evaluation.", + "enum": [ + "completed", + "pending", + "failed", + "notSubmitted", + "timeout", + "optimalPolicyApplied", + "onlinePolicyRetained" + ], "type": "string", - "readOnly": true + "readOnly": true, + "x-ms-enum": { + "name": "EvaluationJobStatus", + "modelAsString": true + } }, - "nonZeroProbability": { - "format": "float", - "description": "Probability of non-zero values for the Policy evaluation.", - "type": "number" + "policyResults": { + "description": "The results of the evaluation.", + "type": "array", + "items": { + "$ref": "#/definitions/PolicyResult" + } }, - "sumOfSquares": { - "format": "float", - "description": "Sum of Squares for the Policy evaluation results.", - "type": "number", - "readOnly": true + "featureImportance": { + "description": "Feature Importance.", + "type": "array", + "items": { + "type": "array", + "items": { + "type": "string" + } + } }, - "confidenceInterval": { - "format": "float", - "description": "Gaussian confidence interval for the Policy evaluation.", - "type": "number", - "readOnly": true + "evaluationType": { + "description": "Evaluation type (manual or through Automatic Optimization).", + "enum": [ + "Manual", + "Auto" + ], + "type": "string", + "x-ms-enum": { + "name": "EvaluationType", + "modelAsString": true + } }, - "averageReward": { - "format": "float", - "description": "Average reward.", - "type": "number", - "readOnly": true + "optimalPolicy": { + "description": "Thr optimal policy.", + "type": "string" + }, + "creationTime": { + "description": "Creation time.", + "format": "date-time", + "type": "string" } } }, @@ -1338,105 +1374,93 @@ "readOnly": true } } - }, - "Evaluation": { - "description": "A counterfactual evaluation.", + }, + "PolicyResultSummary": { + "description": "This class contains the summary of evaluating a policy on a counterfactual evaluation.", "type": "object", "properties": { - "id": { - "description": "The ID of the evaluation.", - "maxLength": 256, + "timeStamp": { + "format": "date-time", + "description": "Timestamp of the aggregation.", "type": "string", "readOnly": true }, - "name": { - "description": "The name of the evaluation.", - "maxLength": 256, - "type": "string", + "ipsEstimatorNumerator": { + "format": "float", + "description": "Numerator for IPS estimator.", + "type": "number", "readOnly": true }, - "startTime": { - "format": "date-time", - "description": "The start time of the evaluation.", - "type": "string", + "ipsEstimatorDenominator": { + "format": "float", + "description": "Denominator for IPS estimator.", + "type": "number", "readOnly": true }, - "endTime": { - "format": "date-time", - "description": "The end time of the evaluation.", - "type": "string", + "snipsEstimatorDenominator": { + "format": "float", + "description": "Denominator for SNIPS estimator.", + "type": "number", "readOnly": true }, - "jobId": { - "description": "The ID of the job processing the evaluation.", + "aggregateTimeWindow": { + "format": "duration", + "description": "Time window for aggregation.\r\nFor example, PT5M (5 mins). For information about the time format,\r\nsee http://en.wikipedia.org/wiki/ISO_8601#Durations", "type": "string", "readOnly": true }, - "status": { - "description": "The status of the job processing the evaluation.", - "enum": [ - "completed", - "pending", - "failed", - "notSubmitted", - "timeout", - "optimalPolicyApplied", - "onlinePolicyRetained" - ], - "type": "string", - "readOnly": true, - "x-ms-enum": { - "name": "EvaluationJobStatus", - "modelAsString": true - } - }, - "policyResults": { - "description": "The results of the evaluation.", - "type": "array", - "items": { - "$ref": "#/definitions/PolicyResult" - } + "nonZeroProbability": { + "format": "float", + "description": "Probability of non-zero values for the Policy evaluation.", + "type": "number" }, - "featureImportance": { - "description": "Feature Importance.", - "type": "array", - "items": { - "type": "array", - "items": { - "type": "string" - } - } + "sumOfSquares": { + "format": "float", + "description": "Sum of Squares for the Policy evaluation results.", + "type": "number", + "readOnly": true }, - "evaluationType": { - "description": "Evaluation type (manual or through Automatic Optimization).", - "enum": [ - "Manual", - "Auto" - ], - "type": "string", - "x-ms-enum": { - "name": "EvaluationType", - "modelAsString": true - } + "confidenceInterval": { + "format": "float", + "description": "Gaussian confidence interval for the Policy evaluation.", + "type": "number", + "readOnly": true }, - "optimalPolicy": { - "description": "Thr optimal policy.", + "averageReward": { + "format": "float", + "description": "Average reward.", + "type": "number", + "readOnly": true + } + } + }, + "PolicyReferenceContract": { + "description": "Reference to the policy within the evaluation.", + "required": [ + "evaluationId", + "policyName" + ], + "type": "object", + "properties": { + "evaluationId": { + "description": "Evaluation Id of the evaluation.", + "maxLength": 256, "type": "string" }, - "creationTime": { - "description": "Creation time.", - "format": "date-time", + "policyName": { + "description": "Name of the learning settings.", + "maxLength": 256, "type": "string" } } - }, + }, "EvaluationContract": { "description": "A counterfactual evaluation.", "required": [ - "endTime", "name", - "policies", - "startTime" + "startTime", + "endTime", + "policies" ], "type": "object", "properties": { @@ -1482,6 +1506,22 @@ } } }, + "LogsProperties": { + "description": "Properties related to data used to train the model.", + "type": "object", + "properties": { + "dateRange": { + "description": "Date range.", + "type": "object", + "allOf": [ + { + "$ref": "#/definitions/DateRange" + } + ], + "readOnly": true + } + } + }, "DateRange": { "description": "A date range starting at From and ending at To.", "type": "object", @@ -1499,23 +1539,7 @@ "readOnly": true } } - }, - "LogsProperties": { - "description": "Properties related to data used to train the model.", - "type": "object", - "properties": { - "dateRange": { - "description": "Date range.", - "type": "object", - "allOf": [ - { - "$ref": "#/definitions/DateRange" - } - ], - "readOnly": true - } - } - }, + }, "ModelProperties": { "description": "Properties related to the trained model.", "type": "object", @@ -1570,11 +1594,51 @@ } } }, + "RankRequest": { + "description": "Request a set of actions to be ranked by the Personalizer service.", + "required": [ + "actions" + ], + "type": "object", + "properties": { + "contextFeatures": { + "description": "Features of the context used for Personalizer as a\r\ndictionary of dictionaries. This is determined by your application, and\r\ntypically includes features about the current user, their\r\ndevice, profile information, aggregated data about time and date, etc.\r\nFeatures should not include personally identifiable information (PII),\r\nunique UserIDs, or precise timestamps.", + "type": "array", + "items": { + "type": "object" + } + }, + "actions": { + "description": "The set of actions the Personalizer service can pick from.\r\nThe set should not contain more than 50 actions.\r\nThe order of the actions does not affect the rank result but the order\r\nshould match the sequence your application would have used to display them.\r\nThe first item in the array will be used as Baseline item in Offline Evaluations.", + "type": "array", + "items": { + "$ref": "#/definitions/RankableAction" + } + }, + "excludedActions": { + "description": "The set of action ids to exclude from ranking.\r\nPersonalizer will consider the first non-excluded item in the array as the Baseline action when performing Offline Evaluations.", + "type": "array", + "items": { + "type": "string" + } + }, + "eventId": { + "description": "Optionally pass an eventId that uniquely identifies this Rank event.\r\nIf null, the service generates a unique eventId. The eventId will be used for\r\nassociating this request with its reward, as well as seeding the pseudo-random\r\ngenerator when making a Personalizer call.", + "maxLength": 256, + "type": "string" + }, + "deferActivation": { + "description": "Send false if it is certain the rewardActionId in rank results will be shown to the user, therefore\r\nPersonalizer will expect a Reward call, otherwise it will assign the default\r\nReward to the event. Send true if it is possible the user will not see the action specified in the rank results,\r\n(e.g. because the page is rendering later, or the Rank results may be overridden by code further downstream).\r\nYou must call the Activate Event API if the event output is shown to users, otherwise Rewards will be ignored.", + "default": false, + "type": "boolean" + } + } + }, "RankableAction": { "description": "An action with its associated features used for ranking.", "required": [ - "features", - "id" + "id", + "features" ], "type": "object", "properties": { @@ -1701,44 +1765,30 @@ "readOnly": true } } - }, - "RankRequest": { - "description": "Request a set of actions to be ranked by the Personalizer service.", - "required": [ - "actions" - ], + }, + "RankResponse": { + "description": "Returns which action to use as rewardActionId, and additional information about each action as a result of a Rank request.", "type": "object", "properties": { - "contextFeatures": { - "description": "Features of the context used for Personalizer as a\r\ndictionary of dictionaries. This is determined by your application, and\r\ntypically includes features about the current user, their\r\ndevice, profile information, aggregated data about time and date, etc.\r\nFeatures should not include personally identifiable information (PII),\r\nunique UserIDs, or precise timestamps.", - "type": "array", - "items": { - "type": "object" - } - }, - "actions": { - "description": "The set of actions the Personalizer service can pick from.\r\nThe set should not contain more than 50 actions.\r\nThe order of the actions does not affect the rank result but the order\r\nshould match the sequence your application would have used to display them.\r\nThe first item in the array will be used as Baseline item in Offline Evaluations.", - "type": "array", - "items": { - "$ref": "#/definitions/RankableAction" - } - }, - "excludedActions": { - "description": "The set of action ids to exclude from ranking.\r\nPersonalizer will consider the first non-excluded item in the array as the Baseline action when performing Offline Evaluations.", + "ranking": { + "description": "The calculated ranking for the current request.", "type": "array", "items": { - "type": "string" - } + "$ref": "#/definitions/RankedAction" + }, + "readOnly": true }, "eventId": { - "description": "Optionally pass an eventId that uniquely identifies this Rank event.\r\nIf null, the service generates a unique eventId. The eventId will be used for\r\nassociating this request with its reward, as well as seeding the pseudo-random\r\ngenerator when making a Personalizer call.", + "description": "The eventId for the round trip from request to response.", "maxLength": 256, - "type": "string" + "type": "string", + "readOnly": true }, - "deferActivation": { - "description": "Send false if it is certain the rewardActionId in rank results will be shown to the user, therefore\r\nPersonalizer will expect a Reward call, otherwise it will assign the default\r\nReward to the event. Send true if it is possible the user will not see the action specified in the rank results,\r\n(e.g. because the page is rendering later, or the Rank results may be overridden by code further downstream).\r\nYou must call the Activate Event API if the event output is shown to users, otherwise Rewards will be ignored.", - "default": false, - "type": "boolean" + "rewardActionId": { + "description": "The action chosen by the Personalizer service.\r\nThis is the action your application should display, and for which to report the reward.\r\nThis might not be the first found in 'ranking'.", + "maxLength": 256, + "type": "string", + "readOnly": true } } }, @@ -1761,33 +1811,7 @@ "readOnly": true } } - }, - "RankResponse": { - "description": "Returns which action to use as rewardActionId, and additional information about each action as a result of a Rank request.", - "type": "object", - "properties": { - "ranking": { - "description": "The calculated ranking for the current request.", - "type": "array", - "items": { - "$ref": "#/definitions/RankedAction" - }, - "readOnly": true - }, - "eventId": { - "description": "The eventId for the round trip from request to response.", - "maxLength": 256, - "type": "string", - "readOnly": true - }, - "rewardActionId": { - "description": "The action chosen by the Personalizer service.\r\nThis is the action your application should display, and for which to report the reward.\r\nThis might not be the first found in 'ranking'.", - "maxLength": 256, - "type": "string", - "readOnly": true - } - } - }, + }, "ServiceStatus": { "type": "object", "properties": { @@ -1805,8 +1829,8 @@ }, "parameters": { "Endpoint": { - "in": "path", "name": "Endpoint", + "in": "path", "description": "Supported Cognitive Services endpoint.", "required": true, "type": "string", @@ -1814,6 +1838,18 @@ "x-ms-skip-url-encoding": true } }, + "securityDefinitions": { + "apim_key": { + "name": "Ocp-Apim-Subscription-Key", + "in": "header", + "type": "apiKey" + } + }, + "security": [ + { + "apim_key": [] + } + ], "tags": [ { "name": "ConfigurationsV1Dot1Preview1", From 3056de4429bb2a8d8ca6d60389e70c6df618befb Mon Sep 17 00:00:00 2001 From: Lahabar Sheetal Madhukar Date: Thu, 2 Sep 2021 01:22:17 -0700 Subject: [PATCH 10/12] prettier --- .../preview/v1.1-preview.2/Personalizer.json | 41 +++++++++---------- 1 file changed, 20 insertions(+), 21 deletions(-) diff --git a/specification/cognitiveservices/data-plane/Personalizer/preview/v1.1-preview.2/Personalizer.json b/specification/cognitiveservices/data-plane/Personalizer/preview/v1.1-preview.2/Personalizer.json index 1f0a35d7dbea..5fa06fdbcfb5 100644 --- a/specification/cognitiveservices/data-plane/Personalizer/preview/v1.1-preview.2/Personalizer.json +++ b/specification/cognitiveservices/data-plane/Personalizer/preview/v1.1-preview.2/Personalizer.json @@ -4,7 +4,6 @@ "version": "v1.1-preview.2", "title": "Personalizer Base", "description": "Personalizer Service is an Azure Cognitive Service that makes it easy to target content and experiences without complex pre-analysis or cleanup of past data. Given a context and featurized content, the Personalizer Service returns which content item to show to users in rewardActionId. As rewards are sent in response to the use of rewardActionId, the reinforcement learning algorithm will improve the model and improve performance of future rank calls." - }, "basePath": "/personalizer/v1.1-preview.2", "schemes": [ @@ -12,7 +11,7 @@ ], "paths": { "/configurations/service": { - "get": { + "get": { "tags": [ "ConfigurationsV1Dot1Preview1" ], @@ -81,7 +80,7 @@ "$ref": "./examples/ServiceConfiguration_Update.json" } } - } + } }, "/configurations/policy": { "get": { @@ -180,9 +179,9 @@ } } } - }, + }, "/evaluations/{evaluationId}": { - "get": { + "get": { "tags": [ "EvaluationsV1Dot1Preview1" ], @@ -195,7 +194,7 @@ ], "parameters": [ { - "name": "evaluationId", + "name": "evaluationId", "in": "path", "description": "Id of the Offline Evaluation.", "required": true, @@ -234,8 +233,8 @@ "produces": [], "parameters": [ { - "name": "evaluationId", - "in": "path", + "name": "evaluationId", + "in": "path", "description": "Id of the Offline Evaluation to delete.", "required": true, "type": "string", @@ -252,7 +251,7 @@ "$ref": "./examples/Evaluations_Delete.json" } } - } + } }, "/evaluations": { "get": { @@ -299,8 +298,8 @@ ], "parameters": [ { - "name": "evaluation", - "in": "body", + "name": "evaluation", + "in": "body", "description": "The Offline Evaluation job definition.", "required": true, "schema": { @@ -400,8 +399,8 @@ ], "parameters": [ { - "name": "eventId", - "in": "path", + "name": "eventId", + "in": "path", "description": "The event ID to be activated.", "required": true, "type": "string", @@ -847,7 +846,7 @@ ], "parameters": [ { - "name": "rankRequest", + "name": "rankRequest", "in": "body", "description": "A Personalizer Rank request.", "required": true, @@ -980,7 +979,7 @@ "$ref": "#/definitions/PersonalizerError" } } - }, + }, "PersonalizerError": { "description": "The error object.", "required": [ @@ -1213,7 +1212,7 @@ "$ref": "#/definitions/InternalError" } } - }, + }, "PolicyContract": { "description": "Learning settings specifying how to train the model.", "required": [ @@ -1374,7 +1373,7 @@ "readOnly": true } } - }, + }, "PolicyResultSummary": { "description": "This class contains the summary of evaluating a policy on a counterfactual evaluation.", "type": "object", @@ -1453,7 +1452,7 @@ "type": "string" } } - }, + }, "EvaluationContract": { "description": "A counterfactual evaluation.", "required": [ @@ -1539,7 +1538,7 @@ "readOnly": true } } - }, + }, "ModelProperties": { "description": "Properties related to the trained model.", "type": "object", @@ -1765,7 +1764,7 @@ "readOnly": true } } - }, + }, "RankResponse": { "description": "Returns which action to use as rewardActionId, and additional information about each action as a result of a Rank request.", "type": "object", @@ -1811,7 +1810,7 @@ "readOnly": true } } - }, + }, "ServiceStatus": { "type": "object", "properties": { From dea73a0b82683fc59e1f9a7cdb94ab7ee9e70d60 Mon Sep 17 00:00:00 2001 From: Lahabar Sheetal Madhukar Date: Tue, 7 Sep 2021 13:28:15 -0700 Subject: [PATCH 11/12] Adds description for missing parameters. --- .../Personalizer/preview/v1.1-preview.2/Personalizer.json | 3 +++ 1 file changed, 3 insertions(+) diff --git a/specification/cognitiveservices/data-plane/Personalizer/preview/v1.1-preview.2/Personalizer.json b/specification/cognitiveservices/data-plane/Personalizer/preview/v1.1-preview.2/Personalizer.json index 5fa06fdbcfb5..60755acab7c2 100644 --- a/specification/cognitiveservices/data-plane/Personalizer/preview/v1.1-preview.2/Personalizer.json +++ b/specification/cognitiveservices/data-plane/Personalizer/preview/v1.1-preview.2/Personalizer.json @@ -442,6 +442,7 @@ { "in": "body", "name": "body", + "description": "Reference to the policy within the evaluation.", "required": true, "schema": { "$ref": "#/definitions/PolicyReferenceContract" @@ -484,6 +485,7 @@ { "in": "body", "name": "body", + "description": "Interactions binary payload.", "required": true, "schema": { "format": "binary", @@ -527,6 +529,7 @@ { "in": "body", "name": "body", + "description": "Observations binary payload.", "required": true, "schema": { "format": "binary", From 8e3268215edb244ab47ba21a31e33e5b548ed0e4 Mon Sep 17 00:00:00 2001 From: Lahabar Sheetal Madhukar Date: Tue, 7 Sep 2021 13:36:12 -0700 Subject: [PATCH 12/12] prettier run --- .../Personalizer/preview/v1.1-preview.2/Personalizer.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/specification/cognitiveservices/data-plane/Personalizer/preview/v1.1-preview.2/Personalizer.json b/specification/cognitiveservices/data-plane/Personalizer/preview/v1.1-preview.2/Personalizer.json index 60755acab7c2..f87e2a9b49ca 100644 --- a/specification/cognitiveservices/data-plane/Personalizer/preview/v1.1-preview.2/Personalizer.json +++ b/specification/cognitiveservices/data-plane/Personalizer/preview/v1.1-preview.2/Personalizer.json @@ -442,7 +442,7 @@ { "in": "body", "name": "body", - "description": "Reference to the policy within the evaluation.", + "description": "Reference to the policy within the evaluation.", "required": true, "schema": { "$ref": "#/definitions/PolicyReferenceContract" @@ -485,7 +485,7 @@ { "in": "body", "name": "body", - "description": "Interactions binary payload.", + "description": "Interactions binary payload.", "required": true, "schema": { "format": "binary", @@ -529,7 +529,7 @@ { "in": "body", "name": "body", - "description": "Observations binary payload.", + "description": "Observations binary payload.", "required": true, "schema": { "format": "binary",