Currently run() adds two square brackets "[[" and "]]" around the REST request to the task. It should do this only if a csv is supplied (for the sklearn cases), and not if it's called using "pb" or "raw". Thus, currently sclblpy.run() does not work on pipelines generated from sclblonnx.
Suggested fix:
Always supply data_type= to Scailable run(), with default "pb"
Also add support for "raw" (which is just raw base64 encoded byte array).
Make sure that all sklearn examples and test are updated to say "csv".
CSV:
payload = "{\"input\":{\"content-type\":\"json\",\"location\":\"embedded\",\"data\":\"{\\\"input\\\": [[" + data + "]]}\"},\"output\":{\"content-type\":\"json\",\"location\":\"echo\"},\"control\":1,\"properties\":{\"language\":\"WASM\"}}"
Explicitly add type="csv"
raw:
payload = "{\"input\":{\"content-type\":\"json\",\"location\":\"embedded\",\"data\":\"{\\\"input\\\": " + data + ", \\\"type\\\":\\\"raw\\\"}\"},\"output\":{\"content-type\":\"json\",\"location\":\"echo\"},\"control\":1,\"properties\":{\"language\":\"WASM\"}}"
Note the raw type in the data field.
PB:
payload = "{\"input\":{\"content-type\":\"json\",\"location\":\"embedded\",\"data\":\"{\\\"input\\\": " + data + "}\"},\"output\":{\"content-type\":\"json\",\"location\":\"echo\"},\"control\":1,\"properties\":{\"language\":\"WASM\"}}"
Currently run() adds two square brackets "[[" and "]]" around the REST request to the task. It should do this only if a csv is supplied (for the sklearn cases), and not if it's called using "pb" or "raw". Thus, currently sclblpy.run() does not work on pipelines generated from sclblonnx.
Suggested fix:
data_type=
to Scailable run(), with default "pb"CSV:
raw:
PB: