Skip to content

Commit

Permalink
Providers schema (#53)
Browse files Browse the repository at this point in the history
* read local yaml file

* completed unit testing

* added general yaml schema for external cloud providers | changes unit testing | changed parsers.js

* changed URL providers to S3

* get data from multiple urls

* changed extension setting description

* changed to centML S3

* local tests

* local changes to skylinesession

* installation of json parser

* changed to json schema

* finished reading json from external urls and show incorrect data

* changed unit testing and tested with build script

* changed default providers settings to empty string

* PR review

* changed utils.js file
  • Loading branch information
johncalesp authored Mar 29, 2023
1 parent 3bc8d82 commit 0d47046
Show file tree
Hide file tree
Showing 22 changed files with 1,199 additions and 757 deletions.
32 changes: 31 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,14 +29,44 @@ To install, either:
Once you have the vsix file, run `code --install-extension vscode*.vsix` to install the extension.
**Note: the file [build_vsix_dev.sh] is only to be used for development**

**Adding cloud instances to the Deployment Tab:** You can include information about the instances that you use thrugh the extension settings. There you will find an option named **providers** that accepts a list of urls separated by commas. Each url must be a JSON file that follows the schema specified here : [schema](skyline-vscode/react-ui/src/schema/CloudProvidersSchema.js).<br/>
Additionally, you need to add the necessary access so the extension can read the file.<br/>
You can use an AWS S3 bucket to store your files. Change CORS settings in Permissions tab.

**CORS requirements**:
```
[
{
"AllowedHeaders": [],
"AllowedMethods": [
"GET"
],
"AllowedOrigins": [
"http://*",
"https://*",
"vscode-webview://*"
],
"ExposeHeaders": []
}
]
```
and allow public access to the file
This is our [file](https://deepview-explorer-public.s3.amazonaws.com/vscode-cloud-providers/providers.json) that you can use as an example.
### Backend Installation
This plugin requires Skyline (the installation instruction for which can be found [here](https://github.com/CentML/skyline)) and (optionally) Habitat (used to extrapolate GPU runtimes, instructions found [here](https://github.com/CentML/habitat)). **Skyline must be launched before running this extension.**
After installation, please make note of the path to the `skyline` binary. To do so, run `which skyline` after ensuring that the `skyline` binary works. This path is different depending on how the backend was installed. Default installation from PyPI will place the binary to `/usr/bin/skyline`, however if you're running the backend in virtual environment it will be in a different location. **You need to launch `skyline` before running this extension.**
## Usage example
1. Open one of the examples DNN project examples, i.e. [Resnet](https://github.com/CentML/skyline/tree/main/examples/resnet) from Skyline in VSCode
2. Press `Ctrl+Shift+P`, then select `Skyline` from the dropdown list.
2. (Optional) You can add other external cloud instances. Use the CloudProvidersSchema.yaml file as a reference. This file is located under the schemas folder. Once you have created your own yaml file, you can reference the path to this file in the extension settings in **providers** option. The file will be read when the extension is called.
3. Press `Ctrl+Shift+P`, then select `Skyline` from the dropdown list.
3. Click on `Begin Analysis`.
## Disabling telemetry
Expand Down
5 changes: 5 additions & 0 deletions skyline-vscode/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,11 @@
"default": 60120,
"description": "Specifies the port of the profiler."
},
"skyline.providers": {
"type": "string",
"default": "",
"description": "additional urls separated by commas"
},
"skyline.isTelemetryEnabled": {
"type": "string",
"default": "Ask me",
Expand Down
Loading

0 comments on commit 0d47046

Please sign in to comment.