cloudml icon indicating copy to clipboard operation
cloudml copied to clipboard

running script yields strsplit error

Open datengefluester opened this issue 5 years ago • 3 comments

Hi, I am trying to reproduce a tutorial for the package, which I found on youtube. However, when I try to submit a training file, I get the following error:

Submitting training job to CloudML...
Error in strsplit(a, "[.-]") : non-character argument

so far my toy code looks as follows:

library(cloudml)
gcloud_init()
cloudml::cloudml_train("test.R", config = "cloudml.yml")

where 'test.R' is basically the toy example from the 'xgboost' package:

library(xgboost)

data(agaricus.train, package='xgboost')
data(agaricus.test, package='xgboost')

train <- agaricus.train
test <- agaricus.test
bstSparse <- xgboost(data = train$data, label = train$label, max.depth = 2, eta = 1, nthread = 2, nrounds = 2, objective = "binary:logistic")

saveRDS(bstSparse, "bstSparse.rds")

the cloudml.yml contains the following (deleting everything but runtime, which is needed to prevent another error, does not solve the issue):

trainingInput:
  scaleTier: CUSTOM
  masterType: large_model
  runtimeVersion: 2.2

Here's some session info (I tried R 3.4.4 earlier but I got the same error):

sessionInfo()
R version 4.0.3 (2020-10-10)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Ubuntu 18.04.5 LTS
cloudml_0.6.1

Any idea of what's wrong?

datengefluester avatar Oct 26 '20 15:10 datengefluester

I have pretty much the same problem. I would be very much interested to see a resolution.

alpopesc avatar Dec 13 '20 05:12 alpopesc

the error comes from "runtimeVersion: 2.2"

as specified on https://cloud.google.com/ai-platform/training/docs/reference/rest/v1/projects.jobs#traininginput

you have to pass 2.2 as a string therefore use the following: runtimeVersion: "2.2"

data-vader avatar Dec 25 '20 19:12 data-vader

@data-vader This solved the issue! Thank you so much!

datengefluester avatar Dec 27 '20 11:12 datengefluester