Models in Foundry can be directly published as a function. This approach is similar to functions on models and includes the same benefits, but direct publishing offers a more streamlined, no-code method for operationalizing a model.
To publish a supported model as a Function with a direct model deployment, you must first create a direct model deployment. Once your direct model deployment is running, select the plus + icon in the sidebar and provide a model Function name. This Function will automatically upgrade with each new model version published to the model's branch.
To publish a supported model as a Function through a modeling objective, you must first create a live deployment. Once your model is running, navigate to the Details page of the deployment. From here, the Publish Function card will be visible.
Select the Publish Function button. You will then be guided through the process of setting parameters for the function.
Once your function has been published, the Publish Function card will display which function is backed by the live deployment. As with all functions, you can view your published function in the Ontology Manager, where health information about the deployment is also available.
It is important to be aware that an objective is limited to producing only one function. However, you can still publish new versions of that same function as needed.
When a model is retrained, or the deployment's API changes, you may need to publish a new function version. Below are example cases of when and how to publish a new function version.
When a model is retrained without the model's API changing, there is no need to publish a new function version. The current version will still continue to point to the deployment. However, if you choose to publish a new function version, note that the old function version will continue to work.
If you attempt to release a model with a different model API to a live deployment, the following warning will appear:
Do not ignore this warning. Updating a live deployment to a new model with a different model API will require manual action to fix downstream usage. The dialog will guide you through the process of publishing new function versions for any deployment affected by the release.
Any usages of the current function version will break if you choose not to publish a new function version. To resolve this issue, return to the Details page of the deployment and publish a new function version from there.