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

Use dedicated logger instead of the root one #478

Merged
merged 3 commits into from
Oct 19, 2022
Merged

Conversation

patricklabatut
Copy link
Contributor

@patricklabatut patricklabatut commented Oct 10, 2022

What does this PR do?

This introduces the use of a dedicated logger throughout the library instead of relying on Python's root logger.

Test Plan: CI + local ad-hoc script:

$ ./test_logging.py
2022-10-10 15:20:15,468 WARNING MainThread xformers WARNING:
Need to compile C++ extensions to get sparse attention support. Please run python setup.py build develop

Before submitting

  • Did you have fun?
    • Make sure you had fun coding 🙃
  • Did you read the contributor guideline?
  • Was this discussed/approved via a Github issue? (no need for typos, doc improvements)
    • N/A
  • Did you make sure to update the docs?
    • N/A
  • Did you write any new necessary tests?
    • N/A
  • Did you update the changelog? (if needed)
    • N/A

PR review

Anyone in the community is free to review the PR once the tests have passed.
If we didn't discuss your PR in Github issues there's a high chance it will not be merged.

@facebook-github-bot facebook-github-bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Oct 10, 2022
@patricklabatut patricklabatut linked an issue Oct 10, 2022 that may be closed by this pull request
@patricklabatut patricklabatut marked this pull request as ready for review October 13, 2022 21:58
@codecov-commenter
Copy link

Codecov Report

Base: 90.39% // Head: 90.58% // Increases project coverage by +0.19% 🎉

Coverage data is based on head (6789c00) compared to base (e31c571).
Patch coverage: 71.69% of modified lines in pull request are covered.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #478      +/-   ##
==========================================
+ Coverage   90.39%   90.58%   +0.19%     
==========================================
  Files          76       76              
  Lines        4548     4567      +19     
==========================================
+ Hits         4111     4137      +26     
+ Misses        437      430       -7     
Flag Coverage Δ
Python 90.58% <71.69%> (+0.19%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
xformers/__init__.py 52.23% <25.00%> (+0.72%) ⬆️
xformers/triton/softmax.py 92.15% <33.33%> (+0.15%) ⬆️
xformers/components/attention/__init__.py 87.23% <50.00%> (+4.62%) ⬆️
...formers/components/attention/scaled_dot_product.py 95.12% <50.00%> (+0.12%) ⬆️
xformers/components/feedforward/fused_mlp.py 91.66% <50.00%> (+0.36%) ⬆️
xformers/factory/weight_init.py 90.90% <50.00%> (+0.08%) ⬆️
xformers/triton/layer_norm.py 89.06% <50.00%> (+0.17%) ⬆️
xformers/triton/utils.py 93.10% <50.00%> (+3.81%) ⬆️
xformers/factory/block_factory.py 97.05% <66.66%> (+0.02%) ⬆️
xformers/sparse/blocksparse_tensor.py 88.99% <66.66%> (+0.51%) ⬆️
... and 14 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

Copy link
Contributor

@fmassa fmassa left a comment

Choose a reason for hiding this comment

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

Thanks Patrick!

@fmassa fmassa merged commit faa88b1 into main Oct 19, 2022
@fmassa fmassa deleted the use-xformers-logger branch October 19, 2022 10:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

xFormers is using the root logger
4 participants