Skip to content

Commit

Permalink
avoid reserved python word in kwargs (pytorch#2205)
Browse files Browse the repository at this point in the history
Summary:
Pull Request resolved: pytorch#2205

as per title

Reviewed By: gnahzg, iamzainhuda

Differential Revision: D59336088

fbshipit-source-id: 1614039ef2c8d7958c4e98e1b02588c18b932561
  • Loading branch information
dstaay-fb authored and facebook-github-bot committed Jul 4, 2024
1 parent 375bff6 commit 001396b
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions torchrec/pt2/checks.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,13 +73,13 @@ def pt2_checks_tensor_slice(
torch._check(end_offset >= start_offset)


def pt2_checks_all_is_size(list: List[int]) -> List[int]:
def pt2_checks_all_is_size(x: List[int]) -> List[int]:
if torch.jit.is_scripting() or not is_pt2_compiling():
return list
return x

for i in list:
for i in x:
torch._check_is_size(i)
return list
return x


def pt2_check_size_nonzero(x: torch.Tensor) -> torch.Tensor:
Expand Down

0 comments on commit 001396b

Please sign in to comment.