bugfix: 创建清洗任务时修改数据集状态;无法删除已在模板/运行任务的算子

* bugfix: 创建清洗任务时修改数据集状态;无法删除已在模板/运行任务的算子
This commit is contained in:
hhhhsc701
2025-11-27 17:34:53 +08:00
committed by GitHub
parent 91390cace0
commit f1bffdcd61
15 changed files with 46 additions and 15 deletions

View File

@@ -25,6 +25,8 @@ class UnstructuredFormatter(Mapper):
start = time.time()
filepath = sample.get(self.filepath_key)
filename = sample.get(self.filename_key)
if not filename.lower().endswith((".ppt", ".pptx", "docx", "xlsx", ".csv")):
return sample
try:
elements = partition(filename=filepath)
sample[self.text_key] = "\n\n".join([str(el) for el in elements])