Skip to content

Commit

Permalink
If interpreter is specified set path to interpreter path not python (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
IanMatthewHuff authored May 3, 2021
1 parent c7d5fde commit 8d84808
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 4 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/build-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -429,7 +429,7 @@ jobs:
python -m pip install --upgrade -r ./build/conda-functional-requirements.txt
python -m pip uninstall jedi --yes
python -m pip install jedi==0.17.2
conda install pytorch==1.8.0 torchvision==0.9.0 torchaudio==0.8.0 cpuonly -c pytorch
conda install pytorch cpuonly -c pytorch
# Install PyTorch with pip
- name: Install PyTorch on Windows and Linux
Expand All @@ -451,7 +451,7 @@ jobs:
python ./pythonFiles/install_debugpy.py
conda env update --file ./build/conda-functional-requirements.yml
python -m pip install --upgrade -r ./build/conda-functional-requirements.txt
conda install pytorch==1.8.0 torchvision==0.9.0 torchaudio==0.8.0 cpuonly -c pytorch
conda install pytorch cpuonly -c pytorch
# This step is slow.
- name: Install dependencies (npm ci)
Expand Down Expand Up @@ -687,7 +687,7 @@ jobs:
python -m pip uninstall jedi --yes
python -m pip install jedi==0.17.2
beakerx_kernel_java install
conda install pytorch==1.8.0 torchvision==0.9.0 torchaudio==0.8.0 cpuonly -c pytorch
conda install pytorch cpuonly -c pytorch
# Install PyTorch with pip
- name: Install PyTorch on Windows and Linux
Expand Down
2 changes: 1 addition & 1 deletion src/client/datascience/jupyter/kernels/helpers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ export function kernelConnectionMetadataHasKernelModel(
export function getKernelId(spec: IJupyterKernelSpec, interpreter?: PythonEnvironment) {
// Non-Python kernels cannot contain an interpreter (even in their id).
interpreter = isPythonKernelSpec(spec) ? interpreter : undefined;
return `${spec.id || ''}.${spec.name}.${spec.path}.${interpreter?.path || ''}.${
return `${spec.id || ''}.${spec.name}.${spec.interpreterPath || spec.path}.${interpreter?.path || ''}.${
spec.display_name || interpreter?.displayName || ''
}`;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,8 @@ export class JupyterKernelService {
};
}

traceInfo(`RegisterKernel for ${kernel.id}`);

// Write out the contents into the new spec file
try {
await this.fs.writeLocalFile(kernelSpecFilePath, JSON.stringify(contents, undefined, 4));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -206,6 +206,7 @@ export class NotebookControllerManager implements INotebookControllerManager, IE
});

if (targetController) {
traceInfo(`TargetController found ID: ${targetController.id} for document ${document.uri.toString()}`);
targetController.updateNotebookAffinity(document, NotebookControllerAffinity.Preferred);

// When we set the target controller we don't actually get a selected event from our controllers
Expand Down

0 comments on commit 8d84808

Please sign in to comment.