From 5fe20d5ab094de8a073b82350ad9914489e1aa49 Mon Sep 17 00:00:00 2001 From: John Calderon Date: Thu, 6 Apr 2023 10:05:00 -0400 Subject: [PATCH 1/3] changed workflow --- .github/workflows/build-vsix.yaml | 18 +- skyline-vscode/package.json | 22 +-- .../react-ui/src/schema/providers.json | 167 ------------------ skyline-vscode/src/extension.ts | 12 +- skyline-vscode/src/skyline_session.ts | 2 +- 5 files changed, 28 insertions(+), 193 deletions(-) delete mode 100644 skyline-vscode/react-ui/src/schema/providers.json diff --git a/.github/workflows/build-vsix.yaml b/.github/workflows/build-vsix.yaml index 76af43f..d4bf796 100644 --- a/.github/workflows/build-vsix.yaml +++ b/.github/workflows/build-vsix.yaml @@ -51,11 +51,12 @@ jobs: uses: actions/upload-artifact@v3 with: name: skyline-vscode-${{ env.RELEASE_VERSION }}.vsix - path: skyline-vscode/skyline-vscode-${{ env.RELEASE_VERSION }}.vsix + path: skyline-vscode/deepview-explore-${{ env.RELEASE_VERSION }}.vsix - name: Upload vsix artifact to S3 run: | - aws s3 cp skyline-vscode/skyline-vscode-${{ env.RELEASE_VERSION }}.vsix s3://centml-releases/skyline-vscode/ + aws s3 cp skyline-vscode/deepview-explore-${{ env.RELEASE_VERSION }}.vsix s3://centml-releases/deepview-explore/ + aws s3api put-object-acl --bucket centml-releases --key deepview-explore/deepview-explore-${{ env.RELEASE_VERSION }}.vsix --acl public-read update-index: name: Update index.html in S3 bucket @@ -81,22 +82,23 @@ jobs: run: | pip3 install dominate - - name: Download all versions of Skyline-VSCode from S3 + - name: Download all versions of Deepview-explore from S3 run : | mkdir vsix cd vsix - aws s3 cp s3://centml-releases/skyline-vscode/ . --recursive --exclude "*" --include "*.vsix" + aws s3 cp s3://centml-releases/deepview-explore/ . --recursive --exclude "*" --include "*.vsix" - name: Create index.html run: | - file_list=(skyline-vscode-*.vsix) + file_list=(deepview-explore-*.vsix) formatted_file_list=$(basename -a ${file_list[@]}) cd vsix - python3 ../scripts/create_index.py skyline-vscode -f $formatted_file_list + python3 ../scripts/create_index.py deepview-explore -f $formatted_file_list - name: Upload index.html to S3 run: | - aws s3 cp vsix/index.html s3://centml-releases/skyline-vscode/ + aws s3 cp vsix/index.html s3://centml-releases/deepview-explore/ + aws s3api put-object-acl --bucket centml-releases --key deepview-explore/index.html --acl public-read publish-release: name: Publish Release @@ -116,7 +118,7 @@ jobs: - name: Download artifact uses: actions/download-artifact@v3 with: - name: skyline-vscode-${{ env.RELEASE_VERSION }}.vsix + name: deepview-explore-${{ env.RELEASE_VERSION }}.vsix path: dist - name: Publish a release diff --git a/skyline-vscode/package.json b/skyline-vscode/package.json index 8357492..7b71379 100644 --- a/skyline-vscode/package.json +++ b/skyline-vscode/package.json @@ -1,8 +1,8 @@ { - "name": "skyline-vscode", - "displayName": "skyline-vscode", + "name": "deepview-explore", + "displayName": "deepview-explore", "publisher": "centml", - "repository": "https://github.com/CentML/mltools-vscode", + "repository": "https://github.com/CentML/DeepView.Explore", "description": "", "version": "0.1.0", "engines": { @@ -13,35 +13,35 @@ ], "activationEvents": [ "onStartupFinished", - "onCommand: skyline-vscode.cmd_begin_analyze" + "onCommand: deepview-explore.cmd_begin_analyze" ], "main": "./out/main.js", "contributes": { "commands": [ { - "command": "skyline-vscode.cmd_begin_analyze", - "title": "Skyline" + "command": "deepview-explore.cmd_begin_analyze", + "title": "Deepview" } ], "configuration": { - "title": "Skyline", + "title": "Deepview", "properties": { - "skyline.address": { + "deepview.address": { "type": "string", "default": "localhost", "description": "Specifies the address of the profiler." }, - "skyline.port": { + "deepview.port": { "type": "number", "default": 60120, "description": "Specifies the port of the profiler." }, - "skyline.providers": { + "deepview.providers": { "type": "string", "default": "", "description": "additional urls separated by commas" }, - "skyline.isTelemetryEnabled": { + "deepview.isTelemetryEnabled": { "type": "string", "default": "Ask me", "enum": [ diff --git a/skyline-vscode/react-ui/src/schema/providers.json b/skyline-vscode/react-ui/src/schema/providers.json deleted file mode 100644 index 95ebd12..0000000 --- a/skyline-vscode/react-ui/src/schema/providers.json +++ /dev/null @@ -1,167 +0,0 @@ -[ - { - "name": "gcp", - "logo": "resources/google.png", - "color": "#ea4335", - "instances": [ - { - "name": "a2-highgpu-1g", - "gpu": "a100", - "ngpus": 1, - "cost": 3.67 - }, - { - "name": "n1-standard-1", - "gpu": "t4", - "ngpus": 1, - "cost": 0.4 - }, - { - "name": "n1-standard-1", - "gpu": "v100", - "ngpus": 1, - "cost": 2.53 - }, - { - "name": "n1-standard-1", - "gpu": "p100", - "ngpus": 1, - "cost": 1.51 - }, - { - "name": "a2-highgpu-2g", - "gpu": "a100", - "ngpus": 2, - "cost": 7.35 - }, - { - "name": "n1-standard-1", - "gpu": "t4", - "ngpus": 2, - "cost": 0.75 - }, - { - "name": "n1-standard-1", - "gpu": "v100", - "ngpus": 2, - "cost": 5.01 - }, - { - "name": "n1-standard-1", - "gpu": "p100", - "ngpus": 2, - "cost": 2.97 - }, - { - "name": "a2-highgpu-4g", - "gpu": "a100", - "ngpus": 4, - "cost": 14.7 - }, - { - "name": "n1-standard-1", - "gpu": "t4", - "ngpus": 4, - "cost": 1.45 - }, - { - "name": "n1-standard-1", - "gpu": "v100", - "ngpus": 4, - "cost": 9.97 - }, - { - "name": "n1-standard-1", - "gpu": "p100", - "ngpus": 4, - "cost": 5.89 - } - ] - }, - { - "name": "aws", - "logo": "resources/aws.png", - "color": "#ff9900", - "instances": [ - { - "name": "p3.2xlarge", - "gpu": "v100", - "ngpus": 1, - "cost": 3.06 - }, - { - "name": "g4dn.xlarge", - "gpu": "t4", - "ngpus": 1, - "cost": 0.526 - }, - { - "name": "g4dn.12xlarge", - "gpu": "t4", - "ngpus": 4, - "cost": 3.912 - }, - { - "name": "p3.8xlarge", - "gpu": "v100", - "ngpus": 4, - "cost": 12.24 - } - ] - }, - { - "name": "azure", - "logo": "resources/azure.png", - "color": "#008AD7", - "instances": [ - { - "name": "NC6s v2", - "gpu": "p100", - "ngpus": 1, - "cost": 2.07 - }, - { - "name": "NC6s v3", - "gpu": "v100", - "ngpus": 1, - "cost": 3.06 - }, - { - "name": "NC4as T4 v3", - "gpu": "t4", - "ngpus": 1, - "cost": 0.526 - }, - { - "name": "NC12s v2", - "gpu": "p100", - "ngpus": 2, - "cost": 4.14 - }, - { - "name": "NC12s v3", - "gpu": "v100", - "ngpus": 2, - "cost": 6.12 - }, - { - "name": "NC24rs v2", - "gpu": "p100", - "ngpus": 4, - "cost": 9.108 - }, - { - "name": "NC24rs v3", - "gpu": "v100", - "ngpus": 4, - "cost": 13.46 - }, - { - "name": "NC64as T4 v3", - "gpu": "t4", - "ngpus": 4, - "cost": 4.352 - } - ] - } -] diff --git a/skyline-vscode/src/extension.ts b/skyline-vscode/src/extension.ts index 6c61f66..3edd0d2 100644 --- a/skyline-vscode/src/extension.ts +++ b/skyline-vscode/src/extension.ts @@ -23,8 +23,8 @@ export function activate(context: vscode.ExtensionContext) { }; const logger = vscode.env.createTelemetryLogger(telemetrySender); - let disposable = vscode.commands.registerCommand('skyline-vscode.cmd_begin_analyze', () => { - let vsconfig = vscode.workspace.getConfiguration('skyline'); + let disposable = vscode.commands.registerCommand('deepview-explore.cmd_begin_analyze', () => { + let vsconfig = vscode.workspace.getConfiguration('deepview'); let options: vscode.OpenDialogOptions = { canSelectFiles: false, @@ -40,8 +40,8 @@ export function activate(context: vscode.ExtensionContext) { }; const panel = vscode.window.createWebviewPanel( - 'skyline', - "Skyline", + 'deepview', + "Deepview", vscode.ViewColumn.Beside, { enableScripts: true, @@ -87,7 +87,7 @@ export function deactivate() { } async function showTelemetryOptInDialogIfNeeded() { - let vsconfig = vscode.workspace.getConfiguration('skyline'); + let vsconfig = vscode.workspace.getConfiguration('deepview'); if (vsconfig.isTelemetryEnabled === "Ask me"){ // Pop up the message then wait const message: string = `Help CentML improve DeepView by allowing us to collect usage data. @@ -106,6 +106,6 @@ async function showTelemetryOptInDialogIfNeeded() { } function isTelemetryEnabled(): boolean { - let vsconfig = vscode.workspace.getConfiguration('skyline'); + let vsconfig = vscode.workspace.getConfiguration('deepview'); return (vsconfig.isTelemetryEnabled === "Yes"); } \ No newline at end of file diff --git a/skyline-vscode/src/skyline_session.ts b/skyline-vscode/src/skyline_session.ts index c272233..65e3f18 100644 --- a/skyline-vscode/src/skyline_session.ts +++ b/skyline-vscode/src/skyline_session.ts @@ -63,7 +63,7 @@ export class SkylineSession { telemetryLogger: vscode.TelemetryLogger; constructor(options: SkylineSessionOptions, environ: SkylineEnvironment) { - console.log("SkylineSession instantiated"); + console.log("DeepviewSession instantiated"); this.resetBackendConnection = false; this.connection = new Socket(); From fbee9ab67f71734b6835c8a4f345bb76ac6da76d Mon Sep 17 00:00:00 2001 From: John Calderon Date: Thu, 6 Apr 2023 12:12:54 -0400 Subject: [PATCH 2/3] included small fixes to external providers without carbon data | changed build workflow to use deepview --- .github/workflows/build-vsix.yaml | 4 +- README.md | 18 +- skyline-vscode/LICENSE.txt | 176 ++++++++++++++++++ skyline-vscode/package.json | 1 + .../react-ui/src/sections/CarbonEquivalent.js | 2 +- .../react-ui/src/sections/DeploymentTab.js | 2 +- .../react-ui/src/sections/ProviderPanel.js | 8 +- 7 files changed, 193 insertions(+), 18 deletions(-) create mode 100644 skyline-vscode/LICENSE.txt diff --git a/.github/workflows/build-vsix.yaml b/.github/workflows/build-vsix.yaml index d4bf796..ba704cf 100644 --- a/.github/workflows/build-vsix.yaml +++ b/.github/workflows/build-vsix.yaml @@ -50,13 +50,12 @@ jobs: - name: Upload vsix artifact uses: actions/upload-artifact@v3 with: - name: skyline-vscode-${{ env.RELEASE_VERSION }}.vsix + name: deepview-explore-${{ env.RELEASE_VERSION }}.vsix path: skyline-vscode/deepview-explore-${{ env.RELEASE_VERSION }}.vsix - name: Upload vsix artifact to S3 run: | aws s3 cp skyline-vscode/deepview-explore-${{ env.RELEASE_VERSION }}.vsix s3://centml-releases/deepview-explore/ - aws s3api put-object-acl --bucket centml-releases --key deepview-explore/deepview-explore-${{ env.RELEASE_VERSION }}.vsix --acl public-read update-index: name: Update index.html in S3 bucket @@ -98,7 +97,6 @@ jobs: - name: Upload index.html to S3 run: | aws s3 cp vsix/index.html s3://centml-releases/deepview-explore/ - aws s3api put-object-acl --bucket centml-releases --key deepview-explore/index.html --acl public-read publish-release: name: Publish Release diff --git a/README.md b/README.md index e98cc78..ea27a61 100644 --- a/README.md +++ b/README.md @@ -13,7 +13,7 @@ Installation consists of two parts: the front-end UI (this repository) and [Deep ### Frontend Installation To install, either: -* [Download](http://centml-habitat.s3-website-us-east-1.amazonaws.com/skyline-vscode/) the prebuilt VSCode plugin package +* [Download](https://centml-releases.s3.us-east-2.amazonaws.com/deepview-explore/index.html) the prebuilt VSCode plugin package * Build it from source 1. Prerequisites: - node.js v14+ @@ -21,12 +21,12 @@ To install, either: - npm install -g @vscode/vsce (to build the vscode extension) 2. Run the following commands ```bash - git clone https://github.com/CentML/skyline-vscode + git clone https://github.com/CentML/DeepView.Explore.git ./scripts/build_vsix.sh ``` 3. The vsix file will be generated in the current working directory -Once you have the vsix file, run `code --install-extension vscode*.vsix` to install the extension. +Once you have the vsix file, run `code --install-extension deepview-explore-*.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 through 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).
@@ -61,20 +61,20 @@ This is our [file](https://deepview-explorer-public.s3.amazonaws.com/vscode-clou ### Backend Installation This plugin requires DeepView.Profile (the installation instruction for which can be found [here](https://github.com/CentML/DeepView.Profile)) and (optionally) DeepView.Predict (used to extrapolate GPU runtimes, instructions found [here](https://github.com/CentML/DeepView.Predict)). **DeepView.Profile must be launched before running this extension.** -After installation, please make note of the path to the `DeepView.Profile` binary. To do so, run `which skyline` after ensuring that the `DeepView.Profile` 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 `DeepView.Profile` before running this extension.** +After installation, please make note of the path to the `DeepView.Profile` binary. To do so, run `which deepview` after ensuring that the `DeepView.Profile` binary works. This path is different depending on how the backend was installed. Default installation from PyPI will place the binary to `/usr/bin/deepview`, however if you're running the backend in virtual environment it will be in a different location. **You need to launch `DeepView.Profile` 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 DeepView.Profile in VSCode +1. Open one of the examples DNN project examples, i.e. [Resnet](https://github.com/CentML/DeepView.Profile/tree/main/examples/resnet) from DeepView.Profile in VSCode 2. (Optional) You can add other external cloud instances using the **providers** option in the extension -3. Press `Ctrl+Shift+P`, then select `Skyline` from the dropdown list. +3. Press `Ctrl+Shift+P`, then select `Deepview` from the dropdown list. 3. Click on `Begin Analysis`. ## Disabling telemetry If you do not want to send usage data to CentML, you can set isTelemetryEnabled setting to "No". -You can set the value by going to File > Preferences > Settings (On macOS: Code > Preferences > Settings), and search for telemetry. Then set the value in Skyline > Is Telemetry Enabled. This will disable all telemetry events. +You can set the value by going to File > Preferences > Settings (On macOS: Code > Preferences > Settings), and search for telemetry. Then set the value in Deepview > Is Telemetry Enabled. This will disable all telemetry events. -As well, DeepView respects VSCode's telemetry levels. IF telemetry.telemetryLevel is set to off, then no telemetry events will be sent to CentML, even if skyline.telemetry.enabled is set to true. If telemetry.telemetryLevel is set to error or crash, only events containing an error or errors property will be sent to CentML. +As well, DeepView respects VSCode's telemetry levels. IF telemetry.telemetryLevel is set to off, then no telemetry events will be sent to CentML, even if deepview.telemetry.enabled is set to true. If telemetry.telemetryLevel is set to error or crash, only events containing an error or errors property will be sent to CentML. ## Development Environment Setup @@ -112,7 +112,7 @@ code . ``` Press `F5` to compile and run the extension. When the extension window appears, open of the [example projects](https://github.com/CentML/DeepView.Profile/tree/main/examples). Then press `Ctrl-Shift-P` then select `Begin Analysis`. -To debug the React UI without extension code, set `const sendMock = true;` in the `react-ui/App.js`, then start the project as any other React.app. +To debug the React UI without extension code use `npm start` ## Release process 1. Make sure you're on main branch and it is clean diff --git a/skyline-vscode/LICENSE.txt b/skyline-vscode/LICENSE.txt new file mode 100644 index 0000000..84e6db4 --- /dev/null +++ b/skyline-vscode/LICENSE.txt @@ -0,0 +1,176 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS \ No newline at end of file diff --git a/skyline-vscode/package.json b/skyline-vscode/package.json index 7b71379..f9478b2 100644 --- a/skyline-vscode/package.json +++ b/skyline-vscode/package.json @@ -59,6 +59,7 @@ } } }, + "license": "SEE LICENSE IN LICENSE.txt", "scripts": { "vscode:prepublish": "npm run clean && node esbuild.mjs production", "esbuild": "npm run clean && node esbuild.mjs base", diff --git a/skyline-vscode/react-ui/src/sections/CarbonEquivalent.js b/skyline-vscode/react-ui/src/sections/CarbonEquivalent.js index fbe68fd..7e1fae5 100644 --- a/skyline-vscode/react-ui/src/sections/CarbonEquivalent.js +++ b/skyline-vscode/react-ui/src/sections/CarbonEquivalent.js @@ -34,7 +34,7 @@ const CarbonEquivalent = ({ carbonData }) => { const toolTipFormatter = ({ active, payload, label }) => { if (active && payload && payload.length) { return ( -
+
{payload[0].payload.regionName}

{`${XAxisLabel} : ${payload[0].value.toFixed(4)}`}

This is equivalent to:

diff --git a/skyline-vscode/react-ui/src/sections/DeploymentTab.js b/skyline-vscode/react-ui/src/sections/DeploymentTab.js index f8aefd2..f5da55f 100644 --- a/skyline-vscode/react-ui/src/sections/DeploymentTab.js +++ b/skyline-vscode/react-ui/src/sections/DeploymentTab.js @@ -32,7 +32,7 @@ const DeploymentTab = ({ numIterations, habitatData,additionalProviders }) => { diff --git a/skyline-vscode/react-ui/src/sections/ProviderPanel.js b/skyline-vscode/react-ui/src/sections/ProviderPanel.js index 48cd15f..d80584c 100644 --- a/skyline-vscode/react-ui/src/sections/ProviderPanel.js +++ b/skyline-vscode/react-ui/src/sections/ProviderPanel.js @@ -119,11 +119,11 @@ const ProviderPanel = ({ numIterations, habitatData, cloudProviderURLs }) => { let totalHr = calculate_training_time(numIterations, originalData); // NEED YUBO FEEDBACK let totalCost = instance.info.cost * totalHr; - let currCarbonData = getCarbonDataOfInstance( + let currCarbonData = instance.regions !== undefined ? getCarbonDataOfInstance( totalHr, instance, providerPanelSettings.cloudProviders[instance.info.provider] - ); + ):null; setProviderPanelSettings((prevState) => ({ ...prevState, @@ -345,9 +345,9 @@ const ProviderPanel = ({ numIterations, habitatData, cloudProviderURLs }) => { - + />} From 04a7fa0fd96201f3dbd0d3f8af378b209eaf3df5 Mon Sep 17 00:00:00 2001 From: John Calderon Date: Thu, 6 Apr 2023 16:12:57 -0400 Subject: [PATCH 3/3] changed name from additionalProviders to cloudProviderURLs --- skyline-vscode/react-ui/src/App.js | 2 +- skyline-vscode/react-ui/src/sections/DeploymentTab.js | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/skyline-vscode/react-ui/src/App.js b/skyline-vscode/react-ui/src/App.js index 8e833d5..1079a3b 100644 --- a/skyline-vscode/react-ui/src/App.js +++ b/skyline-vscode/react-ui/src/App.js @@ -229,7 +229,7 @@ function App() { diff --git a/skyline-vscode/react-ui/src/sections/DeploymentTab.js b/skyline-vscode/react-ui/src/sections/DeploymentTab.js index f5da55f..397b3b7 100644 --- a/skyline-vscode/react-ui/src/sections/DeploymentTab.js +++ b/skyline-vscode/react-ui/src/sections/DeploymentTab.js @@ -7,7 +7,7 @@ import Badge from "react-bootstrap/Badge"; import React from "react"; import { numberFormat } from "../utils/utils"; -const DeploymentTab = ({ numIterations, habitatData,additionalProviders }) => { +const DeploymentTab = ({ numIterations, habitatData,cloudProviderURLs }) => { return ( <> {habitatData.length === 0 ? ( @@ -32,7 +32,7 @@ const DeploymentTab = ({ numIterations, habitatData,additionalProviders }) => {