May-apple commited on
Commit
f91e44b
·
verified ·
1 Parent(s): 58eeab5

docs: Path A — show how to filter or selectively load PR vs IF via class column / TASK_INVENTORY.json

Browse files
Files changed (1) hide show
  1. README.md +29 -0
README.md CHANGED
@@ -307,6 +307,35 @@ ds = load_dataset("parquet",
307
  split="train")
308
  ```
309
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
310
  ### Path B — materialize parquet → on-disk directory layout
311
 
312
  If your existing pipeline reads `first_frame.png` / `ground_truth.mp4` /
 
307
  split="train")
308
  ```
309
 
310
+ #### Filtering PR vs IF in Path A
311
+
312
+ Every row carries a `class` column with value `"Pure_Reasoning"` or
313
+ `"Instruction_Following"`. Two ways to use it:
314
+
315
+ ```python
316
+ # (1) Load all 107 shards, filter in code (requires downloading all ~370 GB)
317
+ from datasets import load_dataset
318
+ ds = load_dataset("May-apple/VBVR-Reorganized", split="train")
319
+ pr_only = ds.filter(lambda x: x["class"] == "Pure_Reasoning")
320
+ if_only = ds.filter(lambda x: x["class"] == "Instruction_Following")
321
+
322
+ # (2) Load only the PR shards (downloads only ~195 GB) — use TASK_INVENTORY.json:
323
+ import json
324
+ from datasets import load_dataset
325
+ inv = json.load(open("TASK_INVENTORY.json")) # ship from this repo
326
+ pr_shards = [f"parquet/train__{e['shard']}.parquet" for e in inv["Pure_Reasoning"]]
327
+ ds_pr = load_dataset("parquet", data_files=pr_shards, split="train")
328
+
329
+ # Same for IF:
330
+ if_shards = [f"parquet/train__{e['shard']}.parquet" for e in inv["Instruction_Following"]]
331
+ ds_if = load_dataset("parquet", data_files=if_shards, split="train")
332
+ ```
333
+
334
+ `TASK_INVENTORY.json` is shipped at the repo root specifically so you
335
+ can do this kind of selective load without enumerating shards by hand.
336
+ For the canonical authoritative source on which task is PR vs IF, see
337
+ [TASK_INVENTORY.md](TASK_INVENTORY.md).
338
+
339
  ### Path B — materialize parquet → on-disk directory layout
340
 
341
  If your existing pipeline reads `first_frame.png` / `ground_truth.mp4` /