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

Allow returning empty results when nothing is retrieved from DatabricksRM #1995

Merged
merged 2 commits into from
Dec 27, 2024

Conversation

chenmoneygithub
Copy link
Collaborator

@chenmoneygithub chenmoneygithub commented Dec 27, 2024

Right now in the following code, it's possible that key data_array doesn't exist, which leads to a opaque error to users. This happens when Databricks vector search index is not ready. We should not fail when this happens, and just return empty results.

        for _, data_row in enumerate(results["result"]["data_array"]):
            item = {}
            for col_name, val in zip(col_names, data_row):
                item[col_name] = val
            items += [item]

@chenmoneygithub chenmoneygithub changed the title Raise error when databricks index is not ready Allow returning empty results when nothing is retrieved from DatabricksRM Dec 27, 2024
@chenmoneygithub chenmoneygithub merged commit 06f4551 into stanfordnlp:main Dec 27, 2024
4 checks passed
@chenmoneygithub chenmoneygithub deleted the empty-dbrx-rm branch December 27, 2024 22:02
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

Successfully merging this pull request may close these issues.

1 participant