Skip to content

Commit

Permalink
fix: yield from super loader
Browse files Browse the repository at this point in the history
  • Loading branch information
edwardzjl committed Nov 6, 2024
1 parent db25c26 commit 5b81104
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/tablegpt/retriever/loader.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,8 @@ def lazy_load(self) -> Iterator[Document]:
async def alazy_load(self) -> AsyncIterator[Document]:
"""A lazy loader for Documents."""
# TODO: pandas does not support async read_csv yet. We might need to async read the file first.
return await super().alazy_load()
async for doc in super().alazy_load():
yield doc

def column2docs(self, column: Series) -> Iterator[Document]:
# If a string column contains NaN, it will be presented as object dtype.
Expand Down

0 comments on commit 5b81104

Please sign in to comment.