-
Notifications
You must be signed in to change notification settings - Fork 56
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Code Editor setting for Python IntelliSense in Jupyter notebooks #319
Comments
Thanks Seiji for reporting this. We will track this request and evaluate the default languageServer configuration internally. |
@edwardps are there any updates we can share here? |
With notebooks, IntelliSense defaults to Jedi. Set it to Pylance instead, as it is much more feature-rich than Jedi. You can add |
@j0bekt01 Does that require Pylance to be installed? As far as I know, the Pylance extension isn't available in Code Editor because Microsoft restricts it to their proprietary VS Code distribution. |
There's a Python extension that's already installed in our SM so I either go to the extension settings and pick Pylance over Jedi or append the line above to the settings file. |
I think @SeijiSuenaga is correct. When you select |
This extension is on openVSX it should already be baked into the distribution image see here: https://github.com/aws/sagemaker-distribution/blob/main/build_artifacts/v2/v2.0/v2.0.0/dirs/etc/code-editor/extensions.txt |
@j0bekt01 this is not the same extension, we are talking about the pylance extension, NOT the python extension, see here: https://marketplace.visualstudio.com/items?itemName=ms-python.vscode-pylance vs. https://marketplace.visualstudio.com/items?itemName=ms-python.python note the different IDs |
oh, I see. The openvsx one should have support for pylance |
It's not quite like that.
|
pylance does not exist on openvsx and we were not successful activating Pylance in any sort of configuration. As such:
If there really isn't any way to do this, or if the AWS team really is not aware of the issue, I also have the following question:
|
@imarquart FWIW, for plain .py files you can install the Pyright extension, which Pylance is built upon. It includes some basic language server features like renaming variables, but it intentionally doesn't support notebooks. There is also a Pyright fork called basedpyright that re-implements some Pylance features, but it currently doesn't support notebooks either. Since Microsoft made Pylance proprietary, I feel like the Python ecosystem desperately needs an open-source alternative that works in notebooks, but I haven't found one yet. It'd be awesome if AWS used some of their vast resources to improve this tooling in SageMaker... |
I can 100% agree here. Currently working on Sagemaker Code Instances is just not that great, as there is no syntax highlighting and proper intelisense configuration! |
When using Code Editor in SageMaker Studio (where the latest available distribution is currently 1.5), I've found that Python cells in Jupyter notebooks have no IntelliSense unless I configure this setting, then reload the page:
Would it be acceptable to add that to
template/v1/dirs/etc/code-editor/code_editor_machine_settings.json
?The problem might be resolved in a newer version of the Jupyter extension, judging by microsoft/vscode-jupyter#12494, but unfortunately the latest version on open-vsx.org is 6+ months out of date. 😕
The text was updated successfully, but these errors were encountered: