justinnewton987
justinnewton987

Reputation: 1

cloudml R package--bash errors prevent it working

I've been trying to use Google Cloud Machine Learning to work with R via the cloudml package. I've installed Anaconda for Python 2.7, R, and Rstudio, as well as Google Cloud SDK, and the cloudml package in R.

However, when I try to run cloudml_train on my script, I receive weird command line prompt errors. I'm running windows, and what seems to be the issue is that there are spaces in some path names that cause the command line items to fail. For example Google Cloud SDK created a folder at this location:

C:\Program Files (x86)\Google\Cloud SDK\google-cloud-sdk\bin\gcloud.cmd

There are spaces and parentheses in that path, and when I try to run cloudml_train, I get the error:

bash: syntax error near unexpected token '('

But I'm not the one who put the files in that location, the Google installation package did. What can I do to get these paths to work correctly?

Thanks for any help.

Edited to add--Specifically, my steps are:

devtools::install_github("rstudio/cloudml")
library(cloudml)
gcloud_install()

where I install to the default file location. I also initialize Google Cloud, though I do not install the included Python because I already have Anaconda.

Then I try to use it on a test script:

cloudml_train('test_script.R')

And the result I get in the terminal is:

/tmp/RtmpsbRxRp/cloudml-deploy-test_project-47d412f365f3
$ C:\Program Files (x86)\Google\Cloud SDK\google-cloud-sdk\bin\gcloud.cmd --account justinnewton9
[email protected] --project deeplearning-199301 ml-engine jobs stream-logs cloudml_2018_03_30_03083631
7 --polling-interval=5 & "C:/PROGRA~1/R/R-34~1.4/bin/x64/Rscript" -e "cloudml::job_collect('cloud
ml_2018_03_30_030836317', destination = 'C:\Users\newto\Documents\R\test_project\runs', view = 's
ave')" & "C:/PROGRA~1/R/R-34~1.4/bin/x64/Rscript" -e "utils::browseURL('C:\Users\newto\Documents\
R\test_project\runs/cloudml_2018_03_30_030836317/tfruns.d/view.html')"
bash: syntax error near unexpected token `('

There's nothing meaningful in the test script. Just seems like it gets thrown off by the presence of a parenthesis in the file path, even though this is a normal thing for Windows.

Upvotes: 0

Views: 254

Answers (1)

Javier Luraschi
Javier Luraschi

Reputation: 912

Try reinstalling cloudml for R using devtools::install_github("rstudio/cloudml"), there is a recent fix that should solve this for you. Otherwise, please update your question with the exact output to help us troubleshoot this and consider opening a GitHub issue directly in the cloudml for R repo: https://github.com/rstudio/cloudml/issues.

Upvotes: 1

Related Questions