Alibaba Cloud Machine Learning Platform for AI (PAI) provides the online notebook feature to help you edit and debug TensorFlow code. The online notebook feature can work with Object Storage Service (OSS) and the underlying compute clusters of PAI to debug code on the cloud.

Background information

  • Before you start the online notebook feature, make sure that the size of the files stored in the selected OSS path and all its subdirectories is no greater than 80 MB. If a connection is established for PAI to read data from OSS, the connection times out after two minutes, and PAI attempts to establish a connection again.
  • Before you start the online notebook feature, make sure that the number of the .py, .tar.gz, or .zip files that are stored in the selected OSS path and all its subdirectories is no greater than 500.
  • If you do not perform any operations on the notebook editing page for more than 20 minutes after you enable the online notebook feature, the resources are released. To use these resources again, you must restart the online notebook feature. We recommend that you save your data in a timely manner.

Procedure

  1. Go to the homepage of the PAI console.
    1. Log on to the PAI console.
    2. In the left-side navigation pane, choose Model Training > Studio-Modeling Visualization. The PAI Visualization Modeling page appears.
      When you create a project, we recommend that you select the pay-as-you-go billing method and enable GPU-accelerated computing. PAI-TensorFlow tasks can run only by using GPU resources.PAI-Studio
    3. Find the required project and click Machine Learning in the Operation column.
    4. In the left-side navigation pane of the tab that appears, click Home.
  2. Create a notebook.
    1. In the upper-right corner of the Templates page, click New and select New Notebook.
    2. In the New Notebook dialog box, specify the Name, Description, and Save To parameters.
    3. Click Next.
    4. In the dialog box that appears, specify the Select OSS Bucket and Select Computing Resources parameters.
      Take note of the following points:
      • The online notebook feature of Machine Learning Studio reads only the tar.gz, .py, and .zip files in the specified directory.
      • If the OSS bucket and the experiment project are in different regions, additional costs are generated.
      • The valid values of Select Computing Resources are CPU and GPU. If you select GPU, you can specify the number of GPUs.
  3. In the left-side navigation pane, click Notebooks to view the newly created notebook.
  4. Right-click the required notebook and select Open Notebook. Wait for 2 to 5 minutes to start the notebook on the cloud.
  5. Click Click to view.
  6. Edit the notebook. Use the notebook in a way similar to that of an open source notebook.
    Take note of the following points:
    • The notebook provides the file compression and decompression features. A tar.gz file is a TAR archive that contains compressed cluster files for machine learning.
    • Files are saved to the required directory in OSS only if you click Save to workspace.OSS