From 010d4f8fab41b1f59e4269012b86666f4918c9dd Mon Sep 17 00:00:00 2001 From: generatedunixname89002005287564 Date: Fri, 22 Nov 2024 13:21:54 -0800 Subject: [PATCH] Clean up errors and remove unused ignores] [batch:235/695] [shard:4/N] Reviewed By: connernilsen Differential Revision: D66311994 fbshipit-source-id: 1e9de0a727b946d73ec919c1cb99561f40205907 --- .../sequential_decision_making/actor_critic_base.py | 2 -- pearl/utils/instantiations/spaces/box.py | 4 ---- 2 files changed, 6 deletions(-) diff --git a/pearl/policy_learners/sequential_decision_making/actor_critic_base.py b/pearl/policy_learners/sequential_decision_making/actor_critic_base.py index 9e15f57..992ce61 100644 --- a/pearl/policy_learners/sequential_decision_making/actor_critic_base.py +++ b/pearl/policy_learners/sequential_decision_making/actor_critic_base.py @@ -358,8 +358,6 @@ def preprocess_batch(self, batch: TransitionBatch) -> TransitionBatch: # change reward to be the lambda_constraint weighted sum of reward and cost if hasattr(self.safety_module, "lambda_constraint"): batch.reward = ( - # pyre-fixme[16]: Item `Tensor` of `Tensor | Module` has no - # attribute `lambda_constraint`. batch.reward # pyre-fixme[16]: Item `Tensor` of `Tensor | Module` has no # attribute `lambda_constraint`. diff --git a/pearl/utils/instantiations/spaces/box.py b/pearl/utils/instantiations/spaces/box.py index 3aaa805..a5cc6d9 100644 --- a/pearl/utils/instantiations/spaces/box.py +++ b/pearl/utils/instantiations/spaces/box.py @@ -51,11 +51,7 @@ def __init__( seed: Random seed used to initialize the random number generator of the underlying Gymnasium `Box` space. """ - # pyre-fixme[9]: low has type `Union[float, Tensor]`; used as `ndarray[Any, - # Any]`. low = low.numpy(force=True) if isinstance(low, Tensor) else low - # pyre-fixme[9]: high has type `Union[float, Tensor]`; used as `ndarray[Any, - # Any]`. high = high.numpy(force=True) if isinstance(high, Tensor) else high self._gym_space = Box(low=low, high=high, seed=seed)