Open rmoesbergen opened 9 months ago
Thank you for taking the time to open this feature request!
Good request 🍻
I observe that if you toggle this from the portal it sends:
{"displayName":"gpt-35-turbo-16k","sku":{"name":"Standard","capacity":240},"properties":{"model":{"format":"OpenAI","version":"0613","name":"gpt-35-turbo-16k"},"versionUpgradeOption":"NoAutoUpgrade","dynamicThrottlingEnabled":true,"raiPolicyName":"Microsoft.Nil"}}
and backward
{"displayName":"gpt-35-turbo-16k","sku":{"name":"Standard","capacity":240},"properties":{"model":{"format":"OpenAI","version":"0613","name":"gpt-35-turbo-16k"},"versionUpgradeOption":"NoAutoUpgrade","dynamicThrottlingEnabled":false,"raiPolicyName":"Microsoft.Nil"}}
Notice that the dynamicThrottlingEnabled
flips.
Interestingly, on the cognitive_account
there is a dynamic_throttling_enabled
.
I try out later if these are equal or not 👀 I suspect no as accounts/create#dynamicThrottlingEnabled
has its own dynamicThrottlingEnabled
vs deployments/create#dynamicThrottlingEnabled
If we are lucky, they get inherited 🤣
Interestingly, on the
cognitive_account
there is adynamic_throttling_enabled
.I try out later if these are equal or not 👀 I suspect no as
accounts/create#dynamicThrottlingEnabled
has its owndynamicThrottlingEnabled
vsdeployments/create#dynamicThrottlingEnabled
If we are lucky, they get inherited 🤣
That dynamic_throttling_enabled on the cognitive account resource level is different from the actual model deployments, like you mentioned.
I tried it and it gives:
DynamicThrottlingNotSupported: Thank you for your interest in Dynamic Throttling for Cognitive Services. This feature is currently not supported for the resource kind OpenAI and sku S0.
Thanks for opening this initial issue, would love to know if there is any planned update for this or I will investigate further on implementing this via azapi terraform provider.
Any news on this? From https://learn.microsoft.com/en-us/azure/ai-services/openai/how-to/dynamic-quota it is indeed dynamicThrottlingEnabled
az rest --method patch --url "https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CognitiveServices/accounts/{accountName}/deployments/{deploymentName}?2023-10-01-preview" --body '{"properties": {"dynamicThrottlingEnabled": true} }'
@JorisAndrade you can accomplish this via azapi provider in the meantime. Hope this helps!
resource "azapi_resource" "model_deployment" {
type = Microsoft.CognitiveServices/accounts/deployments@2023-10-01-preview
schema_validation_enabled = false
parent_id = cognitive_account.account.id
name = "gpt-4"
body = jsonencode({
sku = {
name = "gpt-4",
capacity = 1
},
properties = {
model = {
format = "OpenAI"
name = "gpt-4"
version = "1106-preview"
},
dynamicThrottlingEnabled = true
versionUpgradeOption = "OnceNewDefaultVersionAvailable" # Options: NoAutoUpgrade, OnceCurrentVersionExpired, OnceNewDefaultVersionAvailable
}
})
depends_on = [cognitive_account.account]
}
@illgitthat thanks for sharing. will try this out. @rcskosir any ETA on the enhancement to be available as part of the provider?
Thanks for reaching out, unfortunately I do not have an ETA on this enhancement. Any future work via the team or the community should end up linked here via a PR.
I opened a PR on pandora to add https://github.com/Azure/azure-rest-api-specs/tree/main/specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/preview/2023-10-01-preview in https://github.com/hashicorp/go-azure-sdk
After done, we will be able to import it in provider to add this feature
Is there an existing issue for this?
Community Note
Description
A azure cognitive services deployment now supports dynamic scaling of quota when capacity is available in the account. Please add this setting to the azurerm_cognitive_deployment terraform resource so it can be auto-provisioned. (The setting is called "Dynamic Quota" in the UI:
New or Affected Resource(s)/Data Source(s)
azurerm_cognitive_deployment
Potential Terraform Configuration
References
https://microsoftlearning.github.io/mslearn-openai/Instructions/Labs/01-get-started-azure-openai.html#deploy-a-model