From fd4f5cc2e6ec5591016f74d35d2b6e29cb1fa1c0 Mon Sep 17 00:00:00 2001 From: generatedunixname89002005307016 Date: Fri, 22 Sep 2023 02:19:26 -0700 Subject: [PATCH] suppress errors in `reagent` Differential Revision: D49531141 fbshipit-source-id: 04bbaa63baf038b537aee2d76d1601d048fa0e99 --- reagent/ope/estimators/slate_estimators.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/reagent/ope/estimators/slate_estimators.py b/reagent/ope/estimators/slate_estimators.py index b283cd16..78cc6e7c 100644 --- a/reagent/ope/estimators/slate_estimators.py +++ b/reagent/ope/estimators/slate_estimators.py @@ -607,6 +607,7 @@ def slot_item_expectations(self, samples: int = 20000) -> SlateSlotItemExpectati # ...]]` but got `Union[bool, float, int]`. dist[item] = 1.0 dists.append(value.replace(dist)) + # pyre-fixme[6]: For 1st argument expected `Union[None, _NestedSequen... ps[torch.arange(i + 1, slate_size), item] = 0.0 self._slot_item_expectations = make_slot_item_distributions( self.slots, dists @@ -662,11 +663,13 @@ def sample_slate(self, slots: SlateSlots) -> Slate: for i, value in zip(range(slate_size), self._values): item = ps[i].argmax().item() items.append(value.items[item]) + # pyre-fixme[6]: For 1st argument expected `Union[None, _NestedSequen... ps[torch.arange(i + 1, slate_size), item] = 0.0 else: for i, value in zip(range(slate_size), self._values): item = ps[i].multinomial(1).item() items.append(value.items[item]) + # pyre-fixme[6]: For 1st argument expected `Union[None, _NestedSequen... ps[torch.arange(i + 1, slate_size), item] = 0.0 return make_slate(slots, items)