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