最近,每次我使用cloudml_train(scrip.R)时,都会收到以下错误错误:
命令['Rscript','/root/.local/lib/python2.7/site-packages/cloudml-model/cloudml/deploy.R']失败:退出代码1
我重新安装了cloudml,问题仍然存在,并尝试在Rprojet内和Rproject外部作为独立脚本运行相同的脚本,并且每次运行都返回相同的错误。
我的会话信息如下:
─ Session info ─────────────────────────
setting value
version R version 3.6.0 (2019-04-26)
os Ubuntu 18.04.2 LTS
system x86_64, linux-gnu
ui RStudio
language (EN)
collate en_US.UTF-8
ctype pt_PT.UTF-8
tz Europe/Lisbon
date 2019-05-12
─ Packages ─────────────────────────────
package * version date lib
assertthat 0.2.1 2019-03-21 [1]
backports 1.1.3 2018-12-14 [2]
base64enc 0.1-3 2015-07-28 [2]
callr 3.1.1 2018-12-21 [2]
cli 1.1.0 2019-03-19 [1]
cloudml * 0.6.0 2018-08-27 [1]
config 0.3 2018-03-27 [1]
crayon 1.3.4 2017-09-16 [2]
desc 1.2.0 2018-05-01 [1]
devtools 2.0.2 2019-04-08 [1]
digest 0.6.18 2018-10-10 [2]
fs 1.2.6 2018-08-23 [2]
glue 1.3.1 2019-03-12 [1]
jsonlite 1.6 2018-12-07 [2]
lattice 0.20-38 2018-11-04 [4]
magrittr 1.5 2014-11-22 [2]
Matrix 1.2-17 2019-03-22 [4]
memoise 1.1.0 2017-04-21 [1]
packrat 0.5.0 2018-11-14 [1]
pkgbuild 1.0.3 2019-03-20 [1]
pkgload 1.0.2 2018-10-29 [1]
prettyunits 1.0.2 2015-07-13 [2]
processx 3.2.1 2018-12-05 [2]
ps 1.3.0 2018-12-21 [2]
R6 2.4.0 2019-02-14 [1]
Rcpp 1.0.1 2019-03-17 [1]
remotes 2.0.4 2019-04-10 [1]
rlang 0.3.4 2019-04-07 [1]
rprojroot 1.3-2 2018-01-03 [1]
rstudioapi 0.8 2018-10-02 [2]
sessioninfo 1.1.1 2018-11-05 [1]
tfruns * 1.4 2018-08-25 [1]
usethis 1.5.0 2019-04-07 [1]
whisker 0.3-2 2013-04-28 [2]
withr 2.1.2 2018-03-15 [2]
yaml 2.2.0 2018-07-25 [2]
我一直在使用以下简单脚本进行测试,它们都在本地运行,没有任何问题:
dir.create("mnist-train")
file.copy(system.file("examples/mnist/train.R", package = "cloudml"), "mnist-train")
setwd("mnist-train")
cloudml::cloudml_train()
library(tfestimators)
load("mtcars.rda")
mtcars_input_fn <- function(data, num_epochs = 1) {
input_fn(data,
features = c("disp", "cyl"),
response = "mpg",
batch_size = 32,
num_epochs = num_epochs)
}
mtcars_input_fn_caret <- function(data, num_epochs = 1){
input_fn(mpg ~ disp + cyl,
data = data,
batch_size = 32,
num_epochs = num_epochs)
}
cols <- feature_columns(
tf$feature_column$numeric_column("disp"),
tf$feature_column$numeric_column("cyl")
)
model <- linear_regressor(feature_columns = cols)
set.seed(40)
indices <- sample(1:nrow(mtcars), size = 0.80 * nrow(mtcars))
train <- mtcars[indices, ]
test <- mtcars[-indices, ]
model %>% train(mtcars_input_fn(train, num_epochs = 10))
model %>% evaluate(mtcars_input_fn(test))
obs <- mtcars[1:3, ]
model %>% predict(mtcars_input_fn(obs))
有人最近在使用cloudml遇到相同的问题吗?我需要在云上训练模型,感谢您的帮助。
欢呼