Filter PyTorch 1.13 UserWarnings (#10166)

FilterWarning for torch.distributed._all_gather_base

Co-authored-by: Glenn Jocher <glenn.jocher@ultralytics.com>
pull/10177/head
tripleMu 2022-11-16 23:10:15 +08:00 committed by GitHub
parent 166b9f2fa7
commit 90575107e7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 0 deletions

View File

@ -32,6 +32,7 @@ except ImportError:
# Suppress PyTorch warnings # Suppress PyTorch warnings
warnings.filterwarnings('ignore', message='User provided device_type of \'cuda\', but CUDA is not available. Disabling') warnings.filterwarnings('ignore', message='User provided device_type of \'cuda\', but CUDA is not available. Disabling')
warnings.filterwarnings('ignore', category=UserWarning)
def smart_inference_mode(torch_1_9=check_version(torch.__version__, '1.9.0')): def smart_inference_mode(torch_1_9=check_version(torch.__version__, '1.9.0')):