Model connectivity & developmentManage a modeling projectModeling deployment FAQDirectly publish models as a function

Directly publish models as a function

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.

Model requirements

  • To support direct publishing, the model must be a model asset.
  • The Model API can only contain Parameter or Tabular inputs.

Publish a model as a Function with direct model deployments

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.

Publish a Function direct model deployment from a model.

Publish a model as a Function in modeling objectives

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.

Function publish card

Select the Publish Function button. You will then be guided through the process of setting parameters for the function.

Publish new function dialog

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.

Ontology manager function view

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.

Publish a new function version

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.

Model retraining

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.

Model API change

If you attempt to release a model with a different model API to a live deployment, the following warning will appear:

API change warning

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.

Publish new function version dialog

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.