This topic shows you 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 instances.
User interfaces
- JupyterLab
No. Description 1 Top navigation bar 2 Left-side navigation pane 3 File browser 4 Main work area 5 Resource usage monitoring area - WebIDE
No. Description 1 Left-side navigation pane 2 File browser 3 Main work area 4 Resource usage monitoring area - Terminal
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.
- Go to the development environment of DSW.
- Log on to the PAI console.
- In the left-side navigation pane, choose .
- In the upper-left corner of the page, select the region that you want.
- Optional:In the search box on the Notebook Models page, enter the name or keywords of a Data Science Workshop (DSW) instance to search for the DSW instance.
- Find the DSW instance that you want and click Launch DSW in the Actions column.
- Download a preset case.
- In the left-side navigation pane of the Data Science Workshop page, click the
icon.
- Find the case that you want to download, such as AutoML_HPO_101, and click the
icon next to the case.
- In the left-side navigation pane of the Data Science Workshop page, click the
- Open the model file of the downloaded case. The AutoML_HPO_101 case is used as an example.
- In the AutoML_HPO_101.ipynb file, you can view the use principle of the case and perform tasks as instructed.
Upload files
- In the left-side navigation pane of the JupyterLab Notebook programming environment
of DSW, click the
icon.
- Click the
icon in the toolbar to upload files. Resumable upload is supported.
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
You must replacepip install --user <yourLibraryName>
<yourLibraryName>
with the name of the third-party library that you want to install. For example, you can run thepip install --user sklearn
command to install a sklearn library. - View third-party libraries
You can view all third-party libraries that you have installed.pip list
- Remove a third-party library
You must replacepip uninstall <yourLibraryName>
<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.