syCen commited on
Commit
c2ec059
·
verified ·
1 Parent(s): 251d859

Upload process_idm_data.py with huggingface_hub

Browse files
Files changed (1) hide show
  1. process_idm_data.py +4 -4
process_idm_data.py CHANGED
@@ -653,14 +653,14 @@ def main(dataset_root, calib_root, output_root):
653
 
654
  task_dirs = find_task_dirs(dataset_root)
655
  print(f"Found {len(task_dirs)} task folders")
 
 
 
656
 
657
  import random
658
  random.seed(42)
659
  task_dirs = random.sample(task_dirs, min(60, len(task_dirs)))
660
 
661
- n_workers = min(cpu_count(), len(task_dirs))
662
- args = [(t, dataset_root, calib_root) for t in task_dirs]
663
-
664
  data_jsonl_path = os.path.join(output_root, "data.jsonl")
665
  total = 0
666
 
@@ -697,4 +697,4 @@ if __name__ == "__main__":
697
  print(f"calib_root does not exist: {calib_root}")
698
  sys.exit(1)
699
 
700
- main(dataset_root, calib_root, output_root)
 
653
 
654
  task_dirs = find_task_dirs(dataset_root)
655
  print(f"Found {len(task_dirs)} task folders")
656
+
657
+ n_workers = min(cpu_count(), len(task_dirs))
658
+ args = [(t, dataset_root, calib_root) for t in task_dirs]
659
 
660
  import random
661
  random.seed(42)
662
  task_dirs = random.sample(task_dirs, min(60, len(task_dirs)))
663
 
 
 
 
664
  data_jsonl_path = os.path.join(output_root, "data.jsonl")
665
  total = 0
666
 
 
697
  print(f"calib_root does not exist: {calib_root}")
698
  sys.exit(1)
699
 
700
+ main(dataset_root, calib_root, output_root)