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.
While Foundry is designed to operate with any machine learning library, it comes pre-packaged with support for a few of the more popular libraries. These libraries operate seamlessly with the ecosystem and have official compatibility guarantees.
To assist with writing models in these libraries and leveraging the parameter options, the foundry_ml library provides a helper function, foundry_ml.help,
to expose relevant metadata around certain classes.
In the code below, suppose you are training a scikit-learn RandomForest and want to know what parameter options you can change when creating a Stage for your random forest.
Copy and paste this code in a Code Workbook Console.