Skip to content

Commit

Permalink
修改了blog中的代码
Browse files Browse the repository at this point in the history
关于退出循环的代码
  • Loading branch information
NiRunyu committed Sep 17, 2023
1 parent 51fc82a commit 77ee6d6
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions _posts/2023-09-14-check-GPU.md
Original file line number Diff line number Diff line change
Expand Up @@ -195,9 +195,8 @@ if __name__ == "__main__":
else:
judge_num[id] = 0

if all(
(info_ratio[id] < threshold) and (judge_num[id] >= patience)
for id in working_gpu_id
if any(
(info_ratio[id] < threshold) for id in working_gpu_id
):
break
time.sleep(120)
Expand Down

0 comments on commit 77ee6d6

Please sign in to comment.