-
Notifications
You must be signed in to change notification settings - Fork 0
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
Summary
Using Registry can emit verbose debug messages to stdout/stderr even when callers never explicitly configure Mindtrace/Registry logging for console debug output.
Example output observed during load(...):
Loading metadata from: ...Loaded metadata: ...Downloading directory from ...Download complete. Contents: ...
These are self.logger.debug(...) calls in the local registry backend, but they still reach the terminal due to propagation and root logger handlers installed by ZenML.
Root cause chain
From local investigation in this repo:
Registry/ backend classes inheritMindtraceand obtain loggers viaget_logger(...).- Mindtrace logger setup defaults to
propagate=Trueinmindtrace.core.logging.logger.get_logger. mindtrace.registryimports ZenML materializer codepaths.- ZenML imports call
zenml.init_logging()at import time.zenml/__init__.pycallsinit_logging().zenml/logger.py:init_logging()sets root verbosity and adds root handlers (console + ZenML handler).
- With propagation enabled, Registry/backend
DEBUGrecords bubble to root and appear in console.
Reproduction
import logging
print("before import:", logging.getLogger().level, logging.getLogger().handlers)
from mindtrace.registry import Registry
print("after import:", logging.getLogger().level, logging.getLogger().handlers)
r = Registry() # default local backend
r.save("a/shared:item", 1)
print(r.load("a/shared:item"))Expected by many users: no backend debug spam on console unless explicitly enabled.
Actual: debug lines from local registry backend appear on console in environments where ZenML root logging is initialized.
Notes from local run
- Before importing
mindtrace.registry, root logger had no handlers. - After import, root had a
StreamHandlerandZenMLLoggingHandler, with root level changed. - Registry/backend logger effective level allowed debug, and propagated to root.
Suggested direction
Short-term mitigation for Registry UX:
- Default Registry logger propagation to
False(while allowing explicit opt-in).
Longer-term logging architecture:
- Clarify library-vs-application logging ownership and avoid surprising import-time global logging side effects.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working