You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello! Thank yo for this amazing packages! I trained a Keras model on my laptop, bundled it, uploaded it to our POSIT Workbench environment, and then tried to use it for predictions. Unfortunately, I got the error:
Error in if (tensorflow::tf_version() < "2.0.0") stop("TensorFlow version >= 2.0.0 is requires to load models in the SavedModel format.", :
argument is of length zero
My guess it's because we don't actually have TensorFlow installed on the POSIT Workbench servers (e.g., install_tensorflow(); install_keras()) even though we have both TensorFlow and Keras packages installed. tensorflow::tf_version() returns NULL.
Is there any way to use bundle to get predictions from a Keras model without installing TensorFlow / Keras? Our IT folks say it'll probably be 6-9 months before they can get around to that :/
Unfortunately, bundling only solves the problem of how you serialize your model, not the software that you then need to use the model. For example, you likely will need bundle to store an xgboost model and use it in a new R session because of how xgboost works, but you also still need xgboost.
Thank you for your lightning-fast response! That's kind of what I figured. Thankfully, it looks like I can get around it by using torch and luz which don't require IT to do anything :) And even more thankfully, your bundle package handles those beautifully! Thanks for this amazing package!
Hello! Thank yo for this amazing packages! I trained a Keras model on my laptop, bundled it, uploaded it to our POSIT Workbench environment, and then tried to use it for predictions. Unfortunately, I got the error:
Error in if (tensorflow::tf_version() < "2.0.0") stop("TensorFlow version >= 2.0.0 is requires to load models in the SavedModel format.", :
argument is of length zero
My guess it's because we don't actually have TensorFlow installed on the POSIT Workbench servers (e.g., install_tensorflow(); install_keras()) even though we have both TensorFlow and Keras packages installed. tensorflow::tf_version() returns NULL.
Is there any way to use bundle to get predictions from a Keras model without installing TensorFlow / Keras? Our IT folks say it'll probably be 6-9 months before they can get around to that :/
Thanks!
Non-reproducable code:
On my laptop:
bundled_NNModel <-
bundle(NNModel)
save(bundled_NNModel,file="bundled_NNModel.RData")
After uploading to the server....
load("bundled_NNModel.RData")
library(keras)
r(
function(model_bundle, new_data) {
library(bundle)
},
args = list(
model_bundle = bundled_NNModel,
new_data = as.matrix(testfeatures)
)
)
The text was updated successfully, but these errors were encountered: