refactor: 重构数据管道模块
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
from datasets import load_dataset
|
||||
from modules.utils import process_dataset
|
||||
from modules.datapipeline import DataPipeline
|
||||
|
||||
def process_func(input_dict: dict):
|
||||
return {
|
||||
@@ -11,7 +11,9 @@ def process_func(input_dict: dict):
|
||||
|
||||
if __name__ == "__main__":
|
||||
dataset = load_dataset("wenbopan/Chinese-dpo-pairs")
|
||||
process_dataset(
|
||||
|
||||
pipeline = DataPipeline()
|
||||
pipeline.process_dataset(
|
||||
dataset_dict=dataset,
|
||||
output_subdir="Chinese-dpo-pairs",
|
||||
process_func=process_func
|
||||
|
||||
Reference in New Issue
Block a user