Deprecated mask fill mask type can causes pages and pages of repeated messages #37065
Labels
triaged
This issue has been looked at a team member, and triaged and prioritized into an appropriate module
馃悰 Bug
When I install DrQA, https://github.com/facebookresearch/DrQA , with pytorch 1.4, the mask being provided is legacy, ie torch.uint8. pytorch correctly points out that this is legacy, and should be migrated to dtype torch.bool. However, rather than printing a single warning, it prints pages and pages of warnings, presumably one for each time the masked fill is called. I feel taht the warning should only be printed once. Example partial output:
I have logged the masked fill dtype issue at facebookresearch/DrQA#249 . However, I feel taht DrQA cannot simply upgrade this, because will likely break backwards compatibility with earlier torch versions.
I feel that the correct fix is that deprecation warnings should be printed only once per python process.
To Reproduce
Steps to reproduce the behavior:
python scripts/pipeline/interactive.py --tokenizer regexp
process('what is the capital of france?')
Expected behavior
Print the deprecation message once, and then stop.
Environment
Please copy and paste the output from our
environment collection script
(or fill out the checklist below manually).
You can get the script and run it with:
conda
,pip
, source): condaAdditional context
The text was updated successfully, but these errors were encountered: