Skip to content

Commit

Permalink
enable B011 (PaddlePaddle#57376)
Browse files Browse the repository at this point in the history
  • Loading branch information
ooooo-create authored Sep 18, 2023
1 parent db13081 commit 413d6c9
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
1 change: 0 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,6 @@ ignore = [
"UP028",
"C403",
"UP034",
"B011",
"C405",
"C417",
"PLR0402",
Expand Down
6 changes: 4 additions & 2 deletions python/paddle/base/incubate/checkpoint/auto_checkpoint.py
Original file line number Diff line number Diff line change
Expand Up @@ -397,7 +397,7 @@ def _get_last_valid_checkpoint(self):
"load tain_epoch_range checkpoint:{}".format(self._serialize())
)
else:
assert False, "not supported acp_type:{}".format(g_acp_type)
raise AssertionError("not supported acp_type:{}".format(g_acp_type))

def _to_dict(self):
d = {
Expand Down Expand Up @@ -503,7 +503,9 @@ def save_checkpoint(self):
elif g_acp_type == CONST_DACP_TYPE:
self._save_checkpoint()
else:
assert False, "not supported acp_type:{}".format(g_acp_type)
raise AssertionError(
"not supported acp_type:{}".format(g_acp_type)
)
self._last_checkpoint_time = time.time()

def _save_checkpoint(self):
Expand Down

0 comments on commit 413d6c9

Please sign in to comment.