mirror of
https://github.com/pytorch/pytorch.git
synced 2025-10-20 21:14:14 +08:00
Fix common_distributed.py to NOT set root logger (#152319)
Using `logging.basicConfig` to set root logger's level is not a good behavior. Fix common_distributed.py to set level for current logger only, because it affects downstream's 3rd-party testing plugins. Pull Request resolved: https://github.com/pytorch/pytorch/pull/152319 Approved by: https://github.com/Skylion007
This commit is contained in:
committed by
PyTorch MergeBot
parent
8ce3d4a541
commit
2246cb6e14
@ -53,8 +53,8 @@ from torch.testing._internal.distributed.multi_threaded_pg import (
|
||||
)
|
||||
import operator
|
||||
|
||||
logging.basicConfig(level=logging.INFO)
|
||||
logger = logging.getLogger(__name__)
|
||||
logger.setLevel(logging.INFO)
|
||||
|
||||
|
||||
class TestSkip(NamedTuple):
|
||||
|
||||
Reference in New Issue
Block a user