Function Lifecycle
Cloud “functions” are an abstraction that allows you to run your code without managing deployments and infrastructure. Cloud Functions simplifies hosting AI inference and fine-tuning workloads in the cloud by automatically enabling access to GPU capacity and autoscaling. Cloud functions are generally considered stateless.
Therefore, function authors are only responsible for maintaining their AI models and associated code. This is highlighted in the diagram below in green. To use Cloud Functions, you create a function, then define a deployment specification for it, and deploy it on one of the available GPU-backed clusters hosted by NVIDIA.

A Cloud Functions account can contain multiple functions, each with multiple function versions. Each function created also creates a single function version.
Cloud Functions supports function invocation (calling of the function’s inference endpoint) at the function ID level or the function version ID level. You can create a single function and version and invoke only this function version, or create multiple versions of the same function and spread invocation across all versions.
Key Concepts
See below for an overview of some key basic concepts within Cloud Functions.
Function States
A function can be in any of the following states:
ACTIVE- If the function can receive invocations. Only when a function isACTIVEorDEGRADINGcan it be invoked.ERROR- If all function instances are in an ERROR state.INACTIVE- When a function is created but not yet deployed, it isINACTIVE. When a function is undeployed, the state is changed fromACTIVEtoINACTIVE.DEPLOYING- When a function is being deployed and the instances are still coming up to reach the minimum instance count.DEGRADING- IfACTIVEis losing its instances and number of active is below deployment configuration fieldminInstance, but there are some active instances. In this state a function can be invoked. When it gets back all required instances, it will beACTIVEagain.DEGRADED- IfACTIVEorDEGRADINGhas lost all its instances. In this state a function can NOT be invoked. When it gets some instances it will be backDEGRADING. When it gets back all required instances, it will beACTIVEagain.
Workflow
The workflow when using Cloud Functions is usually as follows.
- Function Creation: Define your function with a container, or helm chart.
- Function Deployment: Deploy your function on a cluster.
- Function Invocation: Invoke your function’s inference endpoint.
- Function Management: Manage your deployed function, for example, add new versions.
Function Lifecycle Endpoints
Function Creation, Management & Deployment
The table below provides an overview of the function lifecycle API endpoints and their respective usages.
Function Metadata
When using the Cloud Functions API to create a function, it’s possible to specify a function description and a list of tags as strings as part of the function creation request body. This metadata is then returned in all responses that include the function definition. This is an API-only feature at this time. Please see the open-api for usage.
Function Invocation
The table below provides an overview of the Function invocation API endpoints and their respective usages.
Read more about using the invocation API in the Function Invocation section.