Skip to content

Commit 65cf942

Browse files
generatedunixname1526759334626947facebook-github-bot
authored andcommitted
Remove redundant casts] fbsource/fbcode/torchrec/distributed (#3149)
Summary: Pull Request resolved: #3149 Reviewed By: aporialiao Differential Revision: D77359808 fbshipit-source-id: 74358f23c6ab42c1ea3e43ae731acfd14224ebe1
1 parent cfae04b commit 65cf942

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

torchrec/distributed/embedding_lookup.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
import logging
1111
from abc import ABC
1212
from collections import OrderedDict
13-
from typing import Any, cast, Dict, Iterator, List, Optional, Tuple, Union
13+
from typing import Any, Dict, Iterator, List, Optional, Tuple, Union
1414

1515
import torch
1616
import torch.distributed as dist
@@ -134,8 +134,7 @@ def _load_state_dict(
134134
dst_param.detach().copy_(src_param)
135135
unexpected_keys.remove(key)
136136
else:
137-
# pyre-fixme[22]: The cast is redundant.
138-
missing_keys.append(cast(str, key))
137+
missing_keys.append(key)
139138
return missing_keys, unexpected_keys
140139

141140

0 commit comments

Comments
 (0)