Skip to content
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

Fix logging verbosity in BackendSimulator #3368

Closed
wants to merge 1 commit into from

Conversation

esantorella
Copy link
Contributor

Summary:
The verbose logging option in BackendSimulator was broken by D65737627, which sets the level of all Ax loggers to the level in SchedulerOptions when the schedule is instantiated. In a benchmark run, the logging level of the BackendSimulator starts out one thing then eventually gets changed.

This diff changes the logic so that verbose_logging controls the level at which logs are logged rather then at which they are visible. Previously, all logs were INFO and were not shown if the level was raised to warning; now, logs can be at either INFO or DEBUG so the level at which they are shown can still be controlled by Scheduler. Under Ax's default INFO logging level, this maintains the behavior that logs will only be surfaced when verbose_logging is True.

Differential Revision: D69623149

@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D69623149

@facebook-github-bot facebook-github-bot added CLA Signed Do not delete this pull request or issue due to inactivity. fb-exported labels Feb 13, 2025
esantorella added a commit to esantorella/Ax that referenced this pull request Feb 13, 2025
Summary:

The verbose logging option in `BackendSimulator` was broken by D65737627, which sets the level of all Ax loggers to the level in `SchedulerOptions` when the schedule is instantiated. In a benchmark run, the logging level of the `BackendSimulator` starts out one thing then eventually gets changed.

This diff changes the logic so that `verbose_logging` controls the level at which logs are logged rather then at which they are visible. Previously, all logs were INFO and were not shown if the level was raised to warning; now, logs can be at either INFO or DEBUG so the level at which they are shown can still be controlled by Scheduler. Under Ax's default INFO logging level, this maintains the behavior that logs will only be surfaced when verbose_logging is True.

Differential Revision: D69623149
@codecov-commenter
Copy link

codecov-commenter commented Feb 13, 2025

Codecov Report

Attention: Patch coverage is 92.85714% with 1 line in your changes missing coverage. Please review.

Project coverage is 95.73%. Comparing base (13ad726) to head (147ad55).

Files with missing lines Patch % Lines
ax/utils/testing/backend_simulator.py 85.71% 1 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main    #3368   +/-   ##
=======================================
  Coverage   95.73%   95.73%           
=======================================
  Files         534      534           
  Lines       52564    52572    +8     
=======================================
+ Hits        50320    50328    +8     
  Misses       2244     2244           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Summary:

The verbose logging option in `BackendSimulator` was broken by D65737627, which sets the level of all Ax loggers to the level in `SchedulerOptions` when the schedule is instantiated. In a benchmark run, the logging level of the `BackendSimulator` starts out one thing then eventually gets changed.

This diff changes the logic so that `verbose_logging` controls the level at which logs are logged rather then at which they are visible. Previously, all logs were INFO and were not shown if the level was raised to warning; now, logs can be at either INFO or DEBUG so the level at which they are shown can still be controlled by Scheduler. Under Ax's default INFO logging level, this maintains the behavior that logs will only be surfaced when verbose_logging is True.

Differential Revision: D69623149
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D69623149

esantorella added a commit to esantorella/Ax that referenced this pull request Feb 14, 2025
Summary:

The verbose logging option in `BackendSimulator` was broken by D65737627, which sets the level of all Ax loggers to the level in `SchedulerOptions` when the schedule is instantiated. In a benchmark run, the logging level of the `BackendSimulator` starts out one thing then eventually gets changed.

This diff changes the logic so that `verbose_logging` controls the level at which logs are logged rather then at which they are visible. Previously, all logs were INFO and were not shown if the level was raised to warning; now, logs can be at either INFO or DEBUG so the level at which they are shown can still be controlled by Scheduler. Under Ax's default INFO logging level, this maintains the behavior that logs will only be surfaced when verbose_logging is True.

Differential Revision: D69623149
@facebook-github-bot
Copy link
Contributor

This pull request has been merged in 5265946.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed Do not delete this pull request or issue due to inactivity. fb-exported Merged
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants