From b4e20b7d4e1bd120a0905cd1f74873f60a82d033 Mon Sep 17 00:00:00 2001 From: Vincent Moens Date: Wed, 24 Apr 2024 21:41:43 +0100 Subject: [PATCH] amend --- torchrl/envs/libs/dm_control.py | 4 ++-- torchrl/modules/tensordict_module/actors.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/torchrl/envs/libs/dm_control.py b/torchrl/envs/libs/dm_control.py index 96d392a76c2..3e1aac917e0 100644 --- a/torchrl/envs/libs/dm_control.py +++ b/torchrl/envs/libs/dm_control.py @@ -80,8 +80,8 @@ def _dmcontrol_to_torchrl_spec_transform( shape = torch.Size([1]) return BoundedTensorSpec( shape=shape, - low=spec.low, - high=spec.high, + low=spec.minimum, + high=spec.maximum, dtype=dtype, device=device, ) diff --git a/torchrl/modules/tensordict_module/actors.py b/torchrl/modules/tensordict_module/actors.py index 870f68b7bf3..8561b026f3c 100644 --- a/torchrl/modules/tensordict_module/actors.py +++ b/torchrl/modules/tensordict_module/actors.py @@ -443,7 +443,7 @@ class QValueModule(TensorDictModuleBase): def __init__( self, - action_space: Optional[str], + action_space: Optional[str] = None, action_value_key: Optional[NestedKey] = None, action_mask_key: Optional[NestedKey] = None, out_keys: Optional[Sequence[NestedKey]] = None,