"Dump_all() got an unexpected keyword argument 'sort_keys'" after running trainer.push_to_hub()
Just fine-tuned pegasus-large on Google Colab Pro withtrainer.train(), then executed the following commands:!huggingface-cli login
!pip install hf-lfs
!git config --global user.email "jakemsc@example.com"
!git config --global user.name "JakeMSc"
trainer.push_to_hub("test_model")Which leads to the following error:TypeError                                 Traceback (most recent call last)
<ipython-input-29-0cd57aa71f88> in <module>()
----> 1 trainer.push_to_hub("test_model")

3 frames
/usr/local/lib/python3.7/dist-packages/yaml/__init__.py in dump(data, stream, Dumper, **kwds)
    198     If stream is None, return the produced string instead.
    199     """
--> 200     return dump_all([data], stream, Dumper=Dumper, **kwds)
    201 
    202 def safe_dump_all(documents, stream=None, **kwds):

TypeError: dump_all() got an unexpected keyword argument 'sort_keys'Here are details of my system installation:transformersversion: 4.8.2Platform: Linux-5.4.104±x86_64-with-Ubuntu-18.04-bionicPython version: 3.7.10PyTorch version (GPU?): 1.9.0+cu102 (True)Tensorflow version (GPU?): 2.5.0 (True)Flax version (CPU?/GPU?/TPU?): not installed (NA)Jax version: not installedJaxLib version: not installedUsing GPU in script?: YesUsing distributed or parallel set-up in script?: NoAny ideas on how to resolve this?
2021-07-12T13:50:19Z
What is your version of pyaml? I think you need a more recent version (pip install --upgrade pyyaml). Will adjust the setup.
2021-07-12T15:15:43Z
Thanks, my pyaml was on version 3.4, so that solved the problem after updating to version 5.4. Although now I have a new error. See here:"AttributeError: 'Seq2SeqTrainer' object has no attribute 'repo'" after running trainer.push_to_hub()
2021-07-12T15:23:52Z
Yes, you need to setpush_to_hub=Truein the training arguments before training. Check theupdated notebooks!