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

The reward given if a reward is not received within the specified wait time.

explorationPercentage True

number

The percentage of rank responses that will use exploration.

logRetentionDays True

integer

Number of days historical logs are to be maintained. -1 implies the logs will never be deleted.

modelExportFrequency True

string

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

The function used to process rewards, if multiple reward scores are received before rewardWaitTime is over.

rewardWaitTime True

string

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

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 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

Last time model training configuration was updated

learningMode

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

ServiceConfiguration

Success

Other Status Codes

ErrorResponse

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
ErrorResponse

Used to return an error to the client

InternalError

An object containing more specific information than the parent object about the error.

LearningMode

Learning Modes for Personalizer

PersonalizerError

The error object.

PersonalizerErrorCode

Error Codes returned by Personalizer

ServiceConfiguration

The configuration of the service.

ErrorResponse

Used to return an error to the client

Name Type Description
error

PersonalizerError

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

InternalError

An object containing more specific information than the parent object about the error.

LearningMode

Learning Modes for Personalizer

Name Type Description
Apprentice

string

LoggingOnly

string

Online

string

PersonalizerError

The error object.

Name Type Description
code

PersonalizerErrorCode

Error Codes returned by Personalizer

details

PersonalizerError[]

An array of details about specific errors that led to this reported error.

innerError

InternalError

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

Name Type Description
ApprenticeModeNeverTurnedOn

string

Apprentice mode never turned on.

BadRequest

string

Request could not be understood by the server.

DuplicateCustomPolicyNames

string

Custom policy names should be unique.

EvaluationModelNotFound

string

Model not found in evaluation.

EvaluationNotFound

string

Offline Evaluation not found.

FrontEndNotFound

string

Front end not found.

InternalServerError

string

A generic error has occurred on the server.

InvalidContainer

string

SAS Uri must be the Uri to a container that has write permissions.

InvalidEvaluationContract

string

Invalid evaluation contract.

InvalidEventIdToActivate

string

Invalid activate event request.

InvalidExportLogsRequest

string

Invalid request.

InvalidLearningModeServiceConfiguration

string

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.

InvalidModelMetadata

string

Invalid model metadata.

InvalidMultiSlotApiAccess

string

Multi-slot feature is currently disabled. Please follow multi-slot Personalizer documentation to update your loop settings to enable multi-slot functionality.

InvalidPolicyConfiguration

string

Invalid policy configuration.

InvalidPolicyContract

string

Invalid policy contract.

InvalidRankRequest

string

Invalid request.

InvalidRewardRequest

string

Invalid reward request.

InvalidRewardWaitTime

string

Reward wait time should be between 5 seconds and 2 days

InvalidServiceConfiguration

string

Invalid service configuration.

LearningSettingsNotFound

string

Learning Settings not found in evaluation.

LogsPropertiesNotFound

string

Log properties not found.

LogsSizeExceedAllowedLimit

string

Total size of logs exceed allowed limit.

MissingAppId

string

AppId is missing in the header.

ModelFileAccessDenied

string

Key vault Key used for customer managed key cannot be accessed.

ModelMetadataUpdateFailed

string

Model metadata update failed.

ModelPublishFailed

string

Model publish failed.

ModelRankingError

string

Error while ranking actions using model. Please verify the learning settings are valid.

ModelResetFailed

string

Model reset failed.

NoLogsExistInDateRange

string

No logs exist in date range.

OperationNotAllowed

string

This operation is not allowed at this time.

ProblemTypeIncompatibleWithAutoOptimization

string

Auto-optimization is not compatible with multi-slot personalization.

RankNullResponse

string

Rank call returned null response.

ResourceNotFound

string

Requested resource does not exist on the server.

UpdateConfigurationFailed

string

Failed to update configuration.

ServiceConfiguration

The configuration of the service.

Name Type Description
autoOptimizationFrequency

string

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 when the first automatic optimization evaluation must be performed. Only relevant if IsAutoOptimizationEnabled is true.

defaultReward

number

The reward given if a reward is not received within the specified wait time.

explorationPercentage

number

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

Last time model training configuration was updated

learningMode

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

Number of days historical logs are to be maintained. -1 implies the logs will never be deleted.

modelExportFrequency

string

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

The function used to process rewards, if multiple reward scores are received before rewardWaitTime is over.

rewardWaitTime

string

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