-
Notifications
You must be signed in to change notification settings - Fork 220
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
Trouble saving models #147
Comments
To add a bit more context, finding a way to use One option is calling the As mentioned in another comment to #142, the hyper-parameter placeholders seem to be irrelevant inputs for prediction, but I'm not sure how to specify the input nodes for user and item features. E.g., using Does anyone know how to do this or anything similar? |
A quick follow-up: The huge model size seems to a result of how TensorFlow handles numpy data; see this link: https://www.tensorflow.org/guide/datasets#consuming_numpy_arrays I had been using training data in sparse matrix format, which gets converted to numpy arrays here: tensorrec/tensorrec/input_utils.py Line 22 in 3e7dfe8
One way around this is to save the training data first in TFRecord format. One caveat here is that it is easy to run out of memory during training unless batching is enabled. Since the As for obtaining a |
I'm trying to export a model trained on a dataset with the following features:
#users: 700K
#user features: IDs only
#items: 30K
#item features: IDs only
#interactions: 56M
The model uses the default architecture except for WRMB loss, and was trained for only 5 epochs.
I've tried to export the model in 2 ways.
TensorRec.save_model
. The problem here is that apparently the model is enormous, since I get this error:InvalidArgumentError: Cannot serialize protocol buffer of type tensorflow.GraphDef as the serialized size (11399300521bytes) would be larger than the limit (2147483647 bytes)
pickle
the model directly. The cause of this problem is less clear to me, but a Google search reveals many similar issues. The error isTypeError: can't pickle _thread.RLock objects
Any advice on how to get around these issues would be greatly appreciated!
The text was updated successfully, but these errors were encountered: