-
Notifications
You must be signed in to change notification settings - Fork 543
fix: scope env DEBUG to env module logger, not root #1249
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -15,6 +15,15 @@ def load_environment(env_id: str, **env_args) -> Environment: | |
| try: | ||
| module = importlib.import_module(module_name) | ||
|
|
||
| # Mirror verifiers' configured level onto the env's module logger so | ||
| # env code using logging.getLogger(__name__) emits at that level via | ||
| # the root JSON handler. Children (e.g. f"{module_name}.scoring") | ||
| # inherit. Root stays at default WARNING so third-party libs (httpx, | ||
| # httpcore, …) don't spam at DEBUG. | ||
| vf_level = logging.getLogger("verifiers").level | ||
| if vf_level: | ||
| logging.getLogger(module_name).setLevel(vf_level) | ||
|
Comment on lines
+23
to
+25
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
This snapshots Useful? React with 👍 / 👎. |
||
|
|
||
| if not hasattr(module, "load_environment"): | ||
| raise AttributeError( | ||
| f"Module '{module_name}' does not have a 'load_environment' function. " | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hm not sure we should do this in
load_environment- what is the reason for this?