promptflow icon indicating copy to clipboard operation
promptflow copied to clipboard

[BUG] [VSCode Extension] VectorDB Index Lookup doesn't take the config.json variables into consideration

Open pgr-lopes opened this issue 1 year ago • 4 comments

Describe the bug Vector DB index configuration is not taking into account the config.json values, you need to setup the subscription ID, AML resource name and resource group through az cli.

How To Reproduce the bug Steps to reproduce the behavior, how frequent can you experience the bug:

  1. Create an empty flow or a flow from a template
  2. Configure the config.json file with the subscription id, workspace name and resource group name
  3. Do pip install promptflow-vectordb
  4. Add the Index Lookup activity to the canvas
  5. Try to change the values of the mlindex_content field and you will get:

image

Screenshots

  1. On the VSCode primary side bar > the Prompt flow pane > quick access section. Find the "install dependencies" action. Please it and attach the screenshots there.
image
  1. Please provide other snapshots about the key steps to repro the issue.

Environment Information

  • Promptflow Package Version using pf -v: 1.9.0
  • Operating System: Windows 11
  • Python Version using python --version: 3.11.0
  • VS Code version: 1.88.1
  • Prompt Flow extension version: 1.16.1
  • Error: "Error when calling function promptflow_vectordb.tool.common_index_lookup_utils.reverse_mapping: tool_ui_callback. .wrapped() missing 3 required positional arguments: 'subscription_id', 'resource_group_name', and 'workspace_name". Please contact the tool author/support team for troubleshooting assistance."

Additional context N/A

pgr-lopes avatar Apr 18 '24 08:04 pgr-lopes

Adding the variables through cli manually works:

az login
az account set --subscription <subscription_id>
az configure --defaults group=<resource_group_name> workspace=<workspace_name>

However, after I do this, I get another error with the azure default credential which is not specified:

image

pgr-lopes avatar Apr 18 '24 08:04 pgr-lopes

Hi @dans-msft , @Adarsh-Ramanathan , could you help to take a look? Thanks!

D-W- avatar Apr 19 '24 03:04 D-W-

@pgr-lopes, for this error: However, after I do this, I get another error with the azure default credential which is not specified:, can you share the error message and a stack trace?

@D-W-, the issue in the main thread isn't an Index Lookup issue; it is that subscriptions/resourcegroups/workspaces configured in config.json are not taken into account by the runtime when invoking a dynamic list callback. Assigning to @DaweiCai to take a look.

Adarsh-Ramanathan avatar Apr 22 '24 18:04 Adarsh-Ramanathan

Sorry Adarsh, I missed this. The credential ended up being a problem with my system and the way the azcli communicates with the AD, it's not related to promptflow.

pgr-lopes avatar May 18 '24 00:05 pgr-lopes

I will dig this back to say that the VectorDB activity is not showing up in the VsCode extension tool and I still can't make it work with my existing flow, I am getting this error message when trying to open the Index Lookup (equivalent to vectorDB I assume) that I used in my Azure Machine Learning prompt flow which I exported to open locally:

Detailed error: No module named 'azureml.rag''. Please contact the tool author/support team for troubleshooting assistance.

I tried installing the azureml-rag package to no avail. Just wondering if the vectorDB lookup activity is even supported at all locally as of now.

pgr-lopes avatar May 20 '24 17:05 pgr-lopes