Skip to content

Commit

Permalink
adding file path to error message for clearity. (#380)
Browse files Browse the repository at this point in the history
  • Loading branch information
weinbe58 authored Aug 9, 2023
1 parent 5c9a391 commit b490942
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/bloqade/task/cloud_base.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
from collections import OrderedDict
import datetime
import json
import os
import sys
import numpy as np
import traceback
Expand Down Expand Up @@ -232,6 +233,7 @@ def submit(self, shuffle_submit_order: bool = True) -> CloudBatchResultSubType:
future_file = f"partial-batch-future-{time_stamp}.json"
error_file = f"partial-batch-errors-{time_stamp}.json"

cwd = os.get_cwd()
cloud_batch_result.save_json(future_file, indent=2)

with open(error_file, "w") as f:
Expand All @@ -240,7 +242,8 @@ def submit(self, shuffle_submit_order: bool = True) -> CloudBatchResultSubType:
raise CloudBatchTask.SubmissionException(
"One or more error(s) occured during submission, please see "
"the following files for more information:\n"
f" - {future_file}\n - {error_file}\n"
f" - {os.path.join(cwd, future_file)}\n"
f" - {os.path.join(cwd, error_file)}\n"
)

else:
Expand Down

0 comments on commit b490942

Please sign in to comment.