This topic describes how to work with the development environments of Data Science Workshop (DSW), including how to use user interfaces, run preset Notebook cases, upload data, and manage third-party libraries.

Prerequisites

A DSW instance is created. For more information, see Create an instance.

User interfaces

  • JupyterlabJupyterLab interface
    No. Description
    1 Top navigation bar
    2 Left-side navigation pane
    3 File browser
    4 Main work area
    5 Resource usage monitoring area
  • WebIDEWebIDE interface
    No. Description
    1 Left-side navigation pane
    2 File browser
    3 Main work area
    4 Resource usage monitoring area
  • TerminalTerminal interface
    No. Description
    1 Main work area
    2 Resource usage monitoring area

Run preset Notebook cases

If you are a first-time user of DSW, we recommend that you use one of the preset cases to familiarize yourself with related features.

  1. Go to the development environment of DSW.
    1. Log on to the Machine Learning Platform for AI (PAI) console.
    2. On the Overview page, select a region in the top navigation bar.
    3. In the left-side navigation pane, click Workspaces. On the Workspace list page, click the name of the workspace that you want to manage.
    4. In the left-side navigation pane, choose Model Training > DSW-Notebook Service.
    5. Optional:On the Interactive Modeling (DSW) page, enter the instance name or a keyword in the search box to search for an instance.
    6. Find the instance and click Launch DSW in the Actions column.
  2. Download a preset case.
    1. In the left-side navigation pane of the Data Science Workshop page, click the Preset case icon icon.
    2. Find the case that you want to download, such as AutoML_HPO_101, and click the Download a preset case icon next to the case. Download a preset case.
  3. Open the model file of the downloaded case. In this example, the AutoML_HPO_101 case is used.
    1. Go to the directory in which the downloaded case is stored.
      The downloaded AutoML_HPO_101 case is stored in the /demo/AutoML_HPO_101/ directory. You can go to the directory by using one of the following methods:
      • After you download the case, click Go to Directory in the Download Success dialog box. Go to the directory in which the downloaded case is stored
      • Use the left-side navigation pane of the Data Science Workshop page.
        1. In the left-side navigation pane of the Data Science Workshop page, click the Open the file icon.
        2. Double-click Demo in the Name column.
        3. Double-click AutoML_HPO_101 in the Name column.
    2. In the storage directory, double-click AutoML_HPO_101.ipynb in the Name column to open the file.
  4. In the AutoML_HPO_101.ipynb file, you can view the use principle of the case and perform tasks as instructed.

Upload files

  1. In the left-side navigation pane of the JupyterLab Notebook programming environment of DSW, click the Folder icon icon.
  2. Click the Upload objects icon in the toolbar to upload files. Resumable upload is supported. Upload objects

Manage third-party libraries

If you use a Python development environment, you can perform the following operations to manage third-party libraries in the Terminal interface:
  • Install a third-party library
    pip install --user <yourLibraryName>
    You must replace <yourLibraryName> with the name of the third-party library that you want to install. For example, you can run the pip install --user sklearn command to install a sklearn library.
  • View third-party libraries
    pip list
    You can view all third-party libraries that you have installed.
  • Remove a third-party library
    pip uninstall <yourLibraryName>
    You must replace <yourLibraryName> with the name of the third-party library that you want to remove.
    Note You can remove only the third-party libraries that are installed by yourself.
tensoflow-gpu cannot be removed. You can only run the update command to install a specified version of tensoflow-gpu. The specified version must be compatible with the Compute Unified Device Architecture (CUDA) version of the DSW instance that you are using. Subscription DSW instances use CUDA 10. Pay-as-you-go DSW instances use CUDA 9.
pip install --upgrade --user tensorflow-gpu=<versionNumber>
You must replace <versionNumber> with the version number of tensoflow-gpu that you want to install.
Notice Do not upgrade pip. Otherwise, the installation may fail.
DSW provides the following development environments: Python2, Python3, PyTorch, and TensorFlow2.0. By default, third-party libraries are installed in Python3. If you want to install a third-party library in another development environment, you must manually switch to the environment where you want to install the third-party library.
# Install a third-party library in Python2. 
source activate python2
pip install --user <yourLibraryName>
# Install a third-party library in TensorFlow2.0. 
source activate tf2
pip install --user <yourLibraryName>
You must replace <yourLibraryName> with the name of the third-party library that you want to install.