Function Management
Function Versioning
Each time you create a new function a function ID will be created along with a function version ID. You can create additional versions of this function by specifying other models/containers/helm charts to use and additional configurations etc. Here is a sample API call:
1curl -X 'POST' \
2'https://api.nvcf.nvidia.com/v2/nvcf/functions/$FUNCTION_ID/versions' \
3 -H 'accept: application/json' \
4 -H 'Authorization: Bearer $API_KEY'
5 -d '{
6 "name": "echo_function",
7 "inferenceUrl": "/echo",
8 "containerImage": "nvcr.io/$ORG_NAME/echo:latest",
9 "apiBodyFormat": "CUSTOM"
10}'
Multiple function versions allow for different deployment configurations for each version while still being accessible through a single function endpoint. Multiple function versions can also be used to support A/B testing.
Warning
Function versioning should only be used if the APIs between the various versions are incompatible. Different APIs should be created as new functions.