Skip to content

Commit 9cd7570

Browse files
Fix loop var naming (#38885)
1 parent 1fc67a2 commit 9cd7570

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/transformers/modeling_utils.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -380,10 +380,10 @@ def find_tensor_attributes(module: nn.Module) -> list[tuple[str, Tensor]]:
380380

381381
gen = parameter._named_members(get_members_fn=find_tensor_attributes)
382382
last_tuple = None
383-
for tuple in gen:
384-
last_tuple = tuple
385-
if tuple[1].is_floating_point():
386-
return tuple[1].dtype
383+
for gen_tuple in gen:
384+
last_tuple = gen_tuple
385+
if gen_tuple[1].is_floating_point():
386+
return gen_tuple[1].dtype
387387

388388
if last_tuple is not None:
389389
# fallback to the last dtype

0 commit comments

Comments
 (0)