RevolutionAnalytics / AzureML

An R interface to AzureML(https://studio.azureml.net/) experiments, datasets, and web services.
Other
46 stars 22 forks source link

Automatic discover of data frame classes in publishWebservice() throws error #51

Closed andrie closed 8 years ago

andrie commented 8 years ago

Example:

ws <- workspace()

library(lme4)
set.seed(1)
model <- lmer(Reaction ~ Days + (Days | Subject), data=sleepstudy[sample(nrow(sleepstudy), 120),])
p <- function(newdata){
  predict(model, newdata=newdata)
}

ep <- publishWebService(ws, fun = p, name = "sleepy lmer 2",
                        inputSchema = sleepstudy,
                        data.frame=TRUE
)

Result:

 Error: sum(nb) == q is not TRUE 
andrie commented 8 years ago

This seems to be a problem with the lmer example, not publishWebservice()

predict(model, head(sleepstudy, 1))

also throws the error

Error: sum(nb) == q is not TRUE
andrie commented 8 years ago

Fixed this by using head(test) rather than head(test, 1).

Somewhat brute force, but works for all the examples and tests I've tried