skops
skops copied to clipboard
Add `private: bool` to hub_utils.push
Probably a good idea to allow users to push to a private repo if they want to, by accepting a private: bool
attribute on hub_utils.push
.
How about push
just forwarding all kwargs
to upload_folder
?
We call create_repo
and upload_folder
though.
I just saw that upload_folder
had a lot of arguments set to None
so that seemed more important to me. Alternatively, we could accept two dicts as arguments, one passed to create_repo
and one to upload_folder
as kwargs
. Picking individual arguments such as private
and only supporting those makes it a guessing game which ones are most important, and also is more work when the API is extended in the future.
I very much agree with that, but I think some parameters might be much more used than others, and exposing two dictionary arguments for two underlying method calls kinda seems like we're exposing users to a lot of implementation details. Don't you think?
I see your point. In the end, when providing an abstraction like push
, we have to balance convenience and flexibility. If we're unsure, we can proceed by only adding private
for now, it would still be possible to add more flexibility later.