Skip to content
This repository has been archived by the owner on Jun 6, 2024. It is now read-only.

[VS Code] version 0.2.0 #2442

Merged
merged 7 commits into from
Apr 1, 2019
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion contrib/pai_vscode/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,17 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [0.0.1] - 2018-01-09
## [0.1.0] - 2019-01
### Added
- Open job pages and dashboard pages in VS Code
- Submit job to PAI cluster from VS Code
- Open PAI's hdfs as a workspace folder

## [0.2.0] - 2019-03
### Added
- Generate jsonc job config by default
- Add a PAI view container (sidebar), includes
- Job list view
- Auto refresh enabled
- HDFS explorer
- You can choose where hdfs explorer will be shown (view container or workspace folder)
21 changes: 20 additions & 1 deletion contrib/pai_vscode/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,21 @@ The extension has a useful feature called "Simulate Job Running". It enables the

![](https://raw.githubusercontent.com/Microsoft/pai/master/contrib/pai_vscode/assets/simulate-job.gif)

## Sidebar
HDFS Explorer and Job List view will be shown in the extension's view container (sidebar).

### HDFS Explorer
1. You are able to connect to an OpenPAI cluster's HDFS by double click its corresponding tree node.
2. The HDFS directory structure will be expended in the tree view.
3. Right click the folder or file node to perform file system operations.

### Job List
1. Browse latest jobs in the OpenPAI cluster in job list tree view.
2. Browse recent submitted jobs by local (extension) in job list tree view.
3. Job list will auto refresh every 10 seconds.
4. Double click job node to browse Job details in external browser.

![](https://raw.githubusercontent.com/Microsoft/pai/master/contrib/pai_vscode/assets/job-list.png)

## Commands
### Command Pallete
Expand All @@ -61,7 +76,7 @@ The extension has a useful feature called "Simulate Job Running". It enables the
|Submit Job...|Submit job to selected cluster|
|Simulate Job Running...|Generate Dockerfile to simulate PAI job running|
|Edit Configuration...|Edit cluster configuration|
|Open HDFS...|Open selected cluster's HDFS as a VS Code workspace folder|
|Open HDFS...|Open HDFS explorer of selected cluster|

## Settings
|ID|Description|
Expand All @@ -70,6 +85,10 @@ The extension has a useful feature called "Simulate Job Running". It enables the
|pai.job.upload.exclude|Glob pattern for excluding files and folders|
|pai.job.upload.include|Glob pattern for including files and folders|
|pai.job.generateJobName.enabled|Controls whether the extension will add a random suffix to your job name when submitting job|
|pai.job.jobList.recentJobsLength|Controls the number of recently submitted jobs to keep in history for each PAI cluster|
|pai.job.jobList.allJobsPageSize|Controls the page size of list when listing jobs for each PAI cluster|
|pai.job.jobList.refreshInterval|Controls the refresh interval of job list (in seconds)|
|pai.hdfs.location|Location where hdfs explorer will be shown|

## Requirements
PAI Cluster Version >= 0.8.0
Expand Down
25 changes: 12 additions & 13 deletions contrib/pai_vscode/VSCodeExt.md
Original file line number Diff line number Diff line change
@@ -1,23 +1,22 @@
# OpenPAI VS Code Client

OpenPAI VS Code Client can submit AI jobs, simulate job running locally, manage HDFS files, and etc. It's an extension of Visual Studio Code.

Visual Studio Code is a popular, free, lightweight but powerful source code editor which runs on your desktop and is available for Windows, macOS and Linux.

## Installation

1. Download and install [Visual Studio Code](https://code.visualstudio.com/) by several clicks.
Visual Studio Code is a lightweight but powerful source code editor which runs on your desktop and is available for Windows, macOS and Linux.

More information please refer to the [Visual Studio Code Official Site](https://code.visualstudio.com/).

2. Install **OpenPAI Client**.
OpenPAI Client is a VS Code extension to connect PAI clusters, submit AI jobs, and manage files on HDFS, etc. You need to install the extension in VS code before using it.

1. Launch VS Code.
2. Click the "Extensions" icon in Activity Bar or press **Ctrl+Shift+X** to bring up the Extensions view.
3. Input **openpai** in the text box, the OpenPAI VS Code Client will appear in the result list.
4. Click the **Install** button. The extension will be installed.
5. After a successful installation, you will see an introduction page. Follow the instructions there and try the PAI client.
To install the OpenPAI Client:
1. Launch VS Code.
2. Click the "Extensions" icon in Activity Bar or press **Ctrl+Shift+X** to bring up the Extensions view.
3. Input **openpai** in the text box, the OpenPAI VS Code Client will appear in the result list.
4. Click the **Install** button. The extension will be installed.
5. After a successful installation, you will see an introduction page. Follow the instructions there and try the PAI client.

![Extension](./assets/ext-install-1.png)
![Extension](./assets/ext-install-1.png)

## Next step
## Next steps

Learn how to [use OpenPAI VS Code Client](./README.md)
Binary file added contrib/pai_vscode/assets/job-list.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
24 changes: 22 additions & 2 deletions contrib/pai_vscode/i18n/common.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,18 @@
"treeview.node.edit": "Edit Configuration...",
"treeview.node.openhdfs": "Open HDFS...",
"treeview.node.openPortal": "Open Web Portal...",
"treeview.node.listjob": "List Jobs...",
"treeview.node.listjob": "List Jobs Externally...",
"treeview.node.create-config": "Create Job Config...",
"treeview.node.submitjob": "Submit Job...",
"treeview.node.simulate": "Simulate Job Running...",
"treeview.hdfs.select-cluster.label": "Double click to connect to a PAI cluster's HDFS...",
"treeview.joblist.recent": "Recent Submitted Jobs from VS Code",
"treeview.joblist.all": "All Jobs",
"treeview.joblist.view": "View Job Detail",
"treeview.joblist.more": "View More...",
"treeview.joblist.error": "Failed to load job list: {0}",
"container.hdfs.mkdir.prompt": "Please enter a folder name",
"container.hdfs.mkdir.cancelled": "Cancelled creating new folder",
"hdfs.workspace.title": "HDFS Explorer - {0}",
"hdfs.progress": "Transfering file - {0}% ({1} bytes / {2} bytes)",
"hdfs.downloading": "Downloading {0}",
Expand All @@ -47,6 +55,7 @@
"job.prepare.status": "PAI: Preparing for job submission",
"job.prepare.cluster.cancelled": "No cluster selected, job submission cancelled.",
"job.prepare.config.prompt": "Please select a PAI job config json file",
"job.prepare.config.invalid": "Invalid job config json file, job submission cancelled.",
"job.prepare.config.cancelled": "No job config selected, job submission cancelled.",
"job.prepare.upload.prompt": "Enable auto uploading of code?",
"job.prepare.upload.yes.detail": "The extension will upload your project files to PAI job config's code dir automatically.",
Expand All @@ -57,6 +66,7 @@
"job.upload.status": "PAI: Uploading code",
"job.upload.progress": "PAI: Uploading code - {0} / {1}",
"job.upload.error": "Error occurred while uploading code: {0}",
"job.upload.invalid-code-dir": "Auto uploading doesn't support code dir with url scheme hdfs:// or webhdfs://. Please use environment variable $PAI_DEFAULT_FS_URI instead.",
"job.request.status": "PAI: Submitting job",
"job.submission.error": "Error occurred while submitting job: {0}",
"job.submission.success": "Successfully submitted job.",
Expand Down Expand Up @@ -93,10 +103,18 @@
"treeview.node.edit": "编辑配置...",
"treeview.node.openhdfs": "打开 HDFS...",
"treeview.node.openPortal": "打开 OpenPAI 门户...",
"treeview.node.listjob": "打开任务列表...",
"treeview.node.listjob": "在浏览器里打开任务列表...",
"treeview.node.create-config": "创建任务配置文件...",
"treeview.node.submitjob": "提交任务...",
"treeview.node.simulate": "模拟任务执行...",
"treeview.hdfs.select-cluster.label": "双击以连接到 PAI 集群的 HDFS...",
"treeview.joblist.recent": "近期从 VS Code 提交的任务",
"treeview.joblist.all": "所有任务",
"treeview.joblist.view": "查看任务详情",
"treeview.joblist.more": "显示更多...",
"treeview.joblist.error": "载入任务列表时发生错误:{0}",
"container.hdfs.mkdir.prompt": "请输入文件夹名",
"container.hdfs.mkdir.cancelled": "新建文件夹操作已取消",
"hdfs.workspace.title": "HDFS 浏览器 - {0}",
"hdfs.progress": "正在传输 - {0}% ({1} 字节 / {2} 字节)",
"hdfs.downloading": "正在下载 {0}",
Expand All @@ -118,6 +136,7 @@
"job.prepare.status": "PAI: 正在准备提交任务",
"job.prepare.cluster.cancelled": "未选择集群,任务提交已被取消。",
"job.prepare.config.prompt": "请选择一个 PAI 任务配置 JSON",
"job.prepare.config.invalid": "任务配置文件不合法,任务提交已被取消。",
"job.prepare.config.cancelled": "未选择任务配置文件,任务提交已被取消。",
"job.prepare.upload.prompt": "是否启用代码自动上传功能?",
"job.prepare.upload.yes.detail": "插件将会自动上传你的项目文件至 PAI 任务配置中的 code dir",
Expand All @@ -128,6 +147,7 @@
"job.upload.status": "PAI: 正在上传代码",
"job.upload.progress": "PAI: 代码上传 - {0} / {1}",
"job.upload.error": "代码上传时发生错误:{0}",
"job.upload.invalid-code-dir": "自动上传不支持 hdfs:// 及 webhdfs:// 形式的 code dir, 请使用环境变量 $PAI_DEFAULT_FS_URI",
"job.submission.name-exist": "提交失败,已存在同名任务,是否启用自动生成任务名称后缀功能?",
"job.submission.name-exist.enable": "启用并重新提交",
"job.submission.error": "提交任务时发生错误:{0}",
Expand Down
24 changes: 24 additions & 0 deletions contrib/pai_vscode/icons/ellipsis.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions contrib/pai_vscode/icons/error.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
31 changes: 31 additions & 0 deletions contrib/pai_vscode/icons/history.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions contrib/pai_vscode/icons/latest.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
31 changes: 31 additions & 0 deletions contrib/pai_vscode/icons/loading.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
31 changes: 31 additions & 0 deletions contrib/pai_vscode/icons/loading_dark.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion contrib/pai_vscode/icons/octicon/file.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion contrib/pai_vscode/icons/octicon/file_dark.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions contrib/pai_vscode/icons/octicon/home.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions contrib/pai_vscode/icons/octicon/home_dark.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion contrib/pai_vscode/icons/octicon/terminal.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion contrib/pai_vscode/icons/octicon/terminal_dark.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading