From e19bf01563c619f8e6dc3b3819327f85ab1cbc99 Mon Sep 17 00:00:00 2001 From: "AI Codemod Bot (via CodemodService)" Date: Tue, 1 Jul 2025 11:46:33 -0700 Subject: [PATCH] Remove redundant casts] fbsource/fbcode/torchrec/distributed Differential Revision: D77359808 --- torchrec/distributed/embedding_lookup.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/torchrec/distributed/embedding_lookup.py b/torchrec/distributed/embedding_lookup.py index fce86dc19f..b4e5948f4a 100644 --- a/torchrec/distributed/embedding_lookup.py +++ b/torchrec/distributed/embedding_lookup.py @@ -10,7 +10,7 @@ import logging from abc import ABC from collections import OrderedDict -from typing import Any, cast, Dict, Iterator, List, Optional, Tuple, Union +from typing import Any, Dict, Iterator, List, Optional, Tuple, Union import torch import torch.distributed as dist @@ -134,8 +134,7 @@ def _load_state_dict( dst_param.detach().copy_(src_param) unexpected_keys.remove(key) else: - # pyre-fixme[22]: The cast is redundant. - missing_keys.append(cast(str, key)) + missing_keys.append(key) return missing_keys, unexpected_keys