Skip to content

Commit 69189db

Browse files
committed
Fix strict mode handling in sel update for TF spin models
1 parent de735a7 commit 69189db

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

deepmd/utils/update_sel.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,9 @@ def update_one_sel(
4343
sel = [int(self.wrap_up_4(ii * ratio)) for ii in tmp_sel]
4444
else:
4545
# sel is set by user
46-
for ii, (tt, dd) in enumerate(zip(tmp_sel, sel, strict=True)):
46+
# TODO: Fix len(tmp_sel) != len(sel) for TF spin models when strict is True
47+
# error reported by source/tests/tf/test_init_frz_model_spin.py
48+
for ii, (tt, dd) in enumerate(zip(tmp_sel, sel, strict=False)):
4749
if dd and tt > dd:
4850
# we may skip warning for sel=0, where the user is likely
4951
# to exclude such type in the descriptor

0 commit comments

Comments
 (0)