Closed randompixel closed 1 year ago
@randompixel Thanks for opening this pr, I've tried the following config and I reproduced your issue:
provider "azurerm" {
features {}
}
resource "azurerm_resource_group" "example" {
name = "example-resources"
location = "uksouth"
}
resource "azurerm_cognitive_account" "example" {
name = "example-ca"
location = azurerm_resource_group.example.location
resource_group_name = azurerm_resource_group.example.name
kind = "OpenAI"
sku_name = "S0"
}
resource "azurerm_cognitive_deployment" "example" {
name = "example-cd"
cognitive_account_id = azurerm_cognitive_account.example.id
model {
format = "OpenAI"
name = "text-davinci-003"
version = "1"
}
scale {
type = "Standard"
}
}
I've met a similar error:
Deployment Name: "gpt-4-32k"): performing CreateOrUpdate: unexpected status 400 with error: InvalidResourceProperties: The specified scale type 'Standard' of account deployment is not supported by the model 'gpt-4-32k'.
It turns out that scale
block is not required any more in cognitive deployment API version 2023-05-01
so we can deploy gpt-4-32k
deployment via the portal, but for now the provider is using 2022-10-01
version, so we cannot deploy gpt-4-32k
by using Terraform AzureRM Provider now.
I'll submit a pr to upgrade the API version.
Hi @lonegunmanb , First of thanks for your PR :) I have tried the new version 3.64.0
and noticed few points
When i used newer version 0613 on gpt-35-turbo
it looks like below (perfect) but when i checked in the portal the version is pointing as old (0301). I believe somehow while creating it took the default version and not the newer version
+ model {
+ format = "OpenAI"
+ name = "gpt-35-turbo"
+ version = "0613"
}
+ scale {
+ capacity = 120
+ type = "Standard"
}
I manually updated the version on the portal, and ran the terraform again now it shows like below
~ model {
name = "gpt-35-turbo"
~ version = "0301" -> "0613"
# (1 unchanged attribute hidden)
}
but I got the error like Error: doesn't support update (I can able to update the version from the portal successfully)
Did this case work for you during the development ?
@lonegunmanb I can concur there's something wrong still, and can't rerun a deployment or I get the same problem as @jayendranarumugam where it resets it back to 0301 and then won't allow update.
Thanks @jayendranarumugam and @kirk-marple for letting me know the issue, I'll try to reproduce it on my side.
@lonegunmanb I have created https://github.com/hashicorp/terraform-provider-azurerm/issues/22501 if you like to work on it. Thanks !
Thanks @jayendranarumugam, I'll take a look!
Has anyone seen this error:
Message: The specified scale type 'Standard' of account deployment is not supported by the model 'gpt-35-turbo'.
from these configs:
openai.api_version = "2023-05-15"
model_name = "gpt-35-turbo"
deployment_name = "gpt-35-turbo"
model_version = "0613"
For ref:
deployment = client.deployments.begin_create_or_update( resource_group_name=cog_rg, account_name=openai_instance_name, deployment_name=deployment_name, content_type = 'application/json', deployment={ "properties": { "model": { "format": "OpenAI", "name": model, "version": model_version }, "scaleSettings": { "scaleType": "Standard" } }, "sku": { "capacity": 1 } } )
And when I remove the scaleSettings section above I get:
Code: InvalidResourceProperties
Message: The scale settings of account deployment is invalid.
I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.
Is there an existing issue for this?
Community Note
Description
I was having issues with
azurerm_cognitive_deployment
which was giving me this error.This was causing me confusion as "scale type" can only be set to
Standard
in Terraform so I wasn't sure what to do.What this actually turned out to be was I was trying to deploy
text-davinci-003
touksouth
which isn't supported (as per https://learn.microsoft.com/en-us/azure/cognitive-services/openai/concepts/models#gpt-3-models)Is there anything that could be added to the documentation here to warn users that not all models can be deployed to all regions?
New or Affected Resource(s)/Data Source(s)
azurerm_cognitive_deployment
Potential Terraform Configuration
No response
References
No response