Skip to content

Commit 8919ac9

Browse files
author
Larry Franks
committed
note about multiple column return
1 parent 7f012f2 commit 8919ac9

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

articles/machine-learning/how-to-deploy-advanced-entry-script.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,15 @@ def run(Inputs, GlobalParameters):
105105
return error
106106
```
107107

108+
> [!TIP]
109+
> The return value from the script can be any Python object that is serializable to JSON. For example, if your model returns a Pandas dataframe that contains multiple columns, you might use an output decorator similar to the following code:
110+
>
111+
> ```python
112+
> output_sample = pd.DataFrame(data=[{"a1": 5, "a2": 6}])
113+
> @output_schema(PandasParameterType(output_sample))
114+
> result = model.predict(data)
115+
> return result
116+
> ```
108117
109118
## <a id="binary-data"></a> Binary (i.e. image) data
110119

0 commit comments

Comments
 (0)