Azure / Azure/azure-search-vector-samples

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.

Open
#241 4 comments 3 reactions 0 assignees View on GitHub
Dominant language
Jupyter Notebook
Stars
910
Forks
377
PR merge metrics
No merged PRs in 30d

Description

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 and will be ignored**
![image](https://github.com/Azure/azure-search-vector-samples/assets/22542019/f9c68237-f7e7-49e8-83da-a2bc31dd7cd3)

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

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with the integrated-vectorization sample.ipynb and the provided AzureOpenAIVectorizer snippet, then compare AzureOpenAIParameters behavior in azure-search-documents 11.6.0.4b with the linked preview documentation. Reproduce the model_name warning and verify the resulting index no longer reports the legacy vectorizer migration warning in the Azure portal.

Written by the indexing model from the issue text.

Assessment

Tech stack
azure, python
Domain
cloud, data
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.