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

Add "all" option to logging #100664

Closed
wants to merge 4 commits into from
Closed

Add "all" option to logging #100664

wants to merge 4 commits into from

Conversation

mlazos
Copy link
Contributor

@mlazos mlazos commented May 4, 2023

@mlazos mlazos requested review from lezcano and kurtamohler May 4, 2023 23:16
@pytorch-bot
Copy link

pytorch-bot bot commented May 4, 2023

🔗 Helpful Links

🧪 See artifacts and rendered test results at hud.pytorch.org/pr/100664

Note: Links to docs will display an error until the docs builds have been completed.

✅ No Failures

As of commit 34cfa12:
💚 Looks good so far! There are no failures yet. 💚

This comment was automatically generated by Dr. CI and updates every 15 minutes.

@mlazos mlazos added module: logging Features which make it easier to tell what PyTorch is doing under the hood release notes: dynamo and removed module: dynamo labels May 4, 2023
Copy link
Collaborator

@lezcano lezcano left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice!

Now a coupe things (not for this PR)

I believe that the function _parse_log_settings is doing a bit too much here. I think it should just parse the string, as the name implies, and then call set_logs. This way we would only have one point of entry to set the logs, and changes like this one of adding one more thing would just need to be done in one place.

Also another nit for this PR or another. You can use the trick of calling locals() at the beginning of set_logs (and pop modules off it) to remove the need for _set_logs altogether, which I think it's nice.

torch/_logging/_internal.py Outdated Show resolved Hide resolved
torch/_logging/_internal.py Outdated Show resolved Hide resolved
@mlazos
Copy link
Contributor Author

mlazos commented May 5, 2023

@pytorchbot merge

@pytorch-bot pytorch-bot bot added the ciflow/trunk Trigger trunk jobs on your pull request label May 5, 2023
@pytorchmergebot
Copy link
Collaborator

Merge started

Your change will be merged once all checks pass (ETA 0-4 Hours).

Learn more about merging in the wiki.

Questions? Feedback? Please reach out to the PyTorch DevX Team

Advanced Debugging
Check the merge workflow status
here

kiersten-stokes pushed a commit to kiersten-stokes/pytorch that referenced this pull request May 8, 2023
Adds the long-promised "all" option to logging.

Pull Request resolved: pytorch#100664
Approved by: https://github.com/lezcano
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ciflow/trunk Trigger trunk jobs on your pull request Merged module: dynamo module: logging Features which make it easier to tell what PyTorch is doing under the hood release notes: dynamo
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants