From aa0f5e35ba8fa4df1e5e2213e966e8f250364419 Mon Sep 17 00:00:00 2001 From: vmoens Date: Mon, 9 Oct 2023 11:55:07 +0100 Subject: [PATCH] amend --- tensordict/tensorclass.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tensordict/tensorclass.py b/tensordict/tensorclass.py index 657cb814e..75ec1f1ef 100644 --- a/tensordict/tensorclass.py +++ b/tensordict/tensorclass.py @@ -498,7 +498,7 @@ def _setitem(self, item: NestedKey, value: Any) -> None: # noqa: D417 if isinstance(item, str) or ( isinstance(item, tuple) and all(isinstance(_item, str) for _item in item) ): - raise ValueError("Invalid indexing arguments.") + raise ValueError(f"Invalid indexing arguments: {item}.") if not is_tensorclass(value) and not isinstance( value, (TensorDictBase, numbers.Number, Tensor, MemmapTensor)