Skip to content

Commit

Permalink
fix databricksrm (#1967)
Browse files Browse the repository at this point in the history
  • Loading branch information
chenmoneygithub authored Dec 20, 2024
1 parent 6085098 commit dbc96d4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions dspy/retrieve/databricks_rm.py
Original file line number Diff line number Diff line change
Expand Up @@ -288,7 +288,7 @@ def forward(
page_content=doc[self.text_column_name],
metadata={
"doc_id": self._extract_doc_ids(doc),
"doc_uri": doc[self.docs_uri_column_name],
"doc_uri": doc[self.docs_uri_column_name] if self.docs_uri_column_name else None,
}
| self._get_extra_columns(doc),
type="Document",
Expand All @@ -300,7 +300,7 @@ def forward(
return Prediction(
docs=[doc[self.text_column_name] for doc in sorted_docs],
doc_ids=[self._extract_doc_ids(doc) for doc in sorted_docs],
doc_uris=[doc[self.docs_uri_column_name] for doc in sorted_docs],
doc_uris=[doc[self.docs_uri_column_name] for doc in sorted_docs] if self.docs_uri_column_name else None,
extra_columns=[self._get_extra_columns(item) for item in sorted_docs],
)

Expand Down

0 comments on commit dbc96d4

Please sign in to comment.