question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Add json validation when ingesting jsonl files for training

See original GitHub issue

Can be some simple bash like:

ls *.jsonl > file_names.txt
while read f; do
  if cat $f | jq -e . >/dev/null 2>&1; then
    echo "Parsed JSON successfully: $f"
  else
    echo "Failed to parse JSON: $f"
  fi
done <file_names.txt

in the data dirs.

Goal is just to check that json files aren’t truncated somehow. Can also add as a step when building index file for JsonlDatasets.

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:5 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
punitkouracommented, Jul 18, 2022

Fixed by @KUNAL1612 , closing

1reaction
punitkouracommented, Jul 7, 2022

@suchenzang So to confirm, the json validation here is just making sure we can read a jsonl file and has nothing to do with the actual content of the files?

I think we also want to ensure that each json line is properly formatted.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to Love jsonl — using JSON Lines in your Workflow
We'll loop over some URLs, making requests and then saving the response data to file. import requests import datetimefor url in [ 'https://chordanalytics.ca/',...
Read more >
Loading JSON data from Cloud Storage | BigQuery
Shows how to load JSON files from Cloud Storage into a new table, or append to, or overwrite a table. Shows how to...
Read more >
JSON Files - Spark 3.3.1 Documentation
Property Name Default Scope primitivesAsString false read prefersDecimal false read allowComments false read
Read more >
JSON validation is getting failed after writing Pyspark ...
Hi. We have to convert transformed dataframe to json format. So we used write and json format on top of final dataframe to...
Read more >
JSONL format for computer vision tasks - Azure - Microsoft Learn
We'll also provide a sample of final training or validation JSON Lines file. Image classification (binary/multi-class). Input data format/schema ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found