Python 2 deprecation / migration to Python 3¶
DataRobot is deprecating and removing Python 2, in its entirety, from the platform. Part of the deprecation process includes migrating all user projects to Python 3. Upgrading to Python 3 will improve platform reliability and security. Additionally it enables the DataRobot development team to modernize the codebase and deliver more innovative features faster and with better quality.
Pay careful attention to the guidance below as it will likely require actions from you and other members within your organization. If at any point you have questions, reach out to your DataRobot representative with any questions and they will gladly assist in any way possible to make the migration a smooth experience.
This guide explains the deprecation process and how to migrate to Python 3.
The Python changes apply to the following users:
- All Managed AI Cloud (SaaS) users.
- All on-premise users (except net-new installations starting with Release 7.1 or later. See the FAQ for more details).
- Time series (AutoTS)
Actions required and important dates¶
As milestones approach, specific dates will be communicated, both via email communications and within this documentation. View the information for your installation in the appropriate tab.
Consider the dates below:
- Starting March 7th, 2022, new projects created on the Managed AI Cloud (SaaS) will use Python 3 by default for model building and predictions.
- Existing projects and models created using Python 2 (created before March 7, 2022) will continue to work as expected.
- Deployments can start using models from Python 3 projects. Deployments are not tied to a specific Python version, only the underlying models are.
- Existing projects and models using Python 2 will start displaying a deprecation notice in the UI as well in the API response between April 15-22, 2022. To reiterate, these projects and models will continue to work as expected while in the deprecated state, however, this is a good time to start planning and executing the migration steps using the guide below.
- It is highly recommended that you compute insights and generate compliance documentation you will require for auditing on these projects prior to project disablement (the milestone below). All data computed within the project will be retained in a read-only state for long term reference.
- Identify your active and important projects that will be impacted with deprecation and make a plan to migrate them by July 2022.
If a formal model audit process is required in your organization, starting this process as soon as possible to avoid future disruptions to any impacted production workloads is strongly recommended.
- Deprecated projects will transition to a “disabled” state and will be placed in read-only mode between July 25-31, 2022.
- Duplication of projects and downloading artifacts such as Scoring Code, models, model packages, and insights charts will still remain enabled. More details are available in the Deprecated and disabled functionality section.
- Existing deployments and predictions will continue to operate (uninterrupted) on Python 2 model deployments within MLOps and Prediction Servers, however, no new deployments can be made with Python 2 models. Migrate your Python 2 model deployments before October 2022 using the guide below.
- Existing or new deployments and predictions on Python 3 models will not experience any impact or limitations.
- Python 2 projects will remain in “disabled” state indefinitely. Duplication of projects and additional capabilities will still be supported, as mentioned in the Deprecated and disabled functionality section.
- Python 2 projects and models will no longer be supported. All project data will be retained in a read-only state. You must replace all critical Python 2 projects and all MLOps model deployments with eligible Python 3 models before October 25, 2022.
|March 7, 2022||Newly created projects and models in these projects use Python 3 by default.||No impact on existing Python 2 model deployments.
Existing or new deployments may use Python 2 or Python 3 models (Python 3 preferable).
|April 15-22, 2022||Projects using Python 2 to be deprecated. No functional impact.||No impact on existing Python 2 model deployments.
Existing or new deployments may use Python 2 or Python 3 models (Python 3 preferable).
|Migrate necessary Python 2 projects and deployments to Python 3.|
|July 25-31, 2022||Projects using Python 2 to be disabled and converted to read-only mode.||No impact on existing Python 2 model deployments.
New deployments will not allow Python 2 models (Python 3 models only).
|Migrate necessary Python 2 deployments to Python 3.|
|October 25, 2022||Projects using Python 2 remain in disabled and read-only mode indefinitely.||Python 2 model deployments to be disabled.||Complete migration in advance of this date.|
Consider the dates below:
Release 8.0 upgrades, starting March 2022
- Identify critical projects that will be impacted and make a plan to migrate them.
If a formal model audit process is required, starting this process as soon as possible to avoid future disruptions to any impacted production workloads is strongly recommended.
- New projects created in Release 8.x will start using Python 3 by default for model building and predictions.
- Existing projects and models created using Python 2 will continue to work as expected.
- Existing projects and models using Python 2 will begin displaying a deprecation notice in the UI as well in the API response. To reiterate, these projects and models will continue to work as expected while in the deprecated state, however, it is best to start planning and executing the migration steps using the guide below.
Prior to Release 9.0 upgrades, March 2023
- Python 2 projects and models will no longer be supported in release 9.x. All project data will be retained in a read-only state. Before upgrading to release 9.x, ensure that all critical Python 2 projects and models are migrated to Python 3 and that any Python 2-based MLOps model deployments have been replaced with eligible Python 3 models.
- Python 2 projects and models created prior to 9.x releases will be disabled once you upgrade to release 9.x. The projects will transition to read-only and new computations will be disabled.
- You are encouraged to compute insights and generate any compliance documentation for auditing purposes on these projects prior to the 9.0 upgrade when these projects will be disabled. All data computed within the project will be retained in a read-only state for long term reference.
Deprecated and disabled functionality¶
Because of outdated dependencies, Python 2 projects will transition first to deprecated and later to disabled. The following table describes the differences.
|Deprecated||No functional impact. A prominent notification will inform users that Python 2 projects will not be supported in the future and that action should be taken to migrate as necessary.||Models and deployments continue to function as expected.|
|Disabled||Further actions on these projects is prevented. Any pre-computed data can be viewed for reference and comparison while migrating to Python 3 and will be retained long-term for audit purposes.||Project and model data is read-only. Any actions involving compute jobs are disabled (e.g., retraining models, adding new models, computing insights charts, etc.). REST API and associated clients will similarly prevent these actions. The following functionality will still be enabled: duplicating projects, and downloading Scoring Code, models, model packages, and insights.
Predictions via the public API will no longer function. You must instead use the Prediction API or Batch Prediction API.
The following functionality is not affected:
- Custom models
- No-code AI Apps
- AI Catalog
- Data Prep
Guide for migrating to Python 3¶
Use the following procedures to migrate projects and deployments. For scenarios not covered, contact your DataRobot representative.
Migrate projects and models using the “Duplicate project” action on the Manage Projects page. This will create a new project using Python 3 from the same dataset and the same advanced options (for eligible project types).
Once copied, you must manually recreate models within the project. You can either:
- Re-run Autopilot to build all models.
- Use Manual mode to build select models from the Repository.
After the Python 2 project is migrated, you can delete the project.
For deployments based on a Python 2 model, you have several options:
|Replace the deployed model with a Python 3 model after creating a new project.||This is the most straightforward option. While it will require time to build new models and perform the model replacement, it will not impact deployment API predictions because model replacements are seamless.|
|Set up an automatic retraining policy for your model to let the DataRobot rebuild and replace the model for you automatically, using the schedule and modeling strategies you specify.||
|Replace the model with a Custom inference model using the Java Drop-in environment and the Scoring Code export for the Python 2 model.||
|Export the model package and use the DataRobot Portable Prediction Server (PPS) to serve predictions within your own environment.||
The following tips will help with the migration process.
Use project tags to keep track of which projects need to be migrated (for example,
py2-to-migrate) and which ones have already been migrated (for example,
Compute any insights charts that you may want to refer to in the future prior to June 2022 so that they are precomputed and will later be available as read-only when the project becomes disabled.
How can I identify which projects and models use Python 2 and are impacted?
For Managed AI Cloud users, any projects created before March 7, 2022 are based on Python 2 and will be deprecated.
By the end of April 2022, you will see a Deprecation alert on the Models tab for affected projects similar to the following:
On the Manage Projects screen, you will see an icon next to deprecated projects:
Currently, it is not possible to retrieve this information using the REST APIs or to see impacted model deployments in MLOps.
For help producing a report, contact your DataRobot representative.
Why is Python 2 being deprecated and removed?
Python 2 was end of life (EOL) in Jan 2020, and the Python Software Foundation stopped providing patches for bugs and security vulnerabilities. It is no longer supported by the community. DataRobot is removing it from the platform entirely to avoid security risks.
The DataRobot platform uses many third-party libraries that have also dropped support for Python 2. Upgrading to newer versions of those libraries requires removing Python 2 support.
Why do projects and models using Python 2 need to be migrated?
To minimize user impact from this change, DataRobot has made as many areas of the platform as compatible as possible. In fact, changes have been rolling out incrementally over the past few years, likely unnoticed. However, to avoid potentially significant incompatibilities in model performance and prediction consistency, it became necessary to make a hard break from old models trained under Python 2.
As the most trusted AI platform, DataRobot wants to ensure that customers are in complete control over managing their AI models and are owners of the decision to replace a model.
What happens to project data for deprecated projects after they are disabled?"
So that it can serve as a reference for auditing purposes, all Python 2 project data will be retained and will be accessible within the application in a read-only state. To ensure thorough audit material, it is highly recommended that you compute insights and generate compliance documentation on these projects prior to the "disabled" milestone.
Will DataRobot still support older on-premise releases that use Python 2?"
Yes. The deprecation of Python 2 does not affect the support policy for on-premise users on supported enterprise releases. DataRobot will continue to honor the Long Term Support (LTS) commitments for those customers.
Beginning with Release 9.0 and going forward, Python 2 will no longer be supported.
I’m a relatively new customer that installed Release 7.1 or later in my on-premise environment. Does this impact me?
Possibly. New on-premise installations since 7.1 using Docker or RPM configurations have been configured to use Python 3 for all projects. In this case, no action is required.
However, Hadoop-based installations (Cloudera, Hortonworks) did not have Python 3 enabled for new projects. In these cases, you will need to migrate projects.
If you have any questions about your install type, contact the IT Admin who performed the install. Ask them to verify that the configuration (
config.yaml) setting for
PYTHON3_SERVICES is enabled. Or, reach out to your DataRobot representative for help verifying the configuration.