Compare commits

...

1 Commits

Author SHA1 Message Date
William Fu-Hinthorn
c3731e3d92 [Core] Inherit RT Tags/Meta 2024-07-10 12:10:36 -07:00
2 changed files with 10 additions and 1 deletions

View File

@@ -922,7 +922,10 @@ class BaseCallbackManager(CallbackManagerMixin):
"""
for tag in tags:
self.tags.remove(tag)
self.inheritable_tags.remove(tag)
try:
self.inheritable_tags.remove(tag)
except ValueError:
pass
def add_metadata(self, metadata: Dict[str, Any], inherit: bool = True) -> None:
"""Add metadata to the callback manager.

View File

@@ -2079,6 +2079,12 @@ def _configure(
)
for handler in local_handlers_:
callback_manager.add_handler(handler, False)
if run_tree is not None:
if run_tree.tags is not None:
callback_manager.add_tags(run_tree.tags, False)
if run_tree.metadata is not None:
callback_manager.add_metadata(run_tree.metadata, False)
if inheritable_tags or local_tags:
callback_manager.add_tags(inheritable_tags or [])
callback_manager.add_tags(local_tags or [], False)