From e86267a01cfe9d4be9f7e4882a21bba68cae6205 Mon Sep 17 00:00:00 2001 From: Jake Poznanski Date: Wed, 13 Aug 2025 20:40:04 +0000 Subject: [PATCH] Making local results directory properly --- olmocr/pipeline.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/olmocr/pipeline.py b/olmocr/pipeline.py index f88ff4a..fcfca15 100644 --- a/olmocr/pipeline.py +++ b/olmocr/pipeline.py @@ -513,6 +513,8 @@ async def worker(args, work_queue: WorkQueue, semaphore, worker_id): bucket, key = parse_s3_path(output_final_path) workspace_s3.upload_file(temp_path, bucket, key) else: + # Ensure the results directory exists for local workspace + os.makedirs(os.path.dirname(output_final_path), exist_ok=True) shutil.copyfile(temp_path, output_final_path) finally: # Clean up the temporary file