|
|
@@ -94,7 +94,6 @@ def run_single_process(args: Tuple[List[str], Dict[str, Any], int]) -> Dict[str,
|
|
|
"--output_dir", str(process_output_dir),
|
|
|
"--pipeline", config["pipeline"],
|
|
|
"--device", config["device"],
|
|
|
- "--batch_size", str(config["batch_size"]),
|
|
|
]
|
|
|
|
|
|
# 添加可选参数
|
|
|
@@ -209,7 +208,6 @@ def main():
|
|
|
|
|
|
# Pipeline参数
|
|
|
parser.add_argument("--pipeline", type=str, default="PP-StructureV3", help="Pipeline name")
|
|
|
- parser.add_argument("--batch_size", type=int, default=4, help="Batch size per process")
|
|
|
parser.add_argument("--timeout", type=int, default=3600, help="Process timeout in seconds")
|
|
|
|
|
|
# 其他参数
|
|
|
@@ -277,7 +275,6 @@ def main():
|
|
|
"output_dir": str(output_dir),
|
|
|
"pipeline": args.pipeline,
|
|
|
"device": device,
|
|
|
- "batch_size": args.batch_size,
|
|
|
"timeout": args.timeout,
|
|
|
"test_mode": args.test_mode
|
|
|
}
|
|
|
@@ -354,7 +351,6 @@ def main():
|
|
|
"avg_time_per_file": total_time / total_processed_files if total_processed_files > 0 else 0,
|
|
|
"num_processes": args.num_processes,
|
|
|
"devices": devices,
|
|
|
- "batch_size": args.batch_size,
|
|
|
"pipeline": args.pipeline,
|
|
|
"timestamp": time.strftime("%Y-%m-%d %H:%M:%S")
|
|
|
}
|
|
|
@@ -397,17 +393,17 @@ if __name__ == "__main__":
|
|
|
default_config = {
|
|
|
"input_dir": "../../OmniDocBench/OpenDataLab___OmniDocBench/images",
|
|
|
"output_dir": "./OmniDocBench_Results_Scheduler",
|
|
|
- "num_processes": 2,
|
|
|
+ "pipeline": "./my_config/PP-StructureV3.yaml",
|
|
|
+ "num_processes": 3,
|
|
|
"devices": "gpu:0,gpu:1,gpu:2,gpu:3",
|
|
|
- "batch_size": 2,
|
|
|
}
|
|
|
|
|
|
# default_config = {
|
|
|
# "input_csv": "./OmniDocBench_Results_Scheduler/processed_files_4procs_20250814_213138.csv",
|
|
|
# "output_dir": "./OmniDocBench_Results_Scheduler",
|
|
|
+ # "pipeline": "./my_config/PP-StructureV3.yaml",
|
|
|
# "num_processes": 4,
|
|
|
# "devices": "gpu:0,gpu:1,gpu:2,gpu:3",
|
|
|
- # "batch_size": 2,
|
|
|
# }
|
|
|
|
|
|
sys.argv = [sys.argv[0]]
|