Thanks @sgugger! I forgot that
pip install git+https://github.com/huggingface/transformers.git

is an effective debugging tactic 
Here’s the PR with the fix: Fix example of custom Trainer to reflect signature of compute_loss by lewtun · Pull Request #10537 · huggingface/transformers · GitHub 22