Buffer python warning to avoid deadlocks
Summary: Pull Request resolved: https://github.com/pytorch/pytorch/pull/26613
Test Plan: Imported from OSS
Differential Revision: D18249633
Pulled By: albanD
fbshipit-source-id: 863f52400e1b97943a67a9e1abb09ae8d045e7f0