Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error in Azure Portel Index: This index contains a vectorizer created by previous API versions that doesn't include the 'modelName' field. We recommend you to migrate by adding 'experimental' value automatically to the field to restore full portal functionality. #241

Open
sunnysharma03 opened this issue Jun 5, 2024 · 4 comments

Comments

@sunnysharma03
Copy link

sunnysharma03 commented Jun 5, 2024

I have created index using the below sample.ipynb file:
https://github.com/Azure/azure-search-vector-samples/blob/main/demo-python/code/integrated-vectorization/azure-search-integrated-vectorization-sample.ipynb

And used the private preview azure search whl file: azure_search_documents-11.4.0b12 which was available on github, and recently removed from it.

So as per the below doc, we have a parameter model_name to add in azure_open_ai_parameters constructor:
https://learn.microsoft.com/en-us/python/api/azure-search-documents/azure.search.documents.indexes.models.azureopenaiparameters?view=azure-python-preview

I tried to add it in my script but I got below error:
model_name is not a known attribute of class <class 'azure.search.documents.indexes._generated.models._models_py3.AzureOpenAIParameters'> and will be ignored
image

So I tried to upgrade the Azure Search Document sdk to 11.6.0.4b but still the issue is coming up.
Do we need to use some other whl file like we did earlier with 11.4.0b12 ?

Code snippet of my vectorizer:

vectorizers=[  
        AzureOpenAIVectorizer(  
            name="myOpenAI",  
            kind="azureOpenAI",  
            azure_open_ai_parameters=AzureOpenAIParameters(  
                resource_uri=os.getenv("AZURE_OPENAI_ENDPOINT"),  
                deployment_id=model, 
                model_name='text-embedding-3-large',
                api_key=os.getenv("AZURE_OPENAI_API_KEY"),  
            ),  
        ),  
    ]

I am using 2024-05-01-preview for openai version and text-embedding-3-large model.
Python version 3.8

@dhaksr
Copy link

dhaksr commented Jun 5, 2024

I am on Azure search 11.6.03b and removed the model name.. But I agree. they should fix this and documentation properly
vectorizers=[ AzureOpenAIVectorizer( name="myOpenAI", kind="azureOpenAI", azure_open_ai_parameters=AzureOpenAIParameters( resource_uri=azure_openai_endpoint, deployment_id=azure_openai_embedding_deployment, api_key=azure_openai_key, model_name = az_openai_embedding_model, ),

@mattgotteiner
Copy link
Member

Thanks for the feedback. We only mention this in the Upgrade REST API documentation
https://learn.microsoft.com/en-us/azure/search/search-api-migration#upgrade-to-2024-05-01-preview

If the model_name parameter is not available in AzureOpenAIVectorizer class then agreed it should not be used. It would only be available on the latest version of the package.

We'll eventually update our notebooks with examples of this usage. Sorry for the inconvenience

@Ruben-Wien
Copy link

Ruben-Wien commented Jul 26, 2024

Hello,

I'm currently encountering an issue with the Azure Search Documents SDK version 11.6.0b4. When using the AzureOpenAIParameters class, the attribute model_name is flagged as not known, even though it's documented as a valid parameter. This seems to be inconsistent with the official documentation found here: Azure OpenAIParameters Documentation.

Is this a known issue or possibly a bug in the SDK?

Thanks!

@namtran6701
Copy link

Almost October and it still has not been fixed yet

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants