change logging.warn to logging.warning (#51727)

Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/51727

logging.warn() is deprecated since Python 3.3 in favor of logging.warning()

Reviewed By: yinghai

Differential Revision: D25785598

fbshipit-source-id: 391d834fe607cd571ee147445aa0a98910535099
This commit is contained in:
Leszek Nowaczyk 2021-03-29 10:36:54 -07:00 committed by Facebook GitHub Bot
parent 9ef53f7e0f
commit 1551bcc670

View File

@ -110,5 +110,5 @@ class ModelTrainerLog():
try:
logger.log(logdict)
except Exception as e:
logging.warn(
logging.warning(
"Failed to call ExternalLogger: {}".format(e), e)