Trying to push my model back to the hub from python (not notebook) and failing so far:
I am using a T5 model with the latest development version of the example “run_summarization.py” and pass a load of runtime parameters in and my model works fine. There are some parameters that seem to relate to pushing the model back to the hub which I have identified from the “run_summarization.py -h” text:


–use_auth_token - Will use the token generated when running transformers-cli login (necessary to use this script with private models). (default: False) -I assume I need to set this True given I ran the cli and it saved my token in the cache?


–push_to_hub - Whether or not to upload the trained model to the model hub after training. (default: False) - I set this to True


–push_to_hub_model_id - The name of the repository to which push the Trainer. (default: None) - *I set this to a string that is my model like “my_model” I guess? *

–push_to_hub_organization - Not relevant for me since I am an individual?


–push_to_hub_token - Not needed if I set --use_auth_token True


So I have as part of my run time parameter list:
–push_to_hub True --use_auth_token True --push_to_hub_model_id "t5_tuesday"
But I get the error:
OSError: Tried to clone a repository in a non-empty folder that isn’t a git repository. If you really want to do this, do it manually:\mgit init && git remote add origin && git pull origin main or clone repo to a new folder and move your existing files there afterwards.
As I said above, I did transformers-cli login successfully in my environment. I thought maybe I needed to do as I had seen in an example Colab notebook:
!pip install hf-lfs
!git config --global user.email "<my_github_email>"
!git config --global user.name "<my_github_username>"
but after doing the above the error changes to:
subprocess.CalledProcessError: Command ‘[‘git-lfs’, ‘–version’]’ returned non-zero exit status 1.
But not sure if needed (I am guessing)! I can supply the Trace for both kinds of errors above if needed, but I don’t know what minimal configuration works running a .py file to see if I am being a dumb user and the problem is usage or the problem is something else.
Any help on correct usage appreciated or point me to a working example? Thanks!