Skip to content
This repository has been archived by the owner on Oct 28, 2019. It is now read-only.

publishWebService without executing "fun" locally #126

Open
ckarras opened this issue Jun 5, 2017 · 2 comments
Open

publishWebService without executing "fun" locally #126

ckarras opened this issue Jun 5, 2017 · 2 comments
Labels

Comments

@ckarras
Copy link

ckarras commented Jun 5, 2017

In many of my tests with publishWebService, it failed because it's trying to execute locally the function to publish, using a subset of the data (hard coded to head(inputSchema)). This subset is often inappropriate (5 rows could be insufficient to execute some functions, not cover enough data to cover all cases, etc)

Question: Why exactly does the function need to be executed locally before publishing the service?
Would it be possible to allow bypassing this execution by specifying explicitly anything that is discovered dynamically by invoking the function?

@andrie
Copy link
Contributor

andrie commented Jun 5, 2017

The function runs only to make a best guess on the schema that the webservice should use for returning results.

You can define this schema by hand and pass it as the argument to the outputSchema.

@andrie andrie added the question label Jun 5, 2017
@ckarras
Copy link
Author

ckarras commented Jun 6, 2017

I already specified outputSchema, but the function is still invoked locally. Is there another option I need to set?

Example:
ep <- publishWebService(ws, fun = testAzureMLWebService, name = "test azureml web service",
inputSchema = inputSchema,
data.frame = TRUE,
outputSchema = outputSchema,
packages = c("zoo","reshape")
)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants