microsoft / vscode-tools-for-ai

Azure Machine Learning for Visual Studio Code, previously called Visual Studio Code Tools for AI, is an extension to easily build, train, and deploy machine learning models to the cloud or the edge with Azure Machine Learning service.
Other
325 stars 95 forks source link

[Triage] Plot is not rendering in VSCode while connecting to AML Compute #1297

Closed bkuriach closed 3 years ago

bkuriach commented 3 years ago

Issue Type: Bug

Plot is not rendering in VSCode while connecting to AML Compute (Not in debug mode).

Steps to reproduce:

  1. Connect VSCode to any AML Compute
  2. execute below code

import matplotlib.pyplot as plt plt.plot([1,2,3,4]) plt.show()

Same is working in local VSCode (connected to local machine)

Please let me know if you need more details.

Extension version: 0.4.0 VS Code version: Code 1.60.2 (7f6ab5485bbc008386c4386d08766667e155244e, 2021-09-22T12:00:31.514Z) OS version: Windows_NT x64 10.0.22473 Restricted Mode: No Remote OS version: Linux x64 5.10.60.1-microsoft-standard-WSL2 Remote OS version: Linux x64 5.4.0-1056-azure

System Info |Item|Value| |---|---| |CPUs|Intel(R) Core(TM) i7-8665U CPU @ 1.90GHz (8 x 2112)| |GPU Status|2d_canvas: enabled
gpu_compositing: enabled
multiple_raster_threads: enabled_on
oop_rasterization: enabled
opengl: enabled_on
rasterization: enabled
skia_renderer: enabled_on
video_decode: enabled
vulkan: disabled_off
webgl: enabled
webgl2: enabled| |Load (avg)|undefined| |Memory (System)|15.75GB (3.65GB free)| |Process Argv|--folder-uri=vscode-remote://wsl+Ubuntu-20.04/home/bkuriachan/Projects/Crop%20Classification/crop-classification --remote=wsl+Ubuntu-20.04 --crash-reporter-id bb5a6bf5-d714-48a5-9eba-811de0544190| |Screen Reader|no| |VM|0%| |Item|Value| |---|---| |Remote|WSL: Ubuntu-20.04| |OS|Linux x64 5.10.60.1-microsoft-standard-WSL2| |CPUs|Intel(R) Core(TM) i7-8665U CPU @ 1.90GHz (8 x 2112)| |Memory (System)|7.64GB (4.63GB free)| |VM|0%| |Item|Value| |---|---| |Remote|Azure ML: attention-model-gpu| |OS|Linux x64 5.4.0-1056-azure| |CPUs|Intel(R) Xeon(R) CPU E5-2690 v3 @ 2.60GHz (6 x 2596)| |Memory (System)|54.92GB (47.17GB free)| |VM|0%|
A/B Experiments ``` vsins829:30139715 vsliv368:30146709 vsreu685:30147344 vspor879:30202332 vspor708:30202333 vspor363:30204092 vshan820:30294714 vscod805cf:30301675 vsccppwt:30377799 bridge0708:30335490 bridge0723:30353136 vsqsis300:30374797 vsaa593:30376534 ```
sevillal commented 3 years ago

@bkuriach thanks for filing this issue. I need to look into this a little bit more but seems like this is an issue on how to display UI from remote apps in vscode. (Trying this same code on Remote WSL or Remote SSH will be the same).

In the meantime I can suggest the following workarounds:

  1. Use "plt.savefig("image-name.png")" and open PNG in the same vscode remote window
  2. Run the code in interactive window. Right click and select "Run current file in interactive window" image
  3. Use interactive window + inline jupyter cell. Wrap your code in #%% to mark the start of a jupyter cell, editor will show codelenses to run cell. image
shsuman commented 3 years ago

@bkuriach Were the above workarounds helpful ?

shsuman commented 3 years ago

Closing this because of inactivity for over 7 days. Please reopen if need be.