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

Automatic Logger Level Update #1206

Merged
merged 8 commits into from
Sep 15, 2022
Merged

Automatic Logger Level Update #1206

merged 8 commits into from
Sep 15, 2022

Conversation

williamwen42
Copy link
Member

@williamwen42 williamwen42 commented Sep 13, 2022

Address #1184 by updating logger levels whenever torchdynamo.config.log_level is updated.

Additional changes:

Torchdynamo test: run a function multiple times and expect different log levels in outputs: pytest -v -s test/test_misc.py::MiscTests::test_config_log_level.

PyTorch test: Add import torchdynamo; import logging; torchdynamo.config.log_level = logging.DEBUG to a test that purposefully fails (i.e. add self.assertTrue(False) to the test PYTORCH_TEST_WITH_DYNAMO=1 pytest test/test_optim.py -k test_new_pattern_no_warning)

torchdynamo/config.py Outdated Show resolved Hide resolved
torchdynamo/config.py Outdated Show resolved Hide resolved
torchdynamo/config.py Outdated Show resolved Hide resolved
@williamwen42 williamwen42 merged commit bf82d1b into main Sep 15, 2022
@williamwen42 williamwen42 deleted the wwen/auto-logger-level branch September 15, 2022 16:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants