Datasets:

Modalities:
Text
Formats:
parquet
ArXiv:
Libraries:
Datasets
pandas
License:
Saibo-creator commited on
Commit
aba52f7
·
verified ·
1 Parent(s): d863dde

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +25 -1
README.md CHANGED
@@ -300,7 +300,31 @@ task_categories:
300
 
301
  JSONSchemaBench is a benchmark of **real-world JSON schemas** designed to evaluate **structured output generation** for Large Language Models (LLMs). It contains approximately **10,000 JSON schemas**, capturing diverse constraints and complexities.
302
 
303
- ## 📢 Important Update (March 10th, 2025)
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
304
 
305
  We have restructured the dataset to include train/val/test splits. If you downloaded the dataset before this date, you might encounter errors like `KeyError: 'Github_easy'`.
306
 
 
300
 
301
  JSONSchemaBench is a benchmark of **real-world JSON schemas** designed to evaluate **structured output generation** for Large Language Models (LLMs). It contains approximately **10,000 JSON schemas**, capturing diverse constraints and complexities.
302
 
303
+
304
+ ```python
305
+ import datasets
306
+ from datasets import load_dataset
307
+
308
+ def main():
309
+ # Inspect the available subsets of the dataset
310
+ all_subsets = datasets.get_dataset_config_names("epfl-dlab/JSONSchemaBench")
311
+ print("Available subsets:", all_subsets)
312
+ # Example output: ['Github_easy', 'Github_hard', 'Github_medium', 'Github_trivial', 'Github_ultra', 'Glaiveai2K', 'JsonSchemaStore', 'Kubernetes', 'Snowplow', 'WashingtonPost', 'default']
313
+
314
+ # Access a specific subset of the dataset
315
+ subset_name = "Github_easy"
316
+ github_easy = load_dataset("epfl-dlab/JSONSchemaBench", subset_name)
317
+ print(f"Loaded subset '{subset_name}':", github_easy)
318
+
319
+ # Load the entire dataset as a whole
320
+ entire_dataset = load_dataset("epfl-dlab/JSONSchemaBench", "default")
321
+ print("Loaded entire dataset:", entire_dataset)
322
+
323
+ if __name__ == "__main__":
324
+ main()
325
+ ```
326
+
327
+ ## ⚠️ Important Update (March 10th, 2025)
328
 
329
  We have restructured the dataset to include train/val/test splits. If you downloaded the dataset before this date, you might encounter errors like `KeyError: 'Github_easy'`.
330