Use of logging.warn is deprecated in favour of logging.warning
There are a few places where `transformers` uses the deprecated `warn` method on a logger, while most of the library uses `warning`. While this works for now, it will presumably be removed at some point (calling it emits a `DeprecationWarning`) and it means that strict test runners (such as `pytest`) complain about some codepaths.

As far as I can tell, all versions of Python supported by `transformers` support the new spelling (`warning` has been around for a _long_ time) so the upgrade should be simple.

I'd be happy to have a go at a PR for this.
@PeterJCLaw Indeed! Happy to review a PR :) 