Service Configuration - Update
Update Service Configuration.
Update the Personalizer service configuration.
PUT {Endpoint}/personalizer/v1.1-preview.1/configurations/service
URI Parameters
| Name | In | Required | Type | Description |
|---|---|---|---|---|
|
Endpoint
|
path | True |
string |
Supported Cognitive Services endpoint. |
Request Body
| Name | Required | Type | Description |
|---|---|---|---|
| defaultReward | True |
number (float) minimum: -1maximum: 1 |
The reward given if a reward is not received within the specified wait time. |
| explorationPercentage | True |
number (float) minimum: 0maximum: 1 |
The percentage of rank responses that will use exploration. |
| logRetentionDays | True |
integer (int32) minimum: -1maximum: 2147483647 |
Number of days historical logs are to be maintained. -1 implies the logs will never be deleted. |
| modelExportFrequency | True |
string (duration) |
Personalizer will start using the most updated trained model for online ranks automatically every specified time period. For example, PT5M (5 mins). For information about the time format, see http://en.wikipedia.org/wiki/ISO_8601#Durations |
| rewardAggregation | True |
string maxLength: 256 |
The function used to process rewards, if multiple reward scores are received before rewardWaitTime is over. |
| rewardWaitTime | True |
string (duration) |
The time span waited until a request is marked with the default reward and should be between 5 seconds and 2 days. For example, PT5M (5 mins). For information about the time format, see http://en.wikipedia.org/wiki/ISO_8601#Durations |
| autoOptimizationFrequency |
string (duration) |
Frequency of automatic optimization. Only relevant if IsAutoOptimizationEnabled is true. For example, PT5M (5 mins). For information about the time format, \r\nsee http://en.wikipedia.org/wiki/ISO_8601#Durations |
|
| autoOptimizationStartDate |
string (date-time) |
Date when the first automatic optimization evaluation must be performed. Only relevant if IsAutoOptimizationEnabled is true. |
|
| isAutoOptimizationEnabled |
boolean |
Flag indicating whether Personalizer will automatically optimize Learning Settings by running Offline Evaluations periodically. |
|
| lastConfigurationEditDate |
string (date-time) |
Last time model training configuration was updated |
|
| learningMode |
Learning Modes for Personalizer |
||
| logMirrorEnabled |
boolean |
Flag indicates whether log mirroring is enabled. |
|
| logMirrorSasUri |
string |
Azure storage account container SAS URI for log mirroring. |
Responses
| Name | Type | Description |
|---|---|---|
| 200 OK |
Success |
|
| Other Status Codes |
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. |
Examples
Successful ServiceConfiguration_Update request
Sample request
PUT {Endpoint}/personalizer/v1.1-preview.1/configurations/service
{
"rewardWaitTime": "PT10M",
"defaultReward": 0,
"rewardAggregation": "earliest",
"explorationPercentage": 0.2,
"modelExportFrequency": "PT5M",
"logMirrorEnabled": true,
"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",
"isAutoOptimizationEnabled": true,
"autoOptimizationFrequency": "P7D",
"autoOptimizationStartDate": "2019-01-19T00:00:00Z"
}
Sample response
{
"rewardWaitTime": "PT10M",
"defaultReward": 0,
"rewardAggregation": "earliest",
"explorationPercentage": 0.2,
"modelExportFrequency": "PT5M",
"logMirrorEnabled": true,
"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",
"isAutoOptimizationEnabled": true,
"autoOptimizationFrequency": "P7D",
"autoOptimizationStartDate": "2019-01-19T00:00:00Z"
}
Definitions
| Name | Description |
|---|---|
|
Error |
Used to return an error to the client |
|
Internal |
An object containing more specific information than the parent object about the error. |
|
Learning |
Learning Modes for Personalizer |
|
Personalizer |
The error object. |
|
Personalizer |
Error Codes returned by Personalizer |
|
Service |
The configuration of the service. |
ErrorResponse
Used to return an error to the client
| Name | Type | Description |
|---|---|---|
| error |
The error object. |
InternalError
An object containing more specific information than the parent object about the error.
| Name | Type | Description |
|---|---|---|
| code |
string |
Detailed error code. |
| innererror |
An object containing more specific information than the parent object about the error. |
LearningMode
Learning Modes for Personalizer
| Value | Description |
|---|---|
| Online | |
| Apprentice | |
| LoggingOnly |
PersonalizerError
The error object.
| Name | Type | Description |
|---|---|---|
| code |
Error Codes returned by Personalizer |
|
| details |
An array of details about specific errors that led to this reported error. |
|
| innerError |
An object containing more specific information than the parent object about the error. |
|
| message |
string |
A message explaining the error reported by the service. |
| target |
string |
Error source element. |
PersonalizerErrorCode
Error Codes returned by Personalizer
| Value | Description |
|---|---|
| BadRequest |
Request could not be understood by the server. |
| InvalidServiceConfiguration |
Invalid service configuration. |
| InvalidLearningModeServiceConfiguration |
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. |
| InvalidPolicyConfiguration |
Invalid policy configuration. |
| InvalidPolicyContract |
Invalid policy contract. |
| InvalidEvaluationContract |
Invalid evaluation contract. |
| DuplicateCustomPolicyNames |
Custom policy names should be unique. |
| NoLogsExistInDateRange |
No logs exist in date range. |
| LogsSizeExceedAllowedLimit |
Total size of logs exceed allowed limit. |
| InvalidRewardRequest |
Invalid reward request. |
| InvalidEventIdToActivate |
Invalid activate event request. |
| InvalidRankRequest |
Invalid request. |
| InvalidExportLogsRequest |
Invalid request. |
| InvalidContainer |
SAS Uri must be the Uri to a container that has write permissions. |
| InvalidModelMetadata |
Invalid model metadata. |
| ApprenticeModeNeverTurnedOn |
Apprentice mode never turned on. |
| MissingAppId |
AppId is missing in the header. |
| InvalidRewardWaitTime |
Reward wait time should be between 5 seconds and 2 days |
| InvalidMultiSlotApiAccess |
Multi-slot feature is currently disabled. Please follow multi-slot Personalizer documentation to update your loop settings to enable multi-slot functionality. |
| ModelFileAccessDenied |
Key vault Key used for customer managed key cannot be accessed. |
| ProblemTypeIncompatibleWithAutoOptimization |
Auto-optimization is not compatible with multi-slot personalization. |
| ResourceNotFound |
Requested resource does not exist on the server. |
| FrontEndNotFound |
Front end not found. |
| EvaluationNotFound |
Offline Evaluation not found. |
| LearningSettingsNotFound |
Learning Settings not found in evaluation. |
| EvaluationModelNotFound |
Model not found in evaluation. |
| LogsPropertiesNotFound |
Log properties not found. |
| ModelRankingError |
Error while ranking actions using model. Please verify the learning settings are valid. |
| InternalServerError |
A generic error has occurred on the server. |
| RankNullResponse |
Rank call returned null response. |
| UpdateConfigurationFailed |
Failed to update configuration. |
| ModelResetFailed |
Model reset failed. |
| ModelPublishFailed |
Model publish failed. |
| ModelMetadataUpdateFailed |
Model metadata update failed. |
| OperationNotAllowed |
This operation is not allowed at this time. |
ServiceConfiguration
The configuration of the service.
| Name | Type | Description |
|---|---|---|
| autoOptimizationFrequency |
string (duration) |
Frequency of automatic optimization. Only relevant if IsAutoOptimizationEnabled is true. For example, PT5M (5 mins). For information about the time format, \r\nsee http://en.wikipedia.org/wiki/ISO_8601#Durations |
| autoOptimizationStartDate |
string (date-time) |
Date when the first automatic optimization evaluation must be performed. Only relevant if IsAutoOptimizationEnabled is true. |
| defaultReward |
number (float) minimum: -1maximum: 1 |
The reward given if a reward is not received within the specified wait time. |
| explorationPercentage |
number (float) minimum: 0maximum: 1 |
The percentage of rank responses that will use exploration. |
| isAutoOptimizationEnabled |
boolean |
Flag indicating whether Personalizer will automatically optimize Learning Settings by running Offline Evaluations periodically. |
| lastConfigurationEditDate |
string (date-time) |
Last time model training configuration was updated |
| learningMode |
Learning Modes for Personalizer |
|
| logMirrorEnabled |
boolean |
Flag indicates whether log mirroring is enabled. |
| logMirrorSasUri |
string |
Azure storage account container SAS URI for log mirroring. |
| logRetentionDays |
integer (int32) minimum: -1maximum: 2147483647 |
Number of days historical logs are to be maintained. -1 implies the logs will never be deleted. |
| modelExportFrequency |
string (duration) |
Personalizer will start using the most updated trained model for online ranks automatically every specified time period. For example, PT5M (5 mins). For information about the time format, see http://en.wikipedia.org/wiki/ISO_8601#Durations |
| rewardAggregation |
string maxLength: 256 |
The function used to process rewards, if multiple reward scores are received before rewardWaitTime is over. |
| rewardWaitTime |
string (duration) |
The time span waited until a request is marked with the default reward and should be between 5 seconds and 2 days. For example, PT5M (5 mins). For information about the time format, see http://en.wikipedia.org/wiki/ISO_8601#Durations |