cancel
Showing results for 
Search instead for 
Did you mean: 
Machine Learning
Dive into the world of machine learning on the Databricks platform. Explore discussions on algorithms, model training, deployment, and more. Connect with ML enthusiasts and experts.
cancel
Showing results for 
Search instead for 
Did you mean: 

databricks-vectorsearch 0.53 unable to use similarity_search()

snaveedgm
New Contributor

I have an issue with databricks-vectorsearch package. Version 0.51 suddenly stopped working this week because:

  • It now expected me to provide azure_tenant_id in addition to service principal's client ID and secret.
  • After supplying tenant ID, it showed some bug like "Unsupported Types" time.time() + oauth_token_data["expires_in"].
  • I then upgraded to 0.53 and this bug was resolved and some functions like get_index() started working. However, now the similarity_search() function gives:
    • b'{"error_code":"PERMISSION_DENIED","message":"Failed to call Model Serving endpoint: databricks-bge-large-en."}', status_code 403
  • I have tried querying the databricks-bge-large-en  endpoint separately via REST for my service account and it works fine, so the issue seems specific to this package.

Please advise.

 

Code Snippet:

from databricks.vector_search.client import VectorSearchClient

 

vsc = VectorSearchClient(

    workspace_url=workspace_url,

    service_principal_client_id=sp_client_id,

    service_principal_client_secret=sp_client_secret,

    azure_tenant_id=tenant_id

)

index = vsc.get_index(endpoint_name=endpoint_name, index_name=index_name)

index.similarity_search(num_results=3, columns=["chunked_text"], query_text="example_query")

0 REPLIES 0

Connect with Databricks Users in Your Area

Join a Regional User Group to connect with local Databricks users. Events will be happening in your city, and you won’t want to miss the chance to attend and share knowledge.

If there isn’t a group near you, start one and help create a community that brings people together.

Request a New Group