|
|
@@ -98,7 +98,7 @@ def worker(pipeline_name_or_config_path: str,
|
|
|
|
|
|
for result in results:
|
|
|
try:
|
|
|
- input_path = Path(result.input_path)
|
|
|
+ input_path = Path(result["input_path"])
|
|
|
|
|
|
# 保存结果
|
|
|
if result.get("page_index") is not None:
|
|
|
@@ -127,8 +127,9 @@ def worker(pipeline_name_or_config_path: str,
|
|
|
processed_count += 1
|
|
|
|
|
|
except Exception as e:
|
|
|
+ traceback.print_exc()
|
|
|
batch_results.append({
|
|
|
- "image_path": Path(result.input_path).name if hasattr(result, 'input_path') else "unknown",
|
|
|
+ "image_path": Path(result["input_path"]).name,
|
|
|
"processing_time": 0,
|
|
|
"success": False,
|
|
|
"device": device,
|
|
|
@@ -139,7 +140,7 @@ def worker(pipeline_name_or_config_path: str,
|
|
|
# 将结果放入结果队列
|
|
|
result_queue.put(batch_results)
|
|
|
|
|
|
- print(f"Worker {worker_id} ({device}) processed batch of {len(batch)} files. Total: {processed_count}")
|
|
|
+ # print(f"Worker {worker_id} ({device}) processed batch of {len(batch)} files. Total: {processed_count}")
|
|
|
|
|
|
except Exception as e:
|
|
|
# 批处理失败
|