profile
viewpoint
Don Jayamanne DonJayamanne Software engineer with a soft spot for .NET and Node.js. Loves tinkering with Arduino and Raspberry Pi. Lives in a cave.

beeware/vscode-beeware 35

A Visual Studio Code extension with support for BeeWare development

DonJayamanne/awesome-python 1

A curated list of awesome Python frameworks, libraries, software and resources

DonJayamanne/azure-pipelines-template 1

template for your azure pipelines

DonJayamanne/conda 1

OS-agnostic, system-level binary package manager and ecosystem

DonJayamanne/apollo-tooling 0

:pencil2: Tooling for development and production Apollo workflows

DonJayamanne/autoDocstring 0

vscode extension that generates docstrings for python files

DonJayamanne/awesome-jupyter 0

A curated list of awesome Jupyter projects, libraries and resources

DonJayamanne/azure-powershell 0

Microsoft Azure PowerShell

DonJayamanne/BlazorTest 0

A place to test Blazor features

issue commentmicrosoft/vscode

Unable to load Tensorboard in Notebook

forever. Any suggestions or more minimal steps to reproduce?

At this point it is failing because the output from the execution contains some javascript to create the IFrame. & the JS injects the src using window.location instaed of hardcoding it to localhost. This is to ensure they use the same host name where Jupyter UI is hosted.

We will need to put some hacky code in our extension to handle this situation. For now you won't get the desired output.

Once you have got to this stage the tensorboard (web app) server is running. You can view the output (view js/html rendered) & 99% of the time the port is the same.

You can now go into a separate cell & type the following code:

from IPython.display import IFrame
IFrame('http://localhost:6006', width=700, height=350)

This will create the iframe with the right port. FYi - You can confirm this address is accessible from your local browser.

Also, how do I confirm that I'm using the new notebook api for python vs the old one that's based on webviews?

Once you have the extension activated (you will need to wait for extenion to get activated). Right click on a notebook file & click on the Open in Preview Notebook Editor command

DonJayamanne

comment created time in an hour

issue commentmicrosoft/vscode

Unable to select a folder using window.openFileDialog with a remote File System (using local workspace)

@alexr00 Do u still need some information (asking because of the current label needs more info) Thanks

DonJayamanne

comment created time in 4 hours

PullRequestReviewEvent
PullRequestReviewEvent

issue commentmicrosoft/vscode

Unable to select a folder using window.openFileDialog with a remote File System (using local workspace)

Thats good news, unfortunately the code is private, hence nothing I can share. Should be easy to repro though (whipping up using a sample fs provider).

DonJayamanne

comment created time in 10 hours

issue commentmicrosoft/vscode

Unable to select a folder using window.openFileDialog with a remote File System (using local workspace)

Here's the code

        const remoteFolders = await window.showOpenDialog({
            canSelectFiles: false,
            canSelectFolders: true,
            canSelectMany: false,
            defaultUri: fileSystem.rootFolder,
            openLabel: 'Folder to create notebook',
            title: `Select folder on Remote Server (${server.label})`
        });

FYI - I am an extension author, hence do not have access to internal VSCode API. availableFileSystem is not in the exposed API (https://github.com/microsoft/vscode/blob/master/src/vs/vscode.d.ts).

DonJayamanne

comment created time in 12 hours

issue commentmicrosoft/vscode

Unable to select a folder using window.openFileDialog with a remote File System (using local workspace)

Is it possible your files system provider

To my knowledge this is implemented correctly. Agreed it should be cashed, but not, and that's why I posted that stack.

DonJayamanne

comment created time in 12 hours

issue commentmicrosoft/vscode

Unable to select a folder using window.openFileDialog with a remote File System (using local workspace)

Default uri is localhost888:/ and this is correct and that's why the folders are listed in the drop-down (ie it is display remote folders).

DonJayamanne

comment created time in 13 hours

issue commentmicrosoft/vscode

Unable to select a folder using window.openFileDialog with a remote File System (using local workspace)

Checked the existing issues, and they do not apply

DonJayamanne

comment created time in a day

issue openedmicrosoft/vscode

Unable to select a folder using window.openFileDialog with a remote File System (using local workspace)

<!-- ⚠️⚠️ Do Not Delete This! bug_report_template ⚠️⚠️ --> <!-- Please read our Rules of Conduct: https://opensource.microsoft.com/codeofconduct/ --> <!-- Please search existing issues to avoid creating duplicates. --> <!-- Also please test using the latest insiders build to make sure your issue has not already been fixed: https://code.visualstudio.com/insiders/ -->

<!-- Use Help > Report Issue to prefill these. -->

  • VSCode Version:
  • OS Version:

Steps to Reproduce:

  1. Create an extension and register a remote file system
  2. Use the command window.showOpenDialog with defaultUri pointing to a directory on the remote file system.
  3. VS Code will now select the remote file system folder picker (as expected).
  4. Selecting a folder from the list results in the display of the message The path does not exist..

VS Code seems to convert the remote path to a local path & perform some local FS operations on the path (to determine its validity, things fall over as the file doesn't exist, hence we get the incorrect message).

Expected behavior

  • VS Code will return the selected remote folder.
  • Looking at the code,

Note:

  • Not using any of the Remote extensions for VSCode
  • I am on the local machine
  • I have a local workspace folder opened
  • I have registered a remote file system,

See below screenshot: Screen Shot 2020-10-25 at 21 19 33

Screenshots of the stack trace (hope this helps)

Screen Shot 2020-10-25 at 21 24 39 Screen Shot 2020-10-25 at 21 25 21

<!-- Launch with code --disable-extensions to check. --> Does this issue occur when all extensions are disabled?: No

created time in a day

issue openedmicrosoft/vscode

`Save As` should prompt user to select File System (from list of registered file System Providers)

<!-- ⚠️⚠️ Do Not Delete This! feature_request_template ⚠️⚠️ --> <!-- Please read our Rules of Conduct: https://opensource.microsoft.com/codeofconduct/ --> <!-- Please search existing issues to avoid creating duplicates. -->

<!-- Describe the feature you'd like. -->

  • Assume an extension registers a file system provider abc.
  • User is not using remote extension (as installing VSCode & its remote extension host on the remote machine is not possible).
  • Assume user creates a file (using File-> New File).
  • Clicking Save As, user is not presented with the option of saving the file on a remote file system.

VSCode assumes user is always dealing with local files.

It would be good for user or extension host to intercept this & present the user with the option of saving the file either locally or on the remote file system (if there are more, then user choses). Basically:

  • User will have to chose from the list of file system providers:
  • local
  • remote fs provider 1
  • remote fs provider 2 etc..

created time in a day

issue closedmicrosoft/vscode-python

Output not handling ansi escape codes

Originally posted here https://github.com/microsoft/vscode-python/issues/14476#issuecomment-714895448 Splitting up the issue as there are two issues in the original issue.

We get the following text stream output (ansi)

  • Foo\n (now output should display foo)

  • Hello World (next line we have Hello World).

  • \u001B[A (Ansi escape to move cursor Up)

  • Bar (as the cursor has moved one line up, we shoudl now get the output

    Bar
    Hello World
    
  • Instead what we get is

    Foo
    Hello World
    Bar
    

I.e. the root cause is we do not understand [A (move cursor up)

Here's the real world example (reported in the past as well) `` Epoch 0: 92%|█████████▏| 1718/1874 [00:17<00:01, 98.09it/s, loss=2.047, v_num=19, acc=0.875] Validating: 0it [00:00, ?it/s] Epoch 0: 92%|█████████▏| 1726/1874 [00:18<00:01, 94.79it/s, loss=2.047, v_num=19, acc=0.875] Epoch 0: 94%|█████████▎| 1753/1874 [00:18<00:01, 95.74it/s, loss=2.047, v_num=19, acc=0.875] Epoch 0: 95%|█████████▌| 1782/1874 [00:18<00:00, 96.78it/s, loss=2.047, v_num=19, acc=0.875] Epoch 0: 97%|█████████▋| 1811/1874 [00:18<00:00, 97.83it/s, loss=2.047, v_num=19, acc=0.875] Epoch 0: 98%|█████████▊| 1842/1874 [00:18<00:00, 98.96it/s, loss=2.047, v_num=19, acc=0.875] Epoch 0: 100%|██████████| 1874/1874 [00:18<00:00, 99.57it/s, loss=2.047, v_num=19, acc=0.919] Epoch 0: 100%|██████████| 1874/1874 [00:18<00:00, 99.55it/s, loss=2.047, v_num=19, acc=0.919]


**When what we should get is:**
Basically when we see `[A` erase the previous line.

Epoch 0: 100%|██████████| 1874/1874 [00:18<00:00, 99.55it/s, loss=2.047, v_num=19, acc=0.919]


Here's the sample code
```python
import torch
from torch import nn
from torch.nn import functional as F

from pl_bolts.datamodules.mnist_datamodule import MNISTDataModule
import pytorch_lightning as pl
class LitLeNet(pl.LightningModule):

    def __init__(self, *args, **kwargs):
        super().__init__(*args, **kwargs)

        self.conv1 = nn.Conv2d(1, 6, 5, padding=2)
        self.conv2 = nn.Conv2d(6, 16, 5)
        self.fc1 = nn.Linear(16 * 5 * 5, 120)
        self.fc2 = nn.Linear(120, 84)
        self.classifier = nn.Linear(84, 10)

        self.accuracy = pl.metrics.Accuracy()
    
    def forward(self, x):
        x = F.relu(self.conv1(x))
        x = F.max_pool2d(x, (2, 2))
        x = F.relu(self.conv2(x))
        x = F.max_pool2d(x, (2, 2))
        x = x.view(-1, 16 * 5 * 5)
        x = F.relu(self.fc1(x))
        x = F.relu(self.fc2(x))
        x = self.classifier(x)
        x = F.softmax(x, dim=0)

        return x
    
    def configure_optimizers(self):
        return torch.optim.Adam(self.parameters())
    
    def _shared_step(self, batch, batch_idx):
        x, y = batch
        y_hat = self(x)
        loss = F.cross_entropy(y_hat, y)
        self.log('acc', self.accuracy(y_hat, y), prog_bar=True)
        return loss

    def training_step(self, batch, batch_idx):
        return self._shared_step(batch, batch_idx)
    
    def validation_step(self, batch, batch_idx):
        return self._shared_step(batch, batch_idx)
    
    def test_step(self, batch, batch_idx):
        return self._shared_step(batch, batch_idx)
    
    def validation_epoch_end(self, outputs):
        self.log('acc', self.accuracy.compute(), prog_bar=True)
mnist = MNISTDataModule('./data', num_workers=2)
model = LitLeNet()

trainer = pl.Trainer(max_epochs=1)
trainer.fit(model, datamodule=mnist)

closed time in 3 days

DonJayamanne

issue commentmicrosoft/vscode-python

Terrible outputs when making multi HBox.

Thanks for reporting this issue. I can replicate this at my end.

Jiuh-star

comment created time in 3 days

issue openedmicrosoft/vscode-python

Output not handling ansi escape codes

Originally posted here https://github.com/microsoft/vscode-python/issues/14476#issuecomment-714895448 Splitting up the issue as there are two issues in the original issue.

We get the following text stream output (ansi)

  • Foo\n (now output should display foo)

  • Hello World (next line we have Hello World).

  • \u001B[A (Ansi escape to move cursor Up)

  • Bar (as the cursor has moved one line up, we shoudl now get the output

    Bar
    Hello World
    
  • Instead what we get is

    Foo
    Hello World
    Bar
    

I.e. the root cause is we do not understand [A (move cursor up)

Here's the real world example (reported in the past as well) `` Epoch 0: 92%|█████████▏| 1718/1874 [00:17<00:01, 98.09it/s, loss=2.047, v_num=19, acc=0.875] Validating: 0it [00:00, ?it/s] Epoch 0: 92%|█████████▏| 1726/1874 [00:18<00:01, 94.79it/s, loss=2.047, v_num=19, acc=0.875] Epoch 0: 94%|█████████▎| 1753/1874 [00:18<00:01, 95.74it/s, loss=2.047, v_num=19, acc=0.875] Epoch 0: 95%|█████████▌| 1782/1874 [00:18<00:00, 96.78it/s, loss=2.047, v_num=19, acc=0.875] Epoch 0: 97%|█████████▋| 1811/1874 [00:18<00:00, 97.83it/s, loss=2.047, v_num=19, acc=0.875] Epoch 0: 98%|█████████▊| 1842/1874 [00:18<00:00, 98.96it/s, loss=2.047, v_num=19, acc=0.875] Epoch 0: 100%|██████████| 1874/1874 [00:18<00:00, 99.57it/s, loss=2.047, v_num=19, acc=0.919] Epoch 0: 100%|██████████| 1874/1874 [00:18<00:00, 99.55it/s, loss=2.047, v_num=19, acc=0.919]


**When what we should get is:**
Basically when we see `[A` erase the previous line.

Epoch 0: 100%|██████████| 1874/1874 [00:18<00:00, 99.55it/s, loss=2.047, v_num=19, acc=0.919]


Here's the sample code
```python
import torch
from torch import nn
from torch.nn import functional as F

from pl_bolts.datamodules.mnist_datamodule import MNISTDataModule
import pytorch_lightning as pl
class LitLeNet(pl.LightningModule):

    def __init__(self, *args, **kwargs):
        super().__init__(*args, **kwargs)

        self.conv1 = nn.Conv2d(1, 6, 5, padding=2)
        self.conv2 = nn.Conv2d(6, 16, 5)
        self.fc1 = nn.Linear(16 * 5 * 5, 120)
        self.fc2 = nn.Linear(120, 84)
        self.classifier = nn.Linear(84, 10)

        self.accuracy = pl.metrics.Accuracy()
    
    def forward(self, x):
        x = F.relu(self.conv1(x))
        x = F.max_pool2d(x, (2, 2))
        x = F.relu(self.conv2(x))
        x = F.max_pool2d(x, (2, 2))
        x = x.view(-1, 16 * 5 * 5)
        x = F.relu(self.fc1(x))
        x = F.relu(self.fc2(x))
        x = self.classifier(x)
        x = F.softmax(x, dim=0)

        return x
    
    def configure_optimizers(self):
        return torch.optim.Adam(self.parameters())
    
    def _shared_step(self, batch, batch_idx):
        x, y = batch
        y_hat = self(x)
        loss = F.cross_entropy(y_hat, y)
        self.log('acc', self.accuracy(y_hat, y), prog_bar=True)
        return loss

    def training_step(self, batch, batch_idx):
        return self._shared_step(batch, batch_idx)
    
    def validation_step(self, batch, batch_idx):
        return self._shared_step(batch, batch_idx)
    
    def test_step(self, batch, batch_idx):
        return self._shared_step(batch, batch_idx)
    
    def validation_epoch_end(self, outputs):
        self.log('acc', self.accuracy.compute(), prog_bar=True)
mnist = MNISTDataModule('./data', num_workers=2)
model = LitLeNet()

trainer = pl.Trainer(max_epochs=1)
trainer.fit(model, datamodule=mnist)

created time in 3 days

issue openedPyTorchLightning/pytorch-lightning

Get progress bar in VS Code instead of text/stream based progress bar

❓ Questions and Help

Before asking:

  1. Try to find answers to your questions in the Lightning Forum!
  2. Search for similar issues.
  3. Search the docs.

<!-- If you still can't find what you need: -->

Hi, one of the maintainers of the Python extension that provides Jupyter functionality in VS Code. Here's the original issue: https://github.com/microsoft/vscode-python/issues/14476#issuecomment-714895448

What is your question?

When running the code in class Jupyter notebook, we get the widget (I think tqdm) progress bar. However, when running the exact same code in VS Code, we get the class text stream based progress bar.

I would like to get the progress bar (tqdm) being rendererd in the output when running cells in VS Code.

Does this package have some auto detection of the host (whether its Jupyter labs/notebook) & then renders the progress bar as widgets & when executed from another front end like VSCode it will render it using text streams.

Please note: we are not using Jupyter to run the code, we're starting the Python kernel & communicating with the kernel over ZQM directly. Hence Jupyter is not avaiable. Finally, VS Code does support IPyWidgets functionality.

Thanks for your help.

Code

import torch
from torch import nn
from torch.nn import functional as F

from pl_bolts.datamodules.mnist_datamodule import MNISTDataModule
import pytorch_lightning as pl
class LitLeNet(pl.LightningModule):

    def __init__(self, *args, **kwargs):
        super().__init__(*args, **kwargs)

        self.conv1 = nn.Conv2d(1, 6, 5, padding=2)
        self.conv2 = nn.Conv2d(6, 16, 5)
        self.fc1 = nn.Linear(16 * 5 * 5, 120)
        self.fc2 = nn.Linear(120, 84)
        self.classifier = nn.Linear(84, 10)

        self.accuracy = pl.metrics.Accuracy()
    
    def forward(self, x):
        x = F.relu(self.conv1(x))
        x = F.max_pool2d(x, (2, 2))
        x = F.relu(self.conv2(x))
        x = F.max_pool2d(x, (2, 2))
        x = x.view(-1, 16 * 5 * 5)
        x = F.relu(self.fc1(x))
        x = F.relu(self.fc2(x))
        x = self.classifier(x)
        x = F.softmax(x, dim=0)

        return x
    
    def configure_optimizers(self):
        return torch.optim.Adam(self.parameters())
    
    def _shared_step(self, batch, batch_idx):
        x, y = batch
        y_hat = self(x)
        loss = F.cross_entropy(y_hat, y)
        self.log('acc', self.accuracy(y_hat, y), prog_bar=True)
        return loss

    def training_step(self, batch, batch_idx):
        return self._shared_step(batch, batch_idx)
    
    def validation_step(self, batch, batch_idx):
        return self._shared_step(batch, batch_idx)
    
    def test_step(self, batch, batch_idx):
        return self._shared_step(batch, batch_idx)
    
    def validation_epoch_end(self, outputs):
        self.log('acc', self.accuracy.compute(), prog_bar=True)
mnist = MNISTDataModule('./data', num_workers=2)
model = LitLeNet()

trainer = pl.Trainer(max_epochs=1)
trainer.fit(model, datamodule=mnist)

Here's the output in VS Code

Epoch 0:  92%|█████████▏| 1718/1874 [00:17<00:01, 98.09it/s, loss=2.047, v_num=19, acc=0.875]
Validating: 0it [00:00, ?it/s]

Here's the output in Jupyter Notebooks Screen Shot 2020-10-23 at 13 01 48

<!-- Please paste a code snippet if your question requires it! -->

What have you tried?

What's your environment?

  • OS: [e.g. iOS, Linux, Win] - OSX
  • Packaging [e.g. pip, conda] - Pip
  • Version [e.g. 0.5.2.1]
    • Python 3.8.2
    • pytorch_lightning 1.0.3
    • pytorch-lightning-bolts 0.2.5
    • torch 1.6.0
    • torchvision 0.7.0

created time in 3 days

issue closedjupyter/notebook

How to get widget progress instead of text stream for progress bars

Hi, one of the maintainers of the VS Code extension that supports Jupyter functionality. When I run the following code in a Jupyter notebook, I get pretty progress bars (I get the ipywidgets). & I can see that the ipywidgest data comes through in the output as well & saved in ipynb. However, when I run the same code in VSCode, we get plain ansi text based (terminal) progress bars.

Is there something (some initialization code) we need to setup in VS Code to tell Jupyter to return output for progress bar as IPyWidgets?

Original issue https://github.com/microsoft/vscode-python/issues/14476#issuecomment-714895448

Thanks,

Here's the output we get when running the same code against the kernel from VS Code As you can see its just a stream of text

  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {},
   "outputs": [
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "GPU available: False, used: False\n",
      "TPU available: False, using: 0 TPU cores\n",
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Epoch 0:  92%|█████████▏| 1718/1874 [00:29<00:02, 58.67it/s, loss=2.044, v_num=17, acc=0.875]\n",
      "Validating: 0it [00:00, ?it/s]\u001b[A\n",
      "Epoch 0:  92%|█████████▏| 1721/1874 [00:30<00:02, 56.62it/s, loss=2.044, v_num=17, acc=0.875]\n",

Here's the output we get when running the same code against classic Jupyter Notebooks

  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {},
   "outputs": [
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "GPU available: False, used: False\n",
      "TPU available: False, using: 0 TPU cores\n",
     ]
    },
    {
     "data": {
      "application/vnd.jupyter.widget-view+json": {
       "model_id": "",
       "version_major": 2,
       "version_minor": 0
      },
      "text/plain": [
       "HBox(children=(FloatProgress(value=1.0, bar_style='info', description='Validation sanity check', layout=Layout…"
      ]
     },

Here's the Python code

import torch
from torch import nn
from torch.nn import functional as F

from pl_bolts.datamodules.mnist_datamodule import MNISTDataModule
import pytorch_lightning as pl
class LitLeNet(pl.LightningModule):

    def __init__(self, *args, **kwargs):
        super().__init__(*args, **kwargs)

        self.conv1 = nn.Conv2d(1, 6, 5, padding=2)
        self.conv2 = nn.Conv2d(6, 16, 5)
        self.fc1 = nn.Linear(16 * 5 * 5, 120)
        self.fc2 = nn.Linear(120, 84)
        self.classifier = nn.Linear(84, 10)

        self.accuracy = pl.metrics.Accuracy()
    
    def forward(self, x):
        x = F.relu(self.conv1(x))
        x = F.max_pool2d(x, (2, 2))
        x = F.relu(self.conv2(x))
        x = F.max_pool2d(x, (2, 2))
        x = x.view(-1, 16 * 5 * 5)
        x = F.relu(self.fc1(x))
        x = F.relu(self.fc2(x))
        x = self.classifier(x)
        x = F.softmax(x, dim=0)

        return x
    
    def configure_optimizers(self):
        return torch.optim.Adam(self.parameters())
    
    def _shared_step(self, batch, batch_idx):
        x, y = batch
        y_hat = self(x)
        loss = F.cross_entropy(y_hat, y)
        self.log('acc', self.accuracy(y_hat, y), prog_bar=True)
        return loss

    def training_step(self, batch, batch_idx):
        return self._shared_step(batch, batch_idx)
    
    def validation_step(self, batch, batch_idx):
        return self._shared_step(batch, batch_idx)
    
    def test_step(self, batch, batch_idx):
        return self._shared_step(batch, batch_idx)
    
    def validation_epoch_end(self, outputs):
        self.log('acc', self.accuracy.compute(), prog_bar=True)
mnist = MNISTDataModule('./data', num_workers=2)
model = LitLeNet()

trainer = pl.Trainer(max_epochs=1)
trainer.fit(model, datamodule=mnist)

closed time in 3 days

DonJayamanne

issue commentjupyter/notebook

How to get widget progress instead of text stream for progress bars

Thanks, will close this.

DonJayamanne

comment created time in 3 days

issue openedjupyter/notebook

How to get widget progress instead of text stream for progress bars

Hi, one of the maintainers of the VS Code extension that supports Jupyter functionality. When I run the following code in a Jupyter notebook, I get pretty progress bars (I get the ipywidgets). & I can see that the ipywidgest data comes through in the output as well & saved in ipynb. However, when I run the same code in VSCode, we get plain ansi text based (terminal) progress bars.

Is there something (some initialization code) we need to setup in VS Code to tell Jupyter to return output for progress bar as IPyWidgets?

Here's the output we get when running the same code against the kernel from VS Code As you can see its just a stream of text

  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {},
   "outputs": [
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "GPU available: False, used: False\n",
      "TPU available: False, using: 0 TPU cores\n",
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Epoch 0:  92%|█████████▏| 1718/1874 [00:29<00:02, 58.67it/s, loss=2.044, v_num=17, acc=0.875]\n",
      "Validating: 0it [00:00, ?it/s]\u001b[A\n",
      "Epoch 0:  92%|█████████▏| 1721/1874 [00:30<00:02, 56.62it/s, loss=2.044, v_num=17, acc=0.875]\n",

Here's the output we get when running the same code against classic Jupyter Notebooks

  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {},
   "outputs": [
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "GPU available: False, used: False\n",
      "TPU available: False, using: 0 TPU cores\n",
     ]
    },
    {
     "data": {
      "application/vnd.jupyter.widget-view+json": {
       "model_id": "",
       "version_major": 2,
       "version_minor": 0
      },
      "text/plain": [
       "HBox(children=(FloatProgress(value=1.0, bar_style='info', description='Validation sanity check', layout=Layout…"
      ]
     },

Here's the Python code

import torch
from torch import nn
from torch.nn import functional as F

from pl_bolts.datamodules.mnist_datamodule import MNISTDataModule
import pytorch_lightning as pl
class LitLeNet(pl.LightningModule):

    def __init__(self, *args, **kwargs):
        super().__init__(*args, **kwargs)

        self.conv1 = nn.Conv2d(1, 6, 5, padding=2)
        self.conv2 = nn.Conv2d(6, 16, 5)
        self.fc1 = nn.Linear(16 * 5 * 5, 120)
        self.fc2 = nn.Linear(120, 84)
        self.classifier = nn.Linear(84, 10)

        self.accuracy = pl.metrics.Accuracy()
    
    def forward(self, x):
        x = F.relu(self.conv1(x))
        x = F.max_pool2d(x, (2, 2))
        x = F.relu(self.conv2(x))
        x = F.max_pool2d(x, (2, 2))
        x = x.view(-1, 16 * 5 * 5)
        x = F.relu(self.fc1(x))
        x = F.relu(self.fc2(x))
        x = self.classifier(x)
        x = F.softmax(x, dim=0)

        return x
    
    def configure_optimizers(self):
        return torch.optim.Adam(self.parameters())
    
    def _shared_step(self, batch, batch_idx):
        x, y = batch
        y_hat = self(x)
        loss = F.cross_entropy(y_hat, y)
        self.log('acc', self.accuracy(y_hat, y), prog_bar=True)
        return loss

    def training_step(self, batch, batch_idx):
        return self._shared_step(batch, batch_idx)
    
    def validation_step(self, batch, batch_idx):
        return self._shared_step(batch, batch_idx)
    
    def test_step(self, batch, batch_idx):
        return self._shared_step(batch, batch_idx)
    
    def validation_epoch_end(self, outputs):
        self.log('acc', self.accuracy.compute(), prog_bar=True)
mnist = MNISTDataModule('./data', num_workers=2)
model = LitLeNet()

trainer = pl.Trainer(max_epochs=1)
trainer.fit(model, datamodule=mnist)

created time in 3 days

GollumEvent
GollumEvent

Pull request review commentmicrosoft/vscode-python

No DS merge into main

 export class DataScienceInstaller extends BaseInstaller {          const moduleName = translateProductToModule(product, ModuleNamePurpose.install);

Yes, from DS we need ability to install python packages. Python knows how best to install extensions & the like, hence would like to leave that to python, let python do what it does best.

IanMatthewHuff

comment created time in 4 days

PullRequestReviewEvent

Pull request review commentmicrosoft/vscode-python

No DS merge into main

 export interface ICommandNameArgumentTypeMapping extends ICommandNameWithoutArgu     [Commands.navigateToTestFile]: [Uri, TestDataItem, boolean];     [Commands.navigateToTestFunction]: [Uri, TestDataItem, boolean];     [Commands.navigateToTestSuite]: [Uri, TestDataItem, boolean];-    [DSCommands.ExportFileAndOutputAsNotebook]: [Uri];-    [DSCommands.RunAllCells]: [Uri];-    [DSCommands.RunCell]: [Uri, number, number, number, number];-    [DSCommands.RunAllCellsAbove]: [Uri, number, number];-    [DSCommands.RunCellAndAllBelow]: [Uri, number, number];-    [DSCommands.RunAllCellsAbovePalette]: [];-    [DSCommands.RunCellAndAllBelowPalette]: [];-    [DSCommands.DebugCurrentCellPalette]: [];-    [DSCommands.RunToLine]: [Uri, number, number];-    [DSCommands.RunFromLine]: [Uri, number, number];-    [DSCommands.ImportNotebook]: [undefined | Uri, undefined | CommandSource];-    [DSCommands.ImportNotebookFile]: [undefined | Uri, undefined | CommandSource];     [DSCommands.OpenNotebook]: [undefined | Uri, undefined | CommandSource];-    [DSCommands.OpenNotebookInPreviewEditor]: [undefined | Uri];-    [DSCommands.ExportFileAsNotebook]: [undefined | Uri, undefined | CommandSource];-    [DSCommands.RunFileInInteractiveWindows]: [Uri];-    [DSCommands.DebugFileInInteractiveWindows]: [Uri];-    [DSCommands.DebugCell]: [Uri, number, number, number, number];-    [DSCommands.DebugStepOver]: [];-    [DSCommands.DebugStop]: [];-    [DSCommands.DebugContinue]: [];-    [DSCommands.RunCurrentCellAndAddBelow]: [Uri];-    [DSCommands.InsertCellBelowPosition]: [];-    [DSCommands.InsertCellBelow]: [];-    [DSCommands.InsertCellAbove]: [];-    [DSCommands.DeleteCells]: [];-    [DSCommands.SelectCell]: [];-    [DSCommands.SelectCellContents]: [];-    [DSCommands.ExtendSelectionByCellAbove]: [];-    [DSCommands.ExtendSelectionByCellBelow]: [];-    [DSCommands.MoveCellsUp]: [];-    [DSCommands.MoveCellsDown]: [];-    [DSCommands.ChangeCellToMarkdown]: [];-    [DSCommands.ChangeCellToCode]: [];-    [DSCommands.GotoNextCellInFile]: [];-    [DSCommands.GotoPrevCellInFile]: [];-    [DSCommands.ScrollToCell]: [Uri, string];-    [DSCommands.ViewJupyterOutput]: [];-    [DSCommands.ExportAsPythonScript]: [INotebookModel, PythonEnvironment | undefined];-    [DSCommands.ExportToHTML]: [INotebookModel, string | undefined, PythonEnvironment | undefined];-    [DSCommands.ExportToPDF]: [INotebookModel, string | undefined, PythonEnvironment | undefined];-    [DSCommands.Export]: [Uri | INotebookModel, string | undefined, PythonEnvironment | undefined];-    [DSCommands.SetJupyterKernel]: [KernelConnectionMetadata, Uri, undefined | Uri];-    [DSCommands.SwitchJupyterKernel]: [ISwitchKernelOptions | undefined];-    [DSCommands.SelectJupyterCommandLine]: [undefined | Uri];-    [DSCommands.SaveNotebookNonCustomEditor]: [INotebookModel];-    [DSCommands.SaveAsNotebookNonCustomEditor]: [INotebookModel, Uri];-    [DSCommands.OpenNotebookNonCustomEditor]: [Uri];-    [DSCommands.GatherQuality]: [string];-    [DSCommands.LatestExtension]: [string];-    [DSCommands.EnableLoadingWidgetsFrom3rdPartySource]: [undefined | never];-    [DSCommands.TrustNotebook]: [undefined | never | Uri];-    [DSCommands.NotebookEditorExpandAllCells]: [];-    [DSCommands.NotebookEditorCollapseAllCells]: [];-    [DSCommands.ShowDataViewer]: [IShowDataViewerFromVariablePanel];+    [DSCommands.RunAllCells]: [Uri];

Yes, all of these are DS specific & belong elsehwere.

IanMatthewHuff

comment created time in 4 days

PullRequestReviewEvent

issue commentmicrosoft/vscode-python

Terrible outputs when making multi HBox.

Thanks for filing this issue, please could you provide the entire sample code to replicate this.

Jiuh-star

comment created time in 4 days

issue commentmicrosoft/vscode-python

Unable to run cell due to error `Failed to find a kernelspec to use for ipykernel launch`

@vherasme

Please could you open a new issue and provide the information on the issue template (logs, etc)

jayeff34

comment created time in 5 days

PR closed DonJayamanne/pythonVSCode

Voice Assistant in python

import os os.add_dll_directory("F:\movie") import speech_recognition as sr from google import google import pyttsx3 answers = { 'name': 'You should already know that, because you called me just now', 'yourself':'i am a virtual friend designed by ekansh jain ', 'marry':'sorry i am a virtual assistant', 'love':'i love someone else', 'hate':'Imao look at your face', 'children':'oh please', 'chat':'oh please i ignore you do not understand that', 'manu':'manu is a idiot person in this world take some distance from her its is better than you and me', 'wit':'it is better than we do not talk on this topic', 'google':'Google, LLC is an American multinational technology company that specializes in Internet-related services and products, which include online advertising technologies, a search engine, cloud computing, software, and hardware', 'corona':'''COVID-19 affects different people in different ways. Most infected people will develop mild to moderate illness and recover without hospitalization. Most common symptoms: fever dry cough tiredness Less common symptoms: aches and pains sore throat diarrhoea conjunctivitis headache loss of taste or smell a rash on skin, or discolouration of fingers or toes Serious symptoms: difficulty breathing or shortness of breath chest pain or pressure loss of speech or movement Seek immediate medical attention if you have serious symptoms. Always call before visiting your doctor or health facility. People with mild symptoms who are otherwise healthy should manage their symptoms at home. On average it takes 5–6 days from when someone is infected with the virus for symptoms to show, however it can take up to 14 days.''', 'shubh':'Ab ish chutiye ke bare me puch rhe ho toh suno itna dushro ki fikar krta he ki tujhe pta he yeh hua tujhe pta he voh hua etc etc', 'bye':'Do not disturb me again bye!'

} r=sr.Recognizer() r1=sr.Recognizer()

engine = pyttsx3.init('sapi5') voices = engine.getProperty('voices')

engine.setProperty('voice', voices[1].id)

def SpeakText(command): engine=pyttsx3.init() engine.say(command) engine.runAndWait()

def solutionFinder(incomingText): answer=''

if 'your name' in incomingText:
        answer = answers['name']
    
elif 'yourself' in incomingText:
        answer = answers['yourself']

elif 'marry' in incomingText:
        answer = answers['marry']

elif 'love' in incomingText:
        answer = answers['love']

elif 'hate' in incomingText:
        answer = answers['hate']
    
elif 'children' in incomingText:
        answer = answers['children']
    
elif 'chat' in incomingText:
        answer = answers['chat']
    
    
elif 'manu' in incomingText:
        answer = answers['manu']
    
    
    
elif 'w i t' in incomingText:
        answer = answers['wit']

    
    
elif 'google' in incomingText:
        answer = answers['google']

    
    
elif 'corona' in incomingText:
        answer= answers['corona']
    
    
elif 'shubh' in incomingText:
        answer= answers['shubh']
    
    
elif 'bye' in incomingText:
        answer= answers['bye']
    
    
    
SpeakText(answer)

while(1): try:

    with sr.Microphone() as source2:
        r.adjust_for_ambient_noise(source2,duration=0.2) 

        print("Call me alex") 
        audio2 = r.listen(source2,phrase_time_limit=4)

        MyText =''
        MyText = r.recognize_google(audio2)
        MyText = MyText.lower()
        print(MyText)

        if 'alex' in MyText:
            SpeakText('tell me')
            r1.adjust_for_ambient_noise(source2,duration=0.2)
            print('Listening.....')
            audio3 = r1.listen(source2,phrase_time_limit=4)

            MyNewText = ''
            MyNewText = r1.recognize_google(audio3)
            MyNewText = MyNewText.lower()
            print("you said " + MyNewText)
            solutionFinder(MyNewText)

except sr.RequestError as e:
    print("could not request results : {0}".format(e))

except sr.UnknownValueError:
    pass

except sr.WaitTimeoutError:
    pass
+2157 -823

0 comment

123 changed files

ekanshjain0

pr closed time in 5 days

PR opened microsoft/vscode-python

Test

For #

<!-- If an item below does not apply to you, then go ahead and check it off as "done" and strikethrough the text, e.g.: - [x] ~Has unit tests & system/integration tests~ -->

  • [ ] Pull request represents a single change (i.e. not fixing disparate/unrelated things in a single PR).
  • [ ] Title summarizes what is changing.
  • [ ] Has a news entry file (remember to thank yourself!).
  • [ ] Appropriate comments and documentation strings in the code.
  • [ ] Has sufficient logging.
  • [ ] Has telemetry for enhancements.
  • [ ] Unit tests & system/integration tests are added/updated.
  • [ ] Test plan is updated as appropriate.
  • [ ] package-lock.json has been regenerated by running npm install (if dependencies have changed).
  • [ ] The wiki is updated with any design decisions/details.
+1 -0

0 comment

1 changed file

pr created time in 5 days

create barnchDonJayamanne/pythonVSCode

branch : testCI

created branch time in 5 days

delete branch DonJayamanne/pythonVSCode

delete branch : deps

delete time in 5 days

PR closed microsoft/vscode-python

Reviewers
Move DS dependencies into `dependencies` section in package.json

For #12253

  • All changes are related to DS except the following
    • Moved core extension dependencies from devDependencies into dependencies. (sourcemap-support & @enonic/fnv-plus)
  • Changed version of some packages (we were shipping one version, but package.json had another, shipping later versions due to other dependencies pulling later versions)
  • Updated some type definitions (for some reason compiler would complain, as it was a noop i didn't dig into the reason)
  • Removed some unnecessary type definitions
+6195 -9279

1 comment

8 changed files

DonJayamanne

pr closed time in 5 days

push eventmicrosoft/vscode-python

Joyce Er

commit sha d63031c9bd461e7f8de74313144aa0e1f6cfdf83

Put debugger data viewer integration behind an experiment (#14460)

view details

push time in 5 days

delete branch microsoft/vscode-python

delete branch : exp

delete time in 5 days

PR merged microsoft/vscode-python

Reviewers
Put debugger data viewer integration behind an experiment skip news

<!-- If an item below does not apply to you, then go ahead and check it off as "done" and strikethrough the text, e.g.: - [x] ~Has unit tests & system/integration tests~ -->

  • [ ] Pull request represents a single change (i.e. not fixing disparate/unrelated things in a single PR).
  • [ ] Title summarizes what is changing.
  • [ ] Has a news entry file (remember to thank yourself!).
  • [ ] Appropriate comments and documentation strings in the code.
  • [ ] Has sufficient logging.
  • [ ] Has telemetry for enhancements.
  • [ ] Unit tests & system/integration tests are added/updated.
  • [ ] Test plan is updated as appropriate.
  • [ ] package-lock.json has been regenerated by running npm install (if dependencies have changed).
  • [ ] The wiki is updated with any design decisions/details.
+67 -13

5 comments

9 changed files

joyceerhl

pr closed time in 5 days

PullRequestReviewEvent

Pull request review commentmicrosoft/vscode-python

Put debugger data viewer integration behind an experiment

+import { inject, injectable } from 'inversify';+import { IExtensionSingleActivationService } from '../../activation/types';+import { ICommandManager } from '../../common/application/types';+import { ContextKey } from '../../common/contextKey';+import { IExperimentService } from '../../common/types';++@injectable()+export class DebuggerDataViewerExperimentEnabler implements IExtensionSingleActivationService {+    constructor(+        @inject(ICommandManager) private readonly commandManager: ICommandManager,+        @inject(IExperimentService) private readonly experimentService: IExperimentService+    ) {}+    public async activate() {

You might want to run this in the background. I.e.

public async activate(){
	this.activeInternal().catch(noop);
}

private async activateInternal(){
	....
}

Else this code blocks the startup perf of the extension. I.e. any code in IExtnesionSingleActivation.active method ends up running in the startup process of extension & as they are promises they are awaited on, meaning it slows down extension. We need to do this only where necessary.

joyceerhl

comment created time in 5 days

PullRequestReviewEvent
PullRequestReviewEvent

issue openedmicrosoft/vscode

Add ability to hide outputs in Notebooks

Request for ability to hide output from notebooks.

Currently in the Python implementation of Notebooks, we have output that are hidden.

  • Today these are neither displayed in our old Python Notebooks nor in Jupyter
  • As far as I can tell, most of these outputs end up as Rich Displays, containing an object with a single key. However no real data for display purposes.
  • The outputs are not displayed, however they are persisted on disck (i.e. they are part of the ipynb content).

Adding an issue for what was discussed (forgot to add this issue last week). @rebornix /cc

created time in 5 days

PullRequestReviewEvent
PullRequestReviewEvent

Pull request review commentmicrosoft/vscode-python

Upgrade to vsc 1.49 and fix nyc compile error

         "theme": "dark"     },     "engines": {-        "vscode": "^1.48.0"+        "vscode": "^1.49.0"

Why not 1.50

joyceerhl

comment created time in 6 days

PullRequestReviewEvent
PullRequestReviewEvent
PullRequestReviewEvent

pull request commentmicrosoft/vscode-python

No DS merge into main

here so that the extension is up on notebook open.

Wouldn't the other extension activate Python extension instead? I.e. Python will get activated due to DS code getting activated when Notebook is open.

IanMatthewHuff

comment created time in 6 days

issue commentmicrosoft/vscode

Unable to load Tensorboard in Notebook

This is using the VS Code notebook APIs and not custom editors or webview directly, correct

Yes (used in output using VSCode notebooks API)

oes the python extension set any sort of content security polity in its content that could be blocking this?

This isn't a web server started by Python extension. When running %load_ext tensorboard, tensor flow starts the local web server.

DonJayamanne

comment created time in 7 days

create barnchmicrosoft/vscode-python

branch : myNoDS

created branch time in 7 days

push eventmicrosoft/vscode-python

Don Jayamanne

commit sha a5b9ac986a2b794049a8c5a48066a6186affa071

Temporarily disable updates (#14438)

view details

push time in 7 days

delete branch DonJayamanne/pythonVSCode

delete branch : disableUpdates

delete time in 7 days

PR merged microsoft/vscode-python

Reviewers
Temporarily disable updates skip news
+25 -25

2 comments

1 changed file

DonJayamanne

pr closed time in 7 days

push eventDonJayamanne/pythonVSCode

Don Jayamanne

commit sha c316855684c0fed1c59c8d39e1d2d9cdc1ae3006

Fixes

view details

push time in 7 days

create barnchDonJayamanne/pythonVSCode

branch : myNoDS

created branch time in 7 days

issue openedmicrosoft/vscode

Kernel Picker displayed when running cells before preferred kernel is auto selected

With the Python extension:

  • Assume you open a notebook
  • Assume python extension is slow to return the list of kernels (hence slow to return the preferred kernel to VS Code).
  • Next, click on the Run cell icon.
  • VS Code now displays the kernel picker

It seems there's a race condition:

  • When Run is clicked, VS Code doesn't yet have the preferred kernel from extension
  • VSCode then calls extension to get the list of kernels & displays the kernel picker

Suggestion

  • When user clicks Run, wait for first call to extension to complete before checking if extension provides a preferred kernel.

@rebornix /cc

created time in 7 days

issue openedmicrosoft/vscode

Notebooks - HTML elements (widgets) in output overflow & get displayed under the editor

<!-- ⚠️⚠️ Do Not Delete This! feature_request_template ⚠️⚠️ --> <!-- Please read our Rules of Conduct: https://opensource.microsoft.com/codeofconduct/ --> <!-- Please search existing issues to avoid creating duplicates. -->

<!-- Describe the feature you'd like. --> In the Python extension when enabling IPyWidgets:

  • Some widgest such as beakerx (have calendar controls)
  • These controls are floating HTML elements, however when they overflow the bounds of the widget, they end up getting displayed behind the monaco editor.
  • Seems like a zindex issue (monaco editors) are dislayed over the HTML content, hence get displayed over outputs.

@rebornix /cc

created time in 7 days

issue openedmicrosoft/vscode

Trust Notebook Content and readonly notebooks

Creating an issue to capture what was discussed last week with VS Code: Python extension would like the following capabilities:

  • Hide output when notebook is not trusted (based on some metadata)
  • Trusting a ntoebook (updating this metadata) should not mark the notebook as dirty
  • Disable saving/editing notebooks when a notebook is not trusted
    • This is required, because of todays implementation of trusted notebooks in python extension)
    • Today if a user attempts to save an untrusted notebook, Python extension would have to handle this and swallow this method call (i.e. noop).

@rebornix /cc

created time in 7 days

push eventDonJayamanne/pythonVSCode

Don Jayamanne

commit sha daded4b5e20373b7438623d58b9399ed6ff12ba8

Oops

view details

push time in 7 days

create barnchDonJayamanne/pythonVSCode

branch : disableUpdates

created branch time in 7 days

push eventDonJayamanne/pythonVSCode

Don Jayamanne

commit sha c37744d5ae1af58456cd6c8c144739c959e9e151

Oops

view details

push time in 7 days

push eventDonJayamanne/pythonVSCode

Don Jayamanne

commit sha 515eb7ffc2ce7f4773032e68af143965e580224b

Update API

view details

push time in 7 days

push eventDonJayamanne/pythonVSCode

Rich Chiodo

commit sha fee7e7461053531bfeb0688ba7b0a0e401260bc5

Update vscode-python-pr-validation.yaml (#14285) REmove missing branch? Might make it work again

view details

David Kutugata

commit sha 4659f46027c7d53cc01b26332db5ca2ebad482a4

Merge point release back to main (#14293) * Port ipykernel install fix to release (#13975) * Fix installing ipykernel into interpreters for raw kernel (#13959) * update news Co-authored-by: Ian Huff <ianhuff@CEIDCCEVIPSVC01.redmond.corp.microsoft.com> * Merge in changes to release (#13976) * Up release version for new release (#13928) * Up release version * Update changelog * Update changelog * Workaround test issue (#13930) * Try different version of VS code in release * Change to make it use the actual variable * Use a real version * More tests failing with gpu error (#13935) * Try different version of VS code in release * Change to make it use the actual variable * Use a real version * Two more version changes * Fix kernel and server name missing in certain situations (#13974) * Fix kernel name and server name * Fixup server name for remote situations * Add some functional tests * Add news entry * Delete news file * Port two fixes to the release branch (#13995) * Disable split views of custom editors (#13985) * Fix backup storage by looking at the options correctly (#13983) * Fix backup storage by looking at the options correctly * Fix backup by being more explicit * Only linux tests are failing. Hopefully fix them * Fixup changelog Co-authored-by: Don Jayamanne <don.jayamanne@yahoo.com> * add jedi-language-server to 3rd party notices (#13977) * add jedi-language-server to 3rd party notices * move license from distribution to repository file * disable test_discover_complex_default and (#14024) test_discover_complex_doctest * Upgrade isort to 5.5.3 (#14035) (#14037) * prepare release (#14042) * fixed annoying warnings (#14049) * Cherry pick to address path issues. (#14125) * Do not quote isolated in exec module (#14108) * Do not quote isolated in exec module * Revert "Do not quote isolated in exec module" This reverts commit b9fa04c06be0876861017eff5ee032ca71acda3d. * Revert "IPyKernel install issue with windows paths (#13667)" This reverts commit 23725abd4249811f24475e215c2d78ed5e508e79. * Fix unit test broken by recent revert (#14122) * Port escape fix to release branch (#14133) * Fix HTML escaping to match what Jupyter does (#14038) * Basic idea * add some functional tests * Add news entry * Fix functional tests * Update changelog * update version and changelog (#14139) * Escaping fix broke a number of things (#14145) (#14154) * Fixes for escaping * Push a comment ot start PR again * Cache task is failing * Remove cache task * Not fixing so just put back cache task * Port NB Convert Fix to point release branch (#14200) * Port escape fix to release branch (#14202) * A different way of fixing escaping (#14186) * Move escaping to just output * Add some tests to verify round tripping * Fixup test for rountrip and make roundtripping actually work * Add news entry * Add to manual test file * Fix streaming problem and add more to the test * Fix traceback unit test * Fix problem caught by functional tests :) * Another functional test catch * Update changelog * Port interactive window export fix (#14232) * Select kernel based on metadata in notebook (#14217) (#14234) * Fix picking kernel based on metadata * Port more escape fixes to point release (#14242) * Fix two problems with escaping (#14228) * Fixup changelog * Port prune fix from main to release (#14243) * Remove unneeded cell keys when exporting (#14241) * Remove transient output when exporting from the interactive window * Add news entry * Update changelog * Merge fixes related to remembering interpreter (#14270) * update version, changelog and thrid party notices (#14280) * remove VSC_PYTHON_CI_TEST_VSC_CHANNEL and test skips * delete ipynb file * delete solved news files * delete more news Co-authored-by: Ian Huff <ianhu@microsoft.com> Co-authored-by: Ian Huff <ianhuff@CEIDCCEVIPSVC01.redmond.corp.microsoft.com> Co-authored-by: Rich Chiodo <rchiodo@users.noreply.github.com> Co-authored-by: Don Jayamanne <don.jayamanne@yahoo.com> Co-authored-by: Kartik Raj <karraj@microsoft.com> Co-authored-by: Karthik Nadig <kanadig@microsoft.com>

view details

Rich Chiodo

commit sha 4fc88664d68eebebf7970c7419274b994166f8f4

Dont run on push (#14307)

view details

Brett Cannon

commit sha 68aeb2737daa9b86457f1d2df6f3619f7e975aa2

Stop listing Python 2.7 in the README We aren't explicitly dropping support, but we don't want to mislead users that everything works either (e.g. isort 5 preventing "Sort Imports" from working under Python 2.7).

view details

Don Jayamanne

commit sha 8b8fbbf507aa03beca4301957783978740f43ea3

Fixes to blowing away of kernel info & not using right startup info (#14295)

view details

Karthik Nadig

commit sha a4d1667e1f9550cd62ae3d88d9323bf2f4242a30

Add API to get data from registry (#14297) * Add API to get data from registry * Address Comments * more tweaks

view details

Brett Cannon

commit sha c93bebf94635ef3d9787f600fae5ea1efc81e682

Turn on CodeQL (#14310)

view details

Kim-Adeline Miguel

commit sha e114152bfc716a1d7513dbc7a3c4b04284343a9a

Apply insiders space changes to release workflow (#14305)

view details

Kim-Adeline Miguel

commit sha 260adf652e6f72f73e55cc165c3d2a625ca62e95

Fix unit tests failing because of spaces in the Insiders workflow (#14306) * Add .fileToCommandArgument() * Add custom workflow to test with spaces * Use toCommandArgument instead of fileToCommandArgument * Fix upload coverage step * $$$$$ * Delete test workflow * Update upload coverage step

view details

Eric Snow

commit sha bc1d780c02c33bd87e8646ddc9598735158021bb

Add CachingLocator. (#14020) Note that we factored out the BackgroundRequestLooper class to keep CachingLocator focused, especially as it was important to deal with one "refresh" at a time.

view details

Don Jayamanne

commit sha 4ada81007c4c91a2a325046bea8d40f06bc26e76

Default cell language for native notebooks (#14314) For #13522 , #13520 * Do not prompt to install ipykernel for non-python kernels * Default the cell of the next blank notebook to language of last saved/used notebook. * Ability to search for kernels based on language (even if kernel spec is not available) * Added Julia language, so users can install this extension and run Julia kernels (remember, they need to select a `Jualia` language in the cell of a VSCode native editor. However Jualia is not a built in language. Will need to submit a PR upstream). * Added tests

view details

Rich Chiodo

commit sha 1a6aa562e20dc9a5145bbf83cd69f03f3c12c6e9

Fix random failures on functional tests (#14331) * Splitting test log * Fix problem with kernels ports being reused * Make kernel launcher port round robin only for testing * Make formatters change only apply during testing * Add news entry * Apply black formatting * Code review feedback and skip flakey remote password test * Another flakey test * More CR feedback * Missed a spot

view details

Joyce Er

commit sha 9d7b40c200d1d3f89980940d296ccef8704b60c4

GitHub bot should ignore epics when assigning data science issues (#14286)

view details

Don Jayamanne

commit sha 957b536f7fde2ceb21769499c9acb5ce702bb8ad

Ignore formatting in ipynb when dealing with trust (#14333)

view details

Joyce Er

commit sha 4ef925316a091eac0e150e9c62c6f9b21766f11c

Disable surveys if running in codespaces (#14332) * Disable surveys if running in codespaces * Also disable debugger survey * Disable gather survey in codespaces too * For gather, show a description without the survey * Fixes for IW tests where UIKind is not defined * Fix all the tests where UIKind is not defined * Appease hygiene

view details

Joyce Er

commit sha 1b831677699ae245ce2231f7010243b832b22e1b

Disable mailing list if running in Codespaces (#14347)

view details

Joyce Er

commit sha a24d64a57d0a38d71029c0f0049aa75cd83ac797

Show tensor dimensions in variable explorer (#14244)

view details

Ian Huff

commit sha 842a0b30e3b62e3f404158d5bcc363a53996acdc

Use environment NB Convert (#14308)

view details

Don Jayamanne

commit sha 66e0eca1b134d0b203dd760b9c6295bd1f86e7af

Fixes to trust service (#14352)

view details

Rich Chiodo

commit sha 74253efac697778e4a5b9969d97ec2d9b14d6a10

More of the functional tests are failing (#14346) * Splitting test log * Fix problem with kernels ports being reused * Make kernel launcher port round robin only for testing * Make formatters change only apply during testing * Add news entry * Apply black formatting * Code review feedback and skip flakey remote password test * Another flakey test * More CR feedback * Missed a spot * Some more log parser changes and try to get interrupt to be less flakey * Fix interrupt killing kernel and add more logging for export * More logging * See if updating fixes the problem * Dont delete temp files * Upload webview output to figure out trust failure * Add name to step * Try another way to upload * Upload doesn't seem to work * Try a different way to upload * Try without webview logging as this makes the test pass * Try fixing test another way. Any logging is making the test pass * Compile error

view details

push time in 7 days

Pull request review commentmicrosoft/vscode-python

Update package.json

 steps:   #     echo Gulp Version = `gulp --version`   #   condition: and(succeeded(), eq(variables['system.debug'], 'true'))   #   displayName: Show Dependency Versions++  - bash: |+      az login+      az storage blob download --file $(VSIX_NAME_JUPYTER) --account-name pvsc --container-name extension-builds --name $(VSIX_NAME_JUPYTER)+    displayName: 'Download Jupyter VSIX'

Wrong container. The container is extension-builds-jupyter

joyceerhl

comment created time in 8 days

Pull request review commentmicrosoft/vscode-python

Update package.json

 const extensionDevelopmentPath = process.env.CODE_EXTENSIONS_PATH  const channel = process.env.VSC_PYTHON_CI_TEST_VSC_CHANNEL || 'stable'; -function start() {+function requiresJupyterExtensionToBeInstalled() {+    return process.env.TEST_FILES_SUFFIX === 'smoke.test' || process.env.RESOLVE_EXTENSION_DEPENDENCIES === 'true';+}

Why not initialize env var for smoke tests too in ci job or is code that launch smoke tests instead of hardcoding the file extension. Ie have one way to go this.

joyceerhl

comment created time in 8 days

Pull request review commentmicrosoft/vscode-python

Update package.json

 const extensionDevelopmentPath = process.env.CODE_EXTENSIONS_PATH  const channel = process.env.VSC_PYTHON_CI_TEST_VSC_CHANNEL || 'stable'; -function start() {+function requiresJupyterExtensionToBeInstalled() {+    return process.env.TEST_FILES_SUFFIX === 'smoke.test' || process.env.RESOLVE_EXTENSION_DEPENDENCIES === 'true';+}

Not a mandatory change.

joyceerhl

comment created time in 8 days

Pull request review commentmicrosoft/vscode-python

Update package.json

         "workspaceContains:pyproject.toml",         "onCustomEditor:ms-python.python.notebook.ipynb"     ],+    "extensionDependencies": [+        "ms-toolsai.jupyter"+    ],

We can't hardcode this. As discussed recently, this must be done only at build time. Else anyone working on this extension (dev time) will need to install the Jupyter extension. Ie core devs will always have to install this extension to do their dev work, when it's not necessary. We need to update package.json only when building the vsix

joyceerhl

comment created time in 8 days

PullRequestReviewEvent
PullRequestReviewEvent

issue commentmicrosoft/vscode-python

Support for Pyspark interactive

Probably good to discuss the requirements and the api, on teams

rchiodo

comment created time in 12 days

issue commentmicrosoft/vscode-python

Support for Pyspark interactive

interface IKernelSpec { // Fields of a jupyter kernelspec.json // Maybe live id for an already running kernel? }

Doesn't the kernel model contain information about a running kernel. Is that what you mean by live Id? I'd prefer to use the existing Jupyter types where possible.

rchiodo

comment created time in 12 days

issue commentmicrosoft/vscode-python

Support for Pyspark interactive

Let an extension send code to this interactive window (This would likely be useful for other language extensions)

Wouldn't it be better for other languages to provide the cell locstions instead? This way we can add the code lenses, and execute things ourselves and support all of the shortcuts. That's how I did it in the past. Is easier for other languages to integrate. And we won't have to expose execution of code.

Woulf be good to know their requirements here as well.

rchiodo

comment created time in 12 days

push eventmicrosoft/vscode-python

Don Jayamanne

commit sha cb9e291c4c2cf938a8e0239d9f00ee6b4ea2bb31

Remove a lot of unnecessary dependencies & code (#14403)

view details

push time in 12 days

delete branch microsoft/vscode-python

delete branch : removeMoreStuff

delete time in 12 days

PR merged microsoft/vscode-python

Reviewers
Remove a lot of unnecessary dependencies & code skip news
+15373 -35640

3 comments

68 changed files

DonJayamanne

pr closed time in 12 days

push eventmicrosoft/vscode-python

Don Jayamanne

commit sha 2c3ace5df8b31c578a22607efa9188eb857e1178

Fixes

view details

push time in 12 days

push eventmicrosoft/vscode-python

Don Jayamanne

commit sha 6360bf39ff46917720fc4940088b63b7bb0e0f0b

More changes

view details

push time in 12 days

Pull request review commentmicrosoft/vscode-python

Remove a lot of unnecessary dependencies & code

     "dependencies": {         "@jupyter-widgets/schema": "^0.4.0",         "@jupyterlab/coreutils": "^3.1.0",-        "@jupyterlab/services": "^4.2.0",

Lol, Remove a lot of unnecessary dependencies, and there was just one depednency that had been removed in the original PR... Fixed now.

DonJayamanne

comment created time in 12 days

PullRequestReviewEvent

push eventmicrosoft/vscode-python

Don Jayamanne

commit sha 7f592dd4181b2966964eb6cbba60349ef3fdec03

Remove

view details

push time in 12 days

Pull request review commentmicrosoft/vscode-python

Remove a lot of unnecessary dependencies & code

     "dependencies": {         "@jupyter-widgets/schema": "^0.4.0",         "@jupyterlab/coreutils": "^3.1.0",-        "@jupyterlab/services": "^4.2.0",

made a mistake with npm uninstall, used commas. Submitted a fix.

DonJayamanne

comment created time in 12 days

PullRequestReviewEvent

Pull request review commentmicrosoft/vscode-python

Remove a lot of unnecessary dependencies & code

     "dependencies": {         "@jupyter-widgets/schema": "^0.4.0",         "@jupyterlab/coreutils": "^3.1.0",-        "@jupyterlab/services": "^4.2.0",

Wait, i thought i removed all of this, Thanks for commenting on this.

DonJayamanne

comment created time in 12 days

PullRequestReviewEvent

push eventmicrosoft/vscode-python

Don Jayamanne

commit sha bf69b3142ec10d143271e66aaefd6967458b61b9

Missing code

view details

push time in 12 days

push eventmicrosoft/vscode-python

Don Jayamanne

commit sha a2a7fc9046fadcab17a713c8d09813af21244705

Fix formatting

view details

push time in 12 days

push eventmicrosoft/vscode-python

Don Jayamanne

commit sha a7ea9e391b47995b646294caaaf5ae1ecf1d403c

Linter issues

view details

push time in 12 days

create barnchmicrosoft/vscode-python

branch : removeMoreStuff

created branch time in 12 days

PullRequestReviewEvent

push eventmicrosoft/vscode-python

Don Jayamanne

commit sha aa3cd8c95dfe555e9fbc4d8b276eae8666acbdfd

Add data science product installers (#14392)

view details

push time in 13 days

delete branch DonJayamanne/pythonVSCode

delete branch : addProductInstallers

delete time in 13 days

PR merged microsoft/vscode-python

Reviewers
Add data science product installers skip news

We need to bring back the installers. Python extension is responsible for installing python packages (these were deleted, but required).

+163 -33

2 comments

13 changed files

DonJayamanne

pr closed time in 13 days

push eventDonJayamanne/pythonVSCode

Don Jayamanne

commit sha 8d6795a3f6cecc0c285d12d029ba4469fdb2f832

Fix tests

view details

push time in 13 days

Pull request review commentmicrosoft/vscode-python

Add data science product installers

 import { sleep } from '../../common';  use(chaiAsPromised); -suite('Module Installer only', () => {+suite('Module Installer onlyxxx', () => {

Damn it.

DonJayamanne

comment created time in 13 days

PullRequestReviewEvent

push eventDonJayamanne/pythonVSCode

Don Jayamanne

commit sha 6b3b81e4869e7b42575ca84cbf0d641f66b542a8

More fixes

view details

push time in 13 days

push eventDonJayamanne/pythonVSCode

Don Jayamanne

commit sha 21abe5e87da01ebcf108f26c5dbea30ba4e4f194

Oops

view details

push time in 13 days

push eventDonJayamanne/pythonVSCode

Don Jayamanne

commit sha 4fc2a67d8dd326f8ab58ccc8d3c089dae194db39

More fixes

view details

push time in 13 days

Pull request review commentmicrosoft/vscode-python

Add data science product installers

     "author": {         "name": "Microsoft Corporation"     },-    "extensionDependencies": [-        "ms-toolsai.jupyter"-    ],

We cannot do this, Python extension will not load at all. None of the smoke tests, vscode tests will work. We need to do what we have done to ds, where we install the other extension..

DonJayamanne

comment created time in 13 days

more