From 66f302e65e00becda29877fd822d50fdfec78c23 Mon Sep 17 00:00:00 2001 From: Romain Cledat Date: Tue, 25 Jun 2024 15:36:55 -0700 Subject: [PATCH] Fix issue with current_namespace when the namespace is None --- metaflow/client/core.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/metaflow/client/core.py b/metaflow/client/core.py index 0716c84daf..88513f550a 100644 --- a/metaflow/client/core.py +++ b/metaflow/client/core.py @@ -276,6 +276,11 @@ def __init__( self._attempt = attempt self._current_namespace = _current_namespace or get_namespace() self._namespace_check = _namespace_check + # If the current namespace is False, we disable checking for namespace for this + # and all children objects. Not setting namespace_check to False has the consequence + # of preventing access to children objects after the namespace changes + if self._current_namespace is None: + self._namespace_check = False if self._attempt is not None: if self._NAME not in ["task", "artifact"]: