Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions graphrag/prompt_tune/loader/input.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,8 @@ async def load_docs_in_chunks(

# Depending on the select method, build the dataset
if limit <= 0 or limit > len(chunks_df):
logger.warning(f"Limit out of range, using default number of chunks: {LIMIT}") # noqa: G004
limit = LIMIT
limit = min(LIMIT, len(chunks_df))
logger.warning(f"Limit out of range, using default number of chunks: {limit}") # noqa: G004

if select_method == DocSelectionType.TOP:
chunks_df = chunks_df[:limit]
Expand Down
Loading