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
Keras - Supporting load/save models and weights to Google Storage #36453
Comments
@kim-sardine Please check this resource which explains clearly how to save the model in the Google Storage. Thanks! |
I just wondered if I can save model in Google Storage in one line. |
BTW, It won't be easy because |
This feature as been enabled in regular keras. Shouldn't be hard to move it here. |
Having a one liner to load from GCS buckets would be highly desirable. It seems like a regression especially given that |
This feature would be extremely helpful. |
@gadagashwini @jvishnuvardhan I think this issue should be reopend, as the stack overflow post you linked only worksaround the fact that |
@lgeiger Sure. Reopening this issue considering the comments above. Thanks! |
@k-w-w This issue has been tagged as 2.1, has there been any progress on it so far? |
What is the status of this one so far? Would love to jump in. |
I have been able to serialize tf.saved_model.save(model, export_module_dir) where One can load back the model similarly like - model = tf.saved_model.load(export_module_dir) Here's an example that benefits from this. This is doable from a Colab Notebook as well provided you have performed the authorization steps. This should look something like the following: from google.colab import auth
auth.authenticate_user() I hope this helps. |
@sayakpaul That is correct, the |
True that. On a personal level, I think serializing your model as a |
@sayakpaul Could you tell me how to save model in |
@aginpatrick You can store Keras model checkpoints to google storage by creating a custom GCS callback as shown here |
It seems it's now possible to save model to Google Storage without the GCS
callback. The problem I have now is that the custom signatures that I've
created are not saved. My post on SO is here
<https://stackoverflow.com/questions/74747394/keras-model-custom-signatures-are-not-saved-when-learning-is-done-on-gcp>.
…On Thu, Dec 15, 2022 at 5:54 PM gowthamkpr ***@***.***> wrote:
@aginpatrick <https://github.com/aginpatrick> You can store Keras model
checkpoints to google storage by creating a custom GCS callback as shown
here
<https://www.kaggle.com/code/subrahmanyajoshi/save-keras-model-checkpoints-to-cloud-storage>
—
Reply to this email directly, view it on GitHub
<#36453 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABM6JSC3UN7YQAJI6NID57LWNOOQ7ANCNFSM4KPQHCUQ>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
I want to save / load my keras model to / from Google storage bucket.
my environment : docker image - tensorflow/tensorflow-latest-py3 (tensorflow 2.1.0, python 3.6.9)
and I got this error message
I found this PR in keras repository, supporting above behavior. but It seems like that it's not implemented in
tensorflow.keras
.Do you have plans to support it? or, are there any alternatives in tensorflow?
The text was updated successfully, but these errors were encountered: