I am using Rstudio on Google cloud Compute engine and using examples on
https://tensorflow.rstudio.com/keras/
My final objective is to be able to deploy R - model to AI platform and get predictions out of it. I have tried many examples using keras,tfestimators,tensorflow but none of them are able to run completely. All of the only run till training but when Its time to export_savemodel() they all fail. Local prediction,evaluation works fine.
model %>% evaluate(x_test, y_test) # work fine in Rstudio
model %>% predict_classes(x_test) # work fine in Rstudio
Want my model version to appear here.
Issues:
After completing the training , I am unable to export model to GCS bucket as command for this is failing.
export_savedmodel(model, "savedmodel")
Error message:
Error in export_savedmodel.keras.engine.training.Model(model,"savedmodel") :
'export_savedmodel()' is currently unsupported under the TensorFlow
Keras implementation, consider using 'tfestimators::keras_model_to_estimator()'.
Then I changed my code to below but still get error message:
library(tfestimators)
tfe_model <- tfestimators::keras_model_to_estimator(model)
export_savedmodel(tfe_model, "savedmodel")
Error:
Error in export_savedmodel.tf_estimator(tfe_model, "savedmodel") :
Currently only classifier and regressor are supported. Please specify a
custom serving_input_receiver_fn.
What I need:
How can I fix the issue ?
Or any guidance on how to deploy R packages on Google cloud platform will be appreciated.
Related
I have created an R application and i have load an deep learning model which i have created on kaggle and now using on windows pc but everytime i load this model i get this 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
this model is able to load on kaggle but getting error on my windows PC can someone tell me what could be wrong in my PC
I am using the steps to install the packages as in https://github.com/huizezhang-sherry/quickdraw/ which has worked fine so far. However, as I try to use the qd_read() I keep getting an error
octopus <- qd_read("octopus")
Error in gsutil_binary() : failed to find 'gsutil' binary
Anyone know what this means?
this is my first post so please be kind to me and my poor English.
I'm interested in running this code (this is just the script). It seems that running the code without customizing it is not possible but I don't understand what I should change.
Maybe I just installed Spark badly? I'm using the latest version of RStudio, this text says this but I don't understand if the latest version is suitable.
Please note that sparklyr version 0.7.0+ (available on GitHub, but not
yet released on CRAN) is needed.
I can tell you that the error occurs when it arrives in this line of code.
# Apply Spark configuration settings from R markdown document parameters
spark_param_names <- grep("spark.", names(params),
fixed = TRUE, value = TRUE)
the error is the following
Error in shell_connection(master = master, spark_home = spark_home, app_name = app_name, :
Failed to connect to Spark (SPARK_HOME is not set).
I'm a student and I'm not very experienced thanks for your patience
I am working on a twitter sentiment analysis for which I have used R to run the sentiment for me. I am referring to very helpful article from Bora Beran here:
Sentiment Analysis
I was successfully able to run the R script yesterday using R server and even the sentiments worked fine. But today the same script shows the error as "could not find classify_polarity().
Please note I have downloaded the sentiment package from archive in R and it is working fine in R Studio. Similarly I have checked the connection in Tableau and it shows connection successfully.
Made some changes to the script as :
SCRIPT_STR('library(sentiment);
classify_polarity(.arg1,algorithm=”bayes”,verbose=TRUE)[,4]',
ATTR([Status Text]))
The error I get is written down below and this png file shows it in Tableau. Please advice what could be the possible issue.
Error in base::parse(text= .cmd):
<text>:2:36: unexpected input 1: library(sentiment);
2: classify_polarity(.arg1,algorithm= �^
I've been trying to produce Kernel Density Estimates using the "kde" tool from
Geospatial Modeling Environment (GME, see documentation on kde). But I keep getting the following error regardless of valid input:
Code:
kde(in="C:\Users\Richard\Desktop\KDE_Scripting_Local\kde.gdb!BB_90sJAN",
out="C:\Users\Richard\Desktop\KDE_Scripting_Local\kde.gdb!KDE_BB90sJAN",
bandwidth="100000", cellsize=6000, kernel="QUARTIC",
ext="C:\Users\Richard\Desktop\KDE_Scripting_Local\kde.gdb!rect_extent");
Error message:
Error: The command text could not be interpreted. Please check the syntax of the command. Error: An important error has occurred. Please include the information below if you submit a query about this error.
Exception from HRESULT: 0x8004025A
The most frustrating part is that I had this exact code working last week. I tried restarting, reinstalling GME, copying the input to a new GDB as suggested here, subprocesses with PYTHON 2.7. Everything still produces this error with the same HRESULT.
I'm running GME Version 0.7.3.0, ArcGIS For Desktop 10.2.2, R Version 3.1.1, and Python 2.7 on Windows 7. There's not much community support for GME, so any help here would be much appreciated.