Skip to content

Commit

Permalink
Clean up errors and remove unused ignores] [batch:235/695] [shard:4/N]
Browse files Browse the repository at this point in the history
Reviewed By: connernilsen

Differential Revision: D66311994

fbshipit-source-id: 1e9de0a727b946d73ec919c1cb99561f40205907
  • Loading branch information
generatedunixname89002005287564 authored and facebook-github-bot committed Nov 22, 2024
1 parent 8981703 commit 010d4f8
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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`.
Expand Down
4 changes: 0 additions & 4 deletions pearl/utils/instantiations/spaces/box.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down

0 comments on commit 010d4f8

Please sign in to comment.