I'm trying to import markdown into AzureML for one of my projects.
This is the function I'm trying to upload into AzureML.
The R.version check is because the function is evaluated in the local environment before uploaded to AzureML.
fun <- function (b5) {
if (R.version[["os"]]=="mingw32" && ! require(talection)) {
install.packages(
"src/rmarkdown_0.9.6.zip",
lib=".",
type="win.binary",
repos=NULL,
verbose=TRUE)
}
ans <- as.data.frame(c("Finished"))
}
rmarkdown_0.9.6.zip is in a miniCRAN library.
The following code is the code that uploads rmarkwodn to Azure ML. Please note the line packages, which tells R to upload rmarkdown to Azure ML.
test <- as.data.frame(
cbind(
c(0.0, 0.3, 0.0, 0.0, 0.0),
c(0.0, 0.0, 0.0, -0.4, 0.0),
c(0, 0, 0, 0, 0))
)
ep <- publishWebService (
ws,
fun = fun,
name = "Talection-fun",
inputSchema = test,
outputSchema = list(
ans = "character"
),
packages = c("rmarkdown")
)
print(consume(ep,test))
The code returns
Request failed with status 400. Waiting 12.7 seconds before retry
Request failed with status 400. Waiting 33.6 seconds before retry
Request failed with status 400. Waiting 76.7 seconds before retry
Request failed with status 400. Waiting 234.3 seconds before retry
Request failed with status 400. Waiting 123.1 seconds before retry
Error: AzureML returns error code:
HTTP status code : 400
AzureML error code : LibraryExecutionError
Any and all relevant suggestions welcome. Thank you.