Skip to content

Commit

Permalink
Fix retry count (#363)
Browse files Browse the repository at this point in the history
  • Loading branch information
xiaoyeqiannian authored Aug 25, 2023
1 parent f8470e8 commit 02318b7
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion dpdispatcher/dp_cloud_server_context.py
Original file line number Diff line number Diff line change
Expand Up @@ -307,7 +307,7 @@ def machine_subfields(cls) -> List[Argument]:
"retry_count",
[int, type(None)],
optional=True,
default=3,
default=2,
doc=doc_retry_count,
),
Argument(
Expand Down
2 changes: 1 addition & 1 deletion dpdispatcher/submission.py
Original file line number Diff line number Diff line change
Expand Up @@ -841,7 +841,7 @@ def handle_unexpected_job_state(self):
retry_count = 3
assert self.machine is not None
if hasattr(self.machine, "retry_count") and self.machine.retry_count > 0:
retry_count = self.machine.retry_count
retry_count = self.machine.retry_count + 1
if (self.fail_count) > 0 and (self.fail_count % retry_count == 0):
raise RuntimeError(
f"job:{self.job_hash} {self.job_id} failed {self.fail_count} times.job_detail:{self}"
Expand Down

0 comments on commit 02318b7

Please sign in to comment.