Installation and configuration

更新时间:
复制 MD 格式

PAI SDK for Python provides easy-to-use high-level APIs and enables Artificial Intelligence (AI) and machine learning engineers to train and deploy models in Platform for AI (PAI) in an efficient manner. PAI SDK for Python is used in the entire AI and machine learning process.

Prerequisites

Install

Run the following command to install the PAI SDK for Python. Use Python 3.8 or later.

pip install "alipai>=0.4.0"

Initialization Configuration

Run the following command on your CLI and perform the following operations to configure the required parameters:

# Run the following command in the CLI after the SDK is installed. 
python -m pai.toolkit.config

The following example shows how to configure permissions using python -m pai.toolkit.config:

image..png

If an output similar to Configuration saved successfully: <Path to which the configurations are saved> is displayed, the configuration is complete.

References

After completing the initialization configuration, you can train a model. For more information, see Submit a training job.