{"id":18555,"date":"2018-07-24T23:00:07","date_gmt":"2018-07-25T06:00:07","guid":{"rendered":"https:\/\/blogs.msdn.microsoft.com\/visualstudio\/?p=18555"},"modified":"2019-03-18T22:44:54","modified_gmt":"2019-03-19T05:44:54","slug":"visual-studio-intellicode-expands-ai-assisted-coding-to-python-in-visual-studio-code","status":"publish","type":"post","link":"https:\/\/devblogs.microsoft.com\/visualstudio\/visual-studio-intellicode-expands-ai-assisted-coding-to-python-in-visual-studio-code\/","title":{"rendered":"Visual Studio IntelliCode expands AI-assisted coding to Python in Visual Studio Code"},"content":{"rendered":"<p>Today at the <a href=\"https:\/\/ep2018.europython.eu\/en\/\">EuroPython conference<\/a> in Edinburgh, Scotland, we are introducing support for Python in the <a href=\"https:\/\/go.microsoft.com\/fwlink\/?linkid=2006060\">IntelliCode extension for Visual Studio Code<\/a>, as well as new improvements in editing for Python developers in Visual Studio Code.<\/p>\n<h2>AI-assisted IntelliSense for Python<\/h2>\n<p>At Microsoft Build 2018, we first <a href=\"https:\/\/blogs.msdn.microsoft.com\/visualstudio\/2018\/05\/07\/introducing-visual-studio-intellicode\/\">announced IntelliCode<\/a>, a set of AI-assisted capabilities to improve developer productivity. We shipped a preview extension showing the first of these capabilities: presenting the most relevant completions as you type in Visual Studio. Today, we are bringing the power of machine learning trained on over 2,000 open-source repos to Python developers using Visual Studio Code. Check out the video below to see IntelliCode for Python in action.<\/p>\n<p><iframe width=\"750\" height=\"450\" src=\"https:\/\/channel9.msdn.com\/Shows\/Visual-Studio-Toolbox\/IntelliCode-for-Python-in-Visual-Studio-Code\/player\" allowfullscreen=\"allowfullscreen\" frameborder=\"0\"><\/iframe><\/p>\n<p>When writing Python code, the IntelliSense code completion speeds up your productivity by providing suggestions as you type. However, there can be hundreds of completions to scroll through, and you typically need to type the first few characters out before you can get close to the right result. Using our machine learning algorithm, IntelliCode can infer the most relevant completions based on the current code context.<\/p>\n<p>In the below example of writing TensorFlow code, we can see the starred items in the completion list are provided by IntelliCode, allowing you to select from the top items rather than having to search through the completion list:<\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/4\/2019\/06\/IntelliCode-Final.gif\" target=\"_blank\" rel=\"noopener\"><img decoding=\"async\" class=\"aligncenter\" title=\"Example of writing TensorFlow code showing starred items in completion list provided by IntelliCode, without having to search through completion list\" src=\"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2018\/07\/IntelliCode-Final.gif\" alt=\"Example of writing TensorFlow code showing starred items in completion list provided by IntelliCode, without having to search through completion list\" width=\"487\" height=\"216\" \/><\/a><\/p>\n<p>Notice how in each case we used the \u201ctf.\u201d variable but the suggestions change to present the most relevant options for the code context in which the tf variable is being used.<\/p>\n<p>These suggestions work on a broad variety of code included in our 2,000+ repo training set: machine learning frameworks, web frameworks, to general purpose scripting. Simply install both the <a href=\"https:\/\/go.microsoft.com\/fwlink\/?linkid=2006060\">IntelliCode extension<\/a> and the <a href=\"https:\/\/marketplace.visualstudio.com\/items?itemName=ms-python.python\">Python extension<\/a>, and IntelliCode will download the latest machine learning model and start making suggestions.<\/p>\n<h2>Microsoft Python Language Server (Preview)<\/h2>\n<p>For Python, IntelliCode builds on top of our <a href=\"https:\/\/devblogs.microsoft.com\/python\/2018\/07\/18\/introducing-the-python-language-server\/\">Microsoft Python Language Server<\/a>: our fast and powerful language server which was introduced in the <a href=\"https:\/\/devblogs.microsoft.com\/python\/2018\/07\/18\/python-in-visual-studio-code-june-july-2018-release\/\">July 2018 release of the Python extension<\/a> for Visual Studio Code.<\/p>\n<p>IntelliCode will prompt you to enable the Microsoft Python Language server, so you\u2019ll also notice that you get enhanced IntelliSense with syntax errors and basic warnings will now appear as you type. IntelliSense, combined with the new Python Language Server, is also richer: the language server uses <a href=\"https:\/\/github.com\/python\/typeshed\">open-source typeshed definitions<\/a> to provide completions for types where they can\u2019t be statically inferred.<\/p>\n<p>The combination of both the new Python extension features and IntelliCode will make you more productive when writing everyday Python code.<\/p>\n<h2>More Improvements for Python in Visual Studio Code<\/h2>\n<p>We have been continuing to add improvements for Python developers in Visual Studio Code. At Build 2018, we announced the <a href=\"https:\/\/code.visualstudio.com\/blogs\/2018\/05\/07\/live-share-public-preview\">public preview of Visual Studio Live Share<\/a> including support for Python, allowing you to collaborate on code with other co-workers regardless of whether they are using the Visual Studio IDE or Visual Studio Code for their Python coding.<\/p>\n<p>For everything else Python at Microsoft, be sure to check out our <a href=\"https:\/\/aka.ms\/pythonblog\">Python at Microsoft blog<\/a>.<\/p>\n<h2>Get Involved<\/h2>\n<p>As we expand IntelliCode\u2019s capabilities to more scenarios and other languages, we\u2019ll announce a limited private preview of new features.<\/p>\n<p><a href=\"https:\/\/go.microsoft.com\/fwlink\/?linkid=872706\">Sign up<\/a> to become an insider to keep up with the project and join the waitlist for the private preview.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Today at the EuroPython conference in Edinburgh, Scotland, we are introducing support for Python in the IntelliCode extension for Visual Studio Code, as well as new improvements in editing for Python developers in Visual Studio Code. AI-assisted IntelliSense for Python At Microsoft Build 2018, we first announced IntelliCode, a set of AI-assisted capabilities to improve [&hellip;]<\/p>\n","protected":false},"author":883,"featured_media":255385,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[1085,1030,155],"tags":[237,354,242,467,1054,172],"class_list":["post-18555","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-cloud","category-data","category-visual-studio","tag-net","tag-announcement","tag-azure","tag-intellicode","tag-ml","tag-python"],"acf":[],"blog_post_summary":"<p>Today at the EuroPython conference in Edinburgh, Scotland, we are introducing support for Python in the IntelliCode extension for Visual Studio Code, as well as new improvements in editing for Python developers in Visual Studio Code. AI-assisted IntelliSense for Python At Microsoft Build 2018, we first announced IntelliCode, a set of AI-assisted capabilities to improve [&hellip;]<\/p>\n","_links":{"self":[{"href":"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-json\/wp\/v2\/posts\/18555","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-json\/wp\/v2\/users\/883"}],"replies":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-json\/wp\/v2\/comments?post=18555"}],"version-history":[{"count":0,"href":"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-json\/wp\/v2\/posts\/18555\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-json\/wp\/v2\/media\/255385"}],"wp:attachment":[{"href":"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-json\/wp\/v2\/media?parent=18555"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-json\/wp\/v2\/categories?post=18555"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-json\/wp\/v2\/tags?post=18555"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}