Skip to content

Commit

Permalink
Use key in dict instead of key in dict.keys()
Browse files Browse the repository at this point in the history
Signed-off-by: Jinzhe Zeng <jinzhe.zeng@rutgers.edu>
  • Loading branch information
njzjz authored Aug 5, 2024
1 parent f93aa1d commit 74a8980
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions deepmd/utils/batch_size.py
Original file line number Diff line number Diff line change
Expand Up @@ -220,10 +220,10 @@ def append_to_list(res_list, res):
results = append_to_list(results, result)
else:
results = (
{kk: [] for kk in result.keys()} if results is None else results
{kk: [] for kk in result} if results is None else results
)
results = {
kk: append_to_list(results[kk], result[kk]) for kk in result.keys()
kk: append_to_list(results[kk], result[kk]) for kk in result
}
assert results is not None
assert returned_dict is not None
Expand Down

0 comments on commit 74a8980

Please sign in to comment.