Skip to content

Commit 7ecb605

Browse files
committed
fix path
1 parent aa59f96 commit 7ecb605

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

application_sdk/outputs/__init__.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -438,6 +438,10 @@ async def write_statistics(self, typename: Optional[str] = None) -> Optional[Dic
438438
# If accessing chunk_start fails, fallback to default filename
439439
pass
440440

441+
# Write the statistics dictionary to the JSON file
442+
with open(output_file_name, "wb") as f:
443+
f.write(orjson.dumps(statistics))
444+
441445
destination_file_path = get_object_store_prefix(output_file_name)
442446
# Push the file to the object store
443447
await ObjectStore.upload_file(
@@ -448,4 +452,5 @@ async def write_statistics(self, typename: Optional[str] = None) -> Optional[Dic
448452
return statistics
449453
except Exception as e:
450454
logger.error(f"Error writing statistics: {str(e)}")
455+
raise
451456

0 commit comments

Comments
 (0)