Multiprocessing during loading script
#1
by
TimeRobber
- opened
Example of using multiprocessing during loading script
https://huggingface.co/datasets/HuggingFaceM4/pmd/blob/main/pmd.py#L128-L145 Here is an example. One of the key things to do is actually to use a ArrowBaseBuilder (essentially you can yield pa.table that encode batches, instead of individual samples). You still have a single writer, but it increases the throughput.