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:
wizzniu
2025-04-28 17:51:29 +00:00
committed by PyTorch MergeBot
parent 8ce3d4a541
commit 2246cb6e14

View File

@ -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):