refactor: 重构数据管道模块

This commit is contained in:
2026-03-20 21:36:37 +08:00
parent 7045de9c32
commit 3fb2326115
20 changed files with 739 additions and 345 deletions
@@ -1,6 +1,6 @@
# Mxode/Firefly-1.1M-Rephrased
from datasets import load_dataset
from modules.utils import process_dataset
from modules.datapipeline import DataPipeline
def process_func(input_dict: dict):
instruction = input_dict["instruction"]
@@ -11,7 +11,8 @@ def process_func(input_dict: dict):
if __name__ == "__main__":
dataset = load_dataset("Mxode/Firefly-1.1M-Rephrased")
process_dataset(
pipeline = DataPipeline()
pipeline.process_dataset(
dataset_dict=dataset,
output_subdir="Firefly-1.1M-Rephrased",
process_func=process_func