From c11024e0db864bd8487c68e3d0cf5e100fc07831 Mon Sep 17 00:00:00 2001 From: Vincent Moens Date: Thu, 14 Nov 2024 13:58:25 +0000 Subject: [PATCH] [BugFix] Fix none ref in during reduction (#1090) --- tensordict/base.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tensordict/base.py b/tensordict/base.py index ef560b7fc..39729eba4 100644 --- a/tensordict/base.py +++ b/tensordict/base.py @@ -10965,7 +10965,7 @@ def set_(x): tgt = mb_unwrap_functional_tensor(new_thing) src = mb_unwrap_functional_tensor(ragged_source) tgt.nested_int_memo = src.nested_int_memo - else: + elif new_thing is not None: _tensor_symint_registry[new_thing] = _tensor_symint_registry[ ragged_source ]