Skip to content

Fix JSONL loader handling of blank/invalid lines#2434

Open
natoverse wants to merge 3 commits into
mainfrom
fix/2424-jsonl-loader-blank-lines
Open

Fix JSONL loader handling of blank/invalid lines#2434
natoverse wants to merge 3 commits into
mainfrom
fix/2424-jsonl-loader-blank-lines

Conversation

@natoverse

Copy link
Copy Markdown
Collaborator

Summary

  • Skip blank/whitespace-only lines in JSONL input loader
  • Skip malformed JSON rows safely
  • Skip non-object JSON rows
  • Add regression test and fixture coverage
  • Add semversioner patch entry

Fixes #2424

@natoverse natoverse requested a review from a team as a code owner July 10, 2026 22:20
@natoverse

Copy link
Copy Markdown
Collaborator Author

This replaces #2423 to include more handling of edge cases

@@ -40,3 +40,20 @@ async def test_jsonl_loader_one_file_with_title():
documents = await reader.read_files()
assert len(documents) == 3

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

for this test, is it better to have this fixed value "3" as a default value on top of the test? to understand better why and also to change it in case you want to test something else.

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.

JSONL reader skips entire file when input contains blank lines

2 participants