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

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

Closed
pgr-lopes opened this issue Apr 18, 2024 · 5 comments · Fixed by #3406
Assignees
Labels
bug Something isn't working

Comments

@pgr-lopes
Copy link

pgr-lopes commented Apr 18, 2024

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 pgr-lopes added the bug Something isn't working label Apr 18, 2024
@pgr-lopes
Copy link
Author

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

@D-W-
Copy link
Contributor

D-W- commented Apr 19, 2024

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

@Adarsh-Ramanathan
Copy link

@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.

@pgr-lopes
Copy link
Author

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
Copy link
Author

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.

linningmii added a commit that referenced this issue Jun 14, 2024
…r folder repo to PF SDK (#3406)

# Description

Pass subscription/resource_group/workspace settings in the config file
to the _retrieve_tool_func_result function call to fix
#2876. There's another PR
to read related files in the vscode extension repo.


![image](https://github.com/microsoft/promptflow/assets/14858674/724d950d-eb24-418b-9b0c-605979c5eb36)


# All Promptflow Contribution checklist:
- [x] **The pull request does not introduce [breaking changes].**
- [x] **CHANGELOG is updated for new features, bug fixes or other
significant changes.**
- [x] **I have read the [contribution guidelines](../CONTRIBUTING.md).**
- [x] **Create an issue and link to the pull request to get dedicated
review from promptflow team. Learn more: [suggested
workflow](../CONTRIBUTING.md#suggested-workflow).**

## General Guidelines and Best Practices
- [x] Title of the pull request is clear and informative.
- [x] There are a small number of commits, each of which have an
informative message. This means that previously merged commits do not
appear in the history of the PR. For more information on cleaning up the
commits in your PR, [see this
page](https://github.com/Azure/azure-powershell/blob/master/documentation/development-docs/cleaning-up-commits.md).

### Testing Guidelines
- [ ] Pull request includes test coverage for the included changes.

---------

Co-authored-by: Zhongming Lin <zholin@microsoft.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment