Save model to private by default via push_to_hub()

Hi Team,

I noticed that when using the .push_to_hub() method via a notebook, the model will be pushed to the HF Model Hub and set to public.

After logging in you can set your models to private manually by using the UI. I was wondering if there is an option to:

  • set all uploaded models to private by default
  • add an argument to the push_to_hub function to make it private

Thanks & keep up the good work!

Hi!

In TrainingArguments, you can set the hub_private_repo parameter to True to push your model privately to the Hub.

2 Likes

Thanks, yep… That’s what I needed.