Skip to content

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