PAI Flow nodes
PAI Flow enables end-to-end machine learning workflow development. It offers the same functionality as visual modeling Designer in Platform for AI (PAI) and supports recurring scheduling.
Limits
-
Product limits:
-
PAI Flow only supports DataWorks Workspaces (new version).
-
PAI Flow currently only supports Source/Target and RAG Data Processing nodes.
-
PAI Flow only supports Serverless resource groups.
-
-
Region limits: Supported regions include China (Hangzhou), China (Shanghai), China (Beijing), China (Ulanqab), China (Shenzhen), China (Hong Kong), Singapore, Indonesia (Jakarta), Japan (Tokyo), Germany (Frankfurt), US (Silicon Valley), and US (Virginia).
Prerequisites
You have created a DataWorks Data Studio (new version) workspace and a Platform for AI (PAI) workspace.
-
When you create a workspace, you must select Create AI Workspace with Same Name. The system automatically creates and binds a Platform for AI (PAI) workspace that has the same name as the DataWorks workspace.
-
For an existing workspace, you must enable Schedule PAI Nodes in the Management Center. This action also creates a Platform for AI (PAI) workspace that has the same name as the DataWorks workspace.
Create a PAI Flow
-
Log on to the DataWorks console. In the target region, click in the left-side navigation pane. Select a workspace from the drop-down list and click Go to Data Development.
-
In the project directory of Data Studio, click the
icon and choose . The system creates a PAI Flow node and directs you to the orchestration page.
Develop a PAI Flow
PAI Flow supports various visual modeling nodes for designing workflows.
-
On the PAI Flow orchestration page, drag nodes from the left-side pane to the canvas and connect them to design your workflow.
-
After completing the workflow design, click a node to configure it in the right panel.
Node type
Node
Node description
Source/Target
Reads data from MaxCompute tables. By default, reads the table data of the current project.
Reads files or folders from an
OSS Bucketpath.Reads
CSVfiles fromOSS,HTTP, andHDFS.Writes input data to
MaxCompute.RAG data processing
RAG Text Parsing and Chunking
Reads and parses text files (
HTML,PDF,Markdown,Text, etc.) from the input directory, generates continuous text blocks no larger than the specified block size, and saves them inJSONlineformat to the specified output path.RAG Vector Generation
Loads all parsed and chunked document files (
JSONlineformat) from the specified directory, then uses anEmbeddingmodel to generate text vectors.RAG Knowledge Base Index Synchronization
Synchronizes input data to the target knowledge base index.
NoteWhen configuring file paths, you can include variables in the path, for example:
https://examplebucket.oss-cn-hangzhou.aliyuncs.com/${variable}/example.csv. When configuring variables, you can use scheduling parameters as variables to read from or write to different storage paths during recurring scheduling. -
After you complete node development, on the orchestration page, configure the scheduling settings for PAI Flow in the right-side toolbar to ensure that the PAI Flow is periodically scheduled after it is deployed to the production environment.
NoteWhen configuring scheduling settings, the schedule resource group only supports Serverless resource groups.
Publish a PAI Flow
After you debug the PAI Flow and configure scheduling settings, publish the PAI Flow workflow. The workflow then runs periodically based on your configured schedule.
-
Click Save in the top toolbar to save the PAI Flow.
-
After you save the changes, click the
button in the top toolbar to open the deployment panel (Deploying a task). Then, click Start Release Production. The task is then deployed based on the deployment check process.
More operations
After publishing the PAI Flow, click Go to operation and maintenance in the publishing panel to go to the Recurring tasks page, where you can view its scheduling and execution status.
In the DAG graph, you can view internal tasks only after opening the PAI Flow.