Creating Predictors
Compiling Functions
Compiling your Python functions.
Function compiles stateless Python functions into self-contained native binaries we call predictors.
These native binaries are implemented directly in low-level languages, and do not rely on the Python runtime (or any other managed runtime).
Compiling a Function
First, decorate your Python function with the compile
decorator:
greeting.py
Next, use the Function CLI to compile the function:
Making a Prediction
Once compiled, the predictor can be used to make predictions across all our supported platforms and SDKs: