jamesding0302 commited on
Commit
6480c72
·
verified ·
1 Parent(s): a006862
Files changed (1) hide show
  1. README.md +8 -8
README.md CHANGED
@@ -85,12 +85,12 @@ print(labels[0])
85
 
86
  ## Merge with processed dataset
87
  ```python
88
- from datasets import load_dataset
89
-
90
- lab = load_dataset("json", data_files="item_case_records.jsonl", split="train", cache_dir="./hf_cache")
91
-
92
- ds = pipeline.split_datasets["train"]
93
- ds = ds.add_column("master", lab["master"]) \
94
- .add_column("subcategories", lab["subcategories"]) \
95
- .add_column("all_labels", lab["all_labels"])
96
  ```
 
85
 
86
  ## Merge with processed dataset
87
  ```python
88
+ # 1) Load your processed dataset split (must be aligned with labels by row order)
89
+ ds = pipeline.split_datasets["test"]
90
+
91
+ # 2) Append label columns to the original dataset
92
+ ds = (ds
93
+ .add_column("master", labels["master"])
94
+ .add_column("subcategories", labels["subcategories"])
95
+ .add_column("all_labels", labels["all_labels"]))
96
  ```