Skip to content

Commit 8062650

Browse files
generatedunixname1401739305002972meta-codesync[bot]
authored andcommitted
Fix PYRE_MISSING_ANNOTATIONS issues in fbcode/pearl/test/unit/with_pytorch
Differential Revision: D101136138 fbshipit-source-id: 4ff1e63d8a5453a64e833787fcd9b571cc6900e8
1 parent ed12d38 commit 8062650

2 files changed

Lines changed: 2 additions & 3 deletions

File tree

test/unit/with_pytorch/test_linear_bandits.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -300,7 +300,7 @@ def test_unobserved_actions(self) -> None:
300300

301301
# Create a class to hold the action counts to avoid nonlocal issues
302302
class ActionCounter:
303-
def __init__(self, num_actions: int):
303+
def __init__(self, num_actions: int) -> None:
304304
self.counts = torch.zeros(num_actions)
305305

306306
def update(self, actions: torch.Tensor) -> None:

test/unit/with_pytorch/test_neural_linear_bandits.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,7 @@ def test_set_use_skip_connections(self) -> None:
3939
for child in policy_learner.model._nn_layers._model.children():
4040
self.assertIsInstance(child, ResidualWrapper)
4141

42-
# pyre-fixme[3]: Return type must be annotated.
43-
def test_state_dict(self):
42+
def test_state_dict(self) -> None:
4443
# There has been discussions and debating on how to support state dict of policy learner
4544
# This unittest is to ensure regardless of solution, this functionality needs to be there
4645
# init a policy learn and learn once to get some random value

0 commit comments

Comments
 (0)