From 88c86f8379bca104c4021f59cc5e62409e81abbe 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) (cherry picked from commit c11024e0db864bd8487c68e3d0cf5e100fc07831) --- tensordict/base.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tensordict/base.py b/tensordict/base.py index c44d1b4c3..6c0780233 100644 --- a/tensordict/base.py +++ b/tensordict/base.py @@ -10687,7 +10687,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 ]