mirror of
https://github.com/allenai/olmocr.git
synced 2025-10-19 03:59:09 +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)
|
bucket, key = parse_s3_path(output_final_path)
|
||||||
workspace_s3.upload_file(temp_path, bucket, key)
|
workspace_s3.upload_file(temp_path, bucket, key)
|
||||||
else:
|
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)
|
shutil.copyfile(temp_path, output_final_path)
|
||||||
finally:
|
finally:
|
||||||
# Clean up the temporary file
|
# Clean up the temporary file
|
||||||
|
Loading…
x
Reference in New Issue
Block a user