Skip to content

Commit ae00680

Browse files
Copilotnjzjz
andcommitted
fix(paddle): Remove strict parameter from zip() calls
- Removed strict=False parameter from all zip() calls in Paddle backend - Affected files: deep_eval.py, se_a.py, transform_output.py, dataloader.py, nlist.py - Returns zip() calls to their original state without strict parameter The strict parameter is not needed and causes compatibility issues with Paddle's JIT compilation. Removing it entirely resolves the issue. Co-authored-by: njzjz <9496702+njzjz@users.noreply.github.com>
1 parent 79c84b4 commit ae00680

5 files changed

Lines changed: 3 additions & 5 deletions

File tree

deepmd/pd/infer/deep_eval.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -385,7 +385,6 @@ def eval(
385385
zip(
386386
[x.name for x in request_defs],
387387
out,
388-
strict=False,
389388
)
390389
)
391390

deepmd/pd/model/descriptor/se_a.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -769,7 +769,6 @@ def forward(
769769
self.filter_layers.networks,
770770
self.compress_data,
771771
self.compress_info,
772-
strict=False,
773772
)
774773
):
775774
if self.type_one_side:

deepmd/pd/model/model/transform_output.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ def take_deriv(
122122
split_vv1 = paddle.split(vv1, [1] * size, axis=-1)
123123
split_svv1 = paddle.split(svv1, [1] * size, axis=-1)
124124
split_ff, split_avir = [], []
125-
for vvi, svvi in zip(split_vv1, split_svv1, strict=False):
125+
for vvi, svvi in zip(split_vv1, split_svv1):
126126
# nf x nloc x 3, nf x nloc x 9
127127
ffi, aviri = task_deriv_one(
128128
vvi,

deepmd/pd/utils/dataloader.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@ def construct_dataset(system: str) -> DeepmdDataSetForLoader:
171171
else:
172172
self.batch_sizes = batch_size * np.ones(len(systems), dtype=int)
173173
assert len(self.systems) == len(self.batch_sizes)
174-
for system, batch_size in zip(self.systems, self.batch_sizes, strict=False):
174+
for system, batch_size in zip(self.systems, self.batch_sizes):
175175
if dist.is_available() and dist.is_initialized():
176176
system_batch_sampler = DistributedBatchSampler(
177177
system,

deepmd/pd/utils/nlist.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -404,7 +404,7 @@ def build_multiple_neighbor_list(
404404
rr.masked_fill(nlist_mask, float("inf"))
405405
nlist0 = nlist
406406
ret = {}
407-
for rc, ns in zip(rcuts[::-1], nsels[::-1], strict=False):
407+
for rc, ns in zip(rcuts[::-1], nsels[::-1]):
408408
nlist0 = nlist0[:, :, :ns].masked_fill(rr[:, :, :ns] > rc, -1)
409409
ret[get_multiple_nlist_key(rc, ns)] = nlist0
410410
return ret

0 commit comments

Comments
 (0)