run_classifier.py :  TypeError: join() argument must be str or bytes, not 'PosixPath'
when trying the MRPC example : 

python3.5 run_classifier.py \
  --task_name MRPC \
  --do_train \
  --do_eval \
  --do_lower_case \
  --data_dir $GLUE_DIR/MRPC/ \
  --bert_model bert-base-uncased \
  --max_seq_length 128 \
  --train_batch_size 32 \
  --learning_rate 2e-5 \
  --num_train_epochs 3.0 \
  --output_dir /tmp/mrpc_output

Better speed can be achieved with apex installed from https://www.github.com/nvidia/apex.
02/22/2019 21:29:48 - INFO - __main__ -   device: cuda n_gpu: 1, distributed training: False, 16-bits training: False
02/22/2019 21:29:48 - INFO - pytorch_pretrained_bert.tokenization -   loading vocabulary file https://s3.amazonaws.com/models.huggingface.co/bert/bert-base-uncased-vocab.txt from cache at /home/ubuntu/.pytorch_pretrained_bert/26bc1ad6c0ac742e9b52263248f6d0f00068293b33709fae12320c0e35ccfbbb.542ce4285a40d23a559526243235df47c5f75c197f04f37d1a0c124c32c9a084
02/22/2019 21:29:48 - INFO - __main__ -   LOOKING AT /home/ubuntu/glue_data/MRPC/train.tsv
Traceback (most recent call last):
  File "pytorch-pretrained-BERT/examples/run_classifier.py", line 637, in <module>
    main()
  File "pytorch-pretrained-BERT/examples/run_classifier.py", line 465, in main
    cache_dir = args.cache_dir if args.cache_dir else os.path.join(PYTORCH_PRETRAINED_BERT_CACHE, 'distributed_{}'.format(args.local_rank))
  File "/usr/lib/python3.5/posixpath.py", line 89, in join
    genericpath._check_arg_types('join', a, *p)
  File "/usr/lib/python3.5/genericpath.py", line 143, in _check_arg_types
    (funcname, s.__class__.__name__)) from None
TypeError: join() argument must be str or bytes, not 'PosixPath'


ubuntu 16
python 3.5
torch 1.0.1
Collecting torch>=0.4.1 (from pytorch-pretrained-bert)
  Downloading https://files.pythonhosted.org/packages/59/d2/4e806f73b4b72daab9064c99394fc22ea6ef1fb052154546405057cd192d/torch-1.0.1.post2-cp35-cp35m-manylinux1_x86_64.whl (582.5MB)

https://github.com/huggingface/pytorch-pretrained-BERT/blob/master/pytorch_pretrained_bert/file_utils.py#L30
`PYTORCH_PRETRAINED_BERT_CACHE = Path(os.getenv('PYTORCH_PRETRAINED_BERT_CACHE',
                                                   Path.home() / '.pytorch_pretrained_bert'))` --> 
`PYTORCH_PRETRAINED_BERT_CACHE = str(Path(os.getenv('PYTORCH_PRETRAINED_BERT_CACHE',
                                                   Path.home() / '.pytorch_pretrained_bert')))` would solve this, I don't know if there are any side effects.

Maybe, a test should be added here?<|||||>The above does not resolve the err<|||||>Let's rather keep the library's internal using `Path` and fix the examples by adding `str` there instead.
Fixed on master now.