-
Notifications
You must be signed in to change notification settings - Fork 7
Description
There is a need for sending large data chunks to the server (ML):
https://datashield.discourse.group/t/how-to-pass-models-between-data-scientists-and-nodes-hospitals/440
Instead of working around the current API by serializing the data chunk and passing it as function parameter, the proposal is to add the ability to upload a file from the R/DS client to the R/DS server. It is the responsibility of the server-side function loading analyzing the uploaded file to ensure it is not malicious.
Function definition
The function signature would be:
datashield.upload(conns, source, destination = NULL)
Where:
connsis the list of DS connectionssourceis the path to the local (client) file to uploaddestinationis the path to the destination, relative to the R server session's work directory. It omitted, the destination is the source's file name.
Examples:
datashield.upload(conns, 'someData.rds')
# subfolders are automatically created when needed
datashield.upload(conns, 'someData.rds', 'myfolder/data.rds')The following would fail because destination is not a subfolder of the R server session's workdir:
datashield.upload(conns, 'someData.rds', '/myfolder/data.rds')
datashield.upload(conns, 'someData.rds', '../myfolder/data.rds')A subsequent function call will make use of the uploaded file:
datashield.assign.expr(conns, symbol = "someData", expr = quote(loadMyData('someData.rds')))DataSHIELD node settings
The data manager should be able to disable this file upload feature at the DataSHIELD profile level.