mirror of
https://github.com/allenai/olmocr.git
synced 2025-10-17 19:22:23 +00:00
Making local results directory properly
This commit is contained in:
parent
11302feb8c
commit
e86267a01c
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user