Overview on migrating from foundry_ml to palantir_models

The Python library foundry_ml has started its sunset period. The foundry_ml library will be deprecated on October 31, 2025, corresponding with the planned deprecation of Python 3.9. In its place, we recommend using the palantir_models framework to develop, test, and serve models in the platform. palantir_models comes with a number of improvements, including simplified and improved dependency management, immediate deployability without Modeling Objectives, increased API flexibility, and first-class support for more modeling frameworks. Additionally, palantir_models is supported in both Code Repositories and Jupyter® notebooks.

Models trained with foundry_ml need to be updated to use the palantir_models library by October 31, 2025 — either by training a new model or by wrapping the existing model in a model adapter. Additionally, models built with foundry_ml in Code Workbooks need to be rebuilt in Jupyter® Code Workspaces or Code Repositories. For guidance on building a new model with palantir_models, review how to train a model in Code Repositories or how to train a model in Jupyter® notebooks.

Note that palantir_models does not support Spark ML models, which will need to be migrated to scikit-learn or a similar single-node framework.

Upgrade campaigns

Model migration campaign

Campaign details

A first campaign, out of two campaigns, will be published in Upgrade Assistant to help users migrate away from dataset-backed models. Only models that are in use will be flagged for review, while others will be marked as Ignored and filtered out from the campaign view by default.

Users will be able to designate a model asset replacement for a dataset-backed model directly from the dataset-backed model page. This information will be used by Upgrade Assistant to determine the migration status of the resource. Models with an identified replacement will have a status of Completed and will be filtered out from the campaign view by default. More generally, using this feature is recommended to direct consumers of the model to its replacement in the new framework.

To learn more:

  • Review this example to learn how to migrate between the two frameworks;
  • Review the migration FAQ for more details on how the migration works.

AIP-powered code suggestions

In environments where AIP is enabled, users will benefit from code migration suggestions powered by a Large Language Model (LLM) through AIP. These suggestions can be viewed by selecting the purple icon, as depicted below. The generated code can then be copied using the clipboard icon above each file.

AIP-powered code suggestions.

While the LLM is able to help users to get started with migration, you will likely need to modify the code you are provided by the LLM in order to pass checks and produce a working model. Make sure to thoroughly review the code and the model outputs.

Consuming resources migration campaign

A second campaign will be published no later than April 2025 to surface resources which consume deprecated dataset-backed models. These resources include: