image
Services Provided by PAI

The course is part of this learning path

Start course
Difficulty
Intermediate
Duration
49m
Students
83
Ratings
5/5
starstarstarstarstar
Description

This course explores Alibaba Cloud PAI, aka Platform for Artificial Intelligence. First, we'll look at the concepts and architecture of PAI. Second, the characteristics and advantages of PAI. Third, we will introduce several main services provided by PAI, and last, you will follow along with a practical demonstration from the Alibaba Cloud platform showing you how to carry out some basic operations in PAI.

Transcript

In the third part, we will introduce some of the main services that PAI provides. The first is PAI-Studio. In our previous introduction, we know this is a visual development tool for users to build machine learning experiments without basic coding knowledge. At the same time, it is integrated with a large number of machine learning algorithms and applications, which can be applied in commodity recommendation, financial risk control, advertising prediction, and other practical scenarios meeting the needs of the business well.

PAI-Studio has several advantages as follows. The first is visual development, supporting dragging and dropping components to build a model without a tedious process of coding. The second is abandoned algorithm components, including a large number of traditional machine learning and deep learning components, as well as data processing, statistics, and other modules, which can meet all aspects of the construction of artificial intelligence experiments and applications. The third is AutoML, automatic parameter adjustment, supporting base, PBT, user defined, and other seven parameter adjustment methods supporting automatic parameter optimization, eliminating the tedious manual parameter adjustment process. The fourth is supporting user defined algorithms.

In addition to the algorithms and components provided by PAI, users can develop their own algorithm packages according to their actual needs, upload them to the platform, and use them as customized components. This is an example of visual modeling using PAI-Studio. It's a binary classification task using Linear Support Vector Machine algorithm in which the data source, classification algorithm, prediction, and evaluation parts are encapsulated into visual components, and the components are connected according to the task flow to form a complete experiment. A series of parameters can be set on the right interface. After the completion of the experiment construction, click done at the top of the interface to run it directly. The experiment results can be viewed by right clicking in the prediction and evaluation component.

Next, we will introduce PAI-DSW whose full name is data science workshop. It is a cloud-based deep learning development IDE that provides an interactive programming environment for developers of all levels. It integrates with JupyterLab, an open source interactive programming environment that allows you to write and develop deep learning code online through the platform. You can write, debug, and run Python code without any operational configuration with notebook.

PAI-DSW is pre-installed with the commonly used big data development package and algorithm package, and supports the commonly used deep learning frameworks, which can meet needs of most development task. Users can also install third-party libraries according to their needs. In addition, PAI-DSW supports CPU and GPU resources at the same time, if the pay as you go method is chosen, the user's input is determined by the model, specification, and use each time of computing resources. Users can monitor CPU and GPU usage conditions through the real time resource monitoring provided by PAI-DSW. The specific function and usage of PAI-Studio and PAI-DSW will be introduced in the next two sections.

The third service, PAI-EAS is an online prediction service called elastic algorithm service. With PAI-EAS, You can quickly deploy the model as a RESTful API and invoke the service as an HTTP request. REST or representational state transfer is a set of design principles for network applications. It has some uniforms specifications in resource formats, interfaces, UI, and other aspects, which can reduce the complexity of development, and improve the scalability of the system. RESTful API is freestyle interface. With PAI-EAS, models can be deployed quickly and formally without manual setup.

With PAI-EAS, users can obtain highly concurrent and stable online algorithm based model services at a low resource cost through elastic, scalability, and blue-green deployment functions. In deep learning, it is possible that a large number of GPU resources are needed for computation, and GPU resources are often expensive and require a great economic and time cost. Ali Cloud Container Service supports elastic expansion, and construction function.

When there's a computing peak, and the GPU computing resources, and the cluster do not meet the demand, the instance can automatically pop up according to the demand amount, and be added to the cluster to deal with the shortage of resources in a timely way. When computing tasks are completed, GPU resources are left idle and can be recovered in time to save costs. Blue-green deployment refers to running two versions of the application at the same time. When one version is upgrading, there's no need to stop the old version. After the new version runs successfully, service will be switched to the new version so that the service can run continuously.

PAI-EAS can provide the capability of blue-green deployment to ensure the stable operation of services. When the model service is applied to the business, PAI-EAS provides resource group management, version control, and resource monitoring, and other functions. It not only supports the deployment of the model to the public resource group provided by the system, but also supports users to create and manage their own exclusive resource group.

On the PAI-EAS console page, you can manage model services, debug, monitor, expand, start, stop, and delete models. This is the resource monitoring interface of PAI-EAS. Users can easily monitor the usage of computer resources, such as CPU consumption, GPU authorization, memory consumption, etc. Our last service is PAI-AutoLearning. It is an automatic machine learning platform that also works well with PAI-EAS, making it easy to deploy models as RESTful API services.

PAI-AutoLearning supports the following functions. Online labeling, automatic model training, superparameter optimization, and model evaluation. Users only need to prepare a small amount of data and set the training time to get a deeply optimized model. The tasks that can be realized with PAI-AutoLearning include image classification, target detection, OCR recognition, recommendation, and recall, etc.

Next, we will take the image classification task of platform as an example to introduce the operation process of PAI-AutoLearning. It is a model training task with a very small amount of data. We had 33 images of a alpacas, horses, and mules in total. First, we annotate the data and give each data a specific label, create a label on the left, select the label from the list, and take the corresponding picture to complete data labeling process. After data labeling is completed, we begin to train the model.

In PAI-Auto-Learning, model training is done automatically. We only need to set an upper limit for the training time. In the process of training, the progress bar shows the progress of training, and users can also know the specific training condition through the training log. After the training is completed, we can check the evaluation indexes such as precision, recall, and F1 value. After the training is completed, we can choose model trial to have a test of the model. A picture of alpaca was prepared and uploaded, and the list displayed the image classification results. It showed that the confidence of the picture of alpacas was much higher than that of the other two, indicating that the training effect of the model was good. If you are satisfied with the results of the training, you can also go to the PAI-EAS to deploy the model into a practical application. 

Let's compare the four components of PAI. First of all, in terms of characteristics, PAI-Studio supports building algorithm models by dragging and dropping components integrated with a variety of traditional machine learning and deep learning frameworks, and supports automatic parameter adjustment. PAI-DSW supports interactive development like notebook and supports a variety of deep learning frameworks. PAI-EAS provides CPU and GPU computing resources as well as remote fast deployment services for models.

PAI-AutoLearning can use a small amount of labeled data for automatic model training. In terms of applicable scene, PAI-Studio is mainly in that data and analysis task based on existing machine learning models. PAI-DSW is used for data analysis tasks based on deep learning frameworks. PAI-EAS is used for training after model construction and PAI-AutoLearning is used for automatic training and automatic parameter adjustment of models.

In terms of target user, PAI-Studio is mainly aimed at traditional machine learning developers, while PAI-DSW is mainly for deep learning developers, PAI-EAS is oriented to the tester of algorithm model. PAI-AutoLearning has the lowest threshold, and users without algorithm basis can grasp it easily. In terms of operation method, PAI-Studio supports drag and drop development of visual components. PAI-DSW supports interactive development based on notebook, and integrates pen source, deep learning framework.

PAI-EAS can be operated in a Cloud and deploy directly. PAI-AutoLearning is also operated in the Cloud, and trained directly. Finally, we focus on how PAI's product compares with his competitors. Python scikit-learn is a popular Python machine learning third-party library that integrates some of the most commonly used machine learning methods. PAI-Studio by contract, we can develop without coding and just drag and drop components.

In the development of deep learning model, PAI-DSW has more big data development toolkit and algorithm library built in compared with the code development method using TensorFlow. It can directly realize notebook writing, code debugging, and running without any operation and configuration. PAI-EAS requires no additional computing resources and can be deployed and run efficiently compared to a self-built platform. Compared with self-developed models, PAI-AutoLearning does not need to write code and adjust parameters by yourself. All tasks can be completed automatically with the help of Cloud platform.

About the Author
Students
692
Courses
18
Learning Paths
2

Alibaba Cloud, founded in 2009, is a global leader in cloud computing and artificial intelligence, providing services to thousands of enterprises, developers, and governments organizations in more than 200 countries and regions. Committed to the success of its customers, Alibaba Cloud provides reliable and secure cloud computing and data processing capabilities as a part of its online solutions.