-
Notifications
You must be signed in to change notification settings - Fork 555
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Automatically obtain organization in keras push_to_hub #652
Comments
Full example !pip install huggingface_hub
!huggingface-cli login
!apt-get install git-lfs
!git-lfs install
import tensorflow as tf
import huggingface_hub
model = tf.keras.models.Sequential()
model.add(tf.keras.layers.Dense(2, activation="relu"))
model.compile(optimizer="adam", loss="mse")
model.build((None, 2))
from huggingface_hub import push_to_hub_keras
# Goal: this should be pushed to keras-io org
push_to_hub_keras(model, "keras-io/example") |
As discussed internally, maybe we can have a deprecation that will simplify the usage to something more intuitive for users Actual
Maybe this would be a good alternative
WDYT @merveenoyan @LysandreJik @nateraw ? |
I think that clarifies things significantly. An unfortunate behavior linked to this is that it hides the fact that there's a clone/pull/push happening behind the scenes. Except it's not really behind the scenes, as IIRC it takes place in the current working directory. I think ideally this would work with http requests that push files (#321), but these files can only be of 20GB. Maybe 20GB is more than enough for what we're looking for, however. |
Yes let's close this |
If I do this, my model gets pushed to osanseviero/test-osan6
It would be great if we can automatically detect the organization. We can likely do it similar to https://github.com/huggingface/huggingface_hub/blob/main/src/huggingface_hub/keras_mixin.py#L145-L146.
The text was updated successfully, but these errors were encountered: