The below documentation describes the foundry_ml
library which is no longer recommended for use in the platform. Instead, use the palantir_models
library. You can also learn how to migrate a model from the foundry_ml
to the palantir_models
framework through an example.
The foundry_ml
library will be removed on October 31, 2025, corresponding with the planned deprecation of Python 3.9.
Models that are backed by Functions can only be deployed to Live deployments, which may not be enabled in your environment by default. Contact your Palantir representative to have this functionality enabled.
Functions can be submitted to modeling objectives and can be fully managed and deployed as models. This allows you to:
There are a few requirements for a Function to be compatible with modeling objectives:
@ModelFunction
decorator. Ensure that enableModelFunction
is set to true
in the functions.json
file in your Function repository.See below for an example Function signature that would be compatible with modeling objectives.
Copied!1 2 3 4 5 6
import { Integer, ModelFunction, String } from "@foundry/functions-api"; @ModelFunction() public myFunction(input1: Integer, input2: String): { output1: String } { ... }
After authoring your model, you can submit it to an objective.
If you plan on submitting a Function to an objective that has an objective API, the parameter names must match exactly. In the example snippet above, that would mean input1
and input2
are defined as your objective inputs and output1
is defined as your objective output.