Updated on 2023-06-30 GMT+08:00

OBS-based Upload and Download

If data used for training needs to be stored to OBS, you can use the upload and download function provided by PyCharm Toolkit to upload local files or folders to OBS or download files or folders from OBS to the local host on the PyCharm page.

After files or folders are uploaded to OBS, you can directly define the OBS path in your training script.

Uploading a Local File or Folder to OBS

  1. Right-click in the Project window and choose ModelArts Upload from the shortcut menu.
    Figure 1 ModelArts Upload
  2. In the dialog box that is displayed, set OBS Path and Local File Path. It is recommended that the size of the file or folder to be uploaded be less than or equal to 10 MB. Click Upload File.

    OBS Path: indicates the OBS path to which the local file or folder is to be uploaded.

    Local File Path: indicates the local directory where the file or folder to be uploaded is located. If a specific file is to be uploaded, set this parameter to the file name.
    Figure 2 Entering file paths
  3. In the ModelArts Event Log window, view the upload logs.
    Figure 3 Viewing upload logs

Downloading a File or Folder from OBS

  1. Right-click in the Project window and choose ModelArts Download from the shortcut menu.
  2. In the dialog box that is displayed, set OBS Path and Local File Path and click Download File.

    OBS Path: indicates the OBS path of the file or folder to be downloaded. If a specific file is to be downloaded, set this parameter to the file name.

    Local File Path: indicates the local path for storing downloaded files.
    Figure 4 Downloading a file from OBS
  3. If a file with the same name already exists in the local directory, a message is displayed, asking you whether to overwrite the existing file. If you select Yes, the existing file will be overwritten. If you select No, the file conflicting with the existing file will not be downloaded and other files that do not conflict with the existing file will continue to be downloaded. Set this parameter based on the site requirements.
  4. In the ModelArts Event Log window, view the download logs.
    Figure 5 Viewing download logs