Visual Studio Code Tools for AI Extension
Visual Studio Code Tools for AI is an extension to build, test, and deploy Deep Learning / AI solutions in Microsoft Visual Studio Code. This allows you to develop deep learning and AI solutions across Windows and MacOS
This extension seamlessly integrates with Azure Machine Learning for robust experimentation capabilities, including but not limited to submitting data preparation and model training jobs transparently to different compute targets. Additionally, it provides support for custom metrics and run history tracking, enabling data science reproducibility and auditing. Enterprise ready collaboration, allow to securely work on project with other people.
VS Code Tools for AI is a cross-platform extension that supports deep learning frameworks including Microsoft Cognitive Toolkit (CNTK), Google TensorFlow and more.
Because it's an IDE we've enabled familiar code editor features like syntax highlighting, IntelliSense (auto-completion) and text auto formatting. You can interactively test your deep learning application in your local environment using step-through debugging on local variables and models.
This extension makes it easy to train models on your local computer or you can submit jobs to the cloud by using our integration with Azure Machine Learning. You can submit jobs to different compute targets like Spark clusters, Azure GPU virtual machines and more
Installing the Extension
- First, install Visual Studio Code then install Tools for AI extension by pressing F1 or ctrl+shift+p to open command palette, select Install Extension and type tools for AI.
Commands
The extension provides several commands in the Command Palette for working with deep learning and machine learning:
- AI: List Jobs: View list of recent jobs you've submitted and their details
- AI: Open Azure ML Sample Explorer: Quickly get started with machine learning and deep learning experimentation by downloading sample projects you can run and modify to meet your needs
- AI: Azure ML - Set Subscription: Set your Azure Subscription to use for Azure Machine Learning experimentation
- AI: Azure ML - Open Terminal: Open Azure CLI terminal to access full Azure feature set
- AI: Add Platform Configuration: Configure Azure Machine learning compute target
Try this extension using the available sample project
To open the explorer, do as follow:
- Open the command palette (View > Command Palette or Ctrl+Shift+P).
- Enter "ML Sample".
- You get a recommendation for "Machine Learning: Open Azure Machine Learning Samples Explorer", select it and press enter.
Creating a new project from the sample explorer
You can browse different samples and get more information about them. Let's browse until finding the "Classifying Iris" sample.
To create a new project based on this sample do the following:
- Click install button on the project sample, notice the commands being prompted, walking you through the steps of creating a new project.
- Enter a name for the project, for example "Iris".
- Enter a folder to create your project and press enter.
- Select an existing workspace and press enter.
The project will then be created.
You will need to be logged-in to access your Azure resource. From the embedded terminal enter "az login" and follow the instruction.
Submitting a job to train your model locally or in the cloud
Now that the new project is open in Visual Studio Code, you can submit a model training job to your different compute targets (local or VM with docker such as the https://azuremarketplace.microsoft.com/en-us/marketplace/apps/microsoft-ads.linux-data-science-vm-ubuntu).
Visual Studio Code Tools for AI provides multiple ways to submit a model training job.
- Context Menu (right click) - Machine Learning: Submit Job.
- From the command palette: "Machine Learning: Submit Job".
- Alternatively, you can run the command directly using Azure CLI, Machine Learning Commands, using the embedded terminal.
Open iris_sklearn.py, right click and select Machine Learning: Submit Job.
- Select your platform: "Azure Machine Learning".
- Select your run-configuration: "Docker-Python."
If it is the first time your submit a job, you receive a message "No Machine Learning configuration found, creating...". A JSON file is opened, save it (Ctrl+S).
Once the job is submitted, the embedded-terminal displays the progress of the runs.
View recent job performance and details
Once the jobs are submitted, you can list the jobs from the run history.
- Open the command palette (View > Command Palette or Ctrl+Shift+P).
- Enter "AI List."
- You get a recommendation for "AI: List Jobs", select and press enter.
- Select the platform "Azure Machine Learning."
The Job List View opens and displays all the runs and some related information.
To view the results of a job, click on the job ID link to see detailed information.
Additional Resource
See the key announcements from Ignite 2017 https://myignite.microsoft.com
Joseph Sirosh, Corporate Vice President of the Cloud AI Platform, as he dives deep into the latest additions to the Microsoft AI platform and capabilities. Innovations in AI let any developer and data scientist infuse intelligence into their applications and target entirely new scenarios. https://myignite.microsoft.com/videos/56555
Comments
- Anonymous
September 29, 2017
Hi I have written a blog on getting started with the VS Code Extension: https://neelbhatt40.wordpress.com/2017/09/28/visual-studio-code-tools-for-artificial-intelligenceai-first-look/- Anonymous
September 29, 2017
Hi Neel, how did you find the experience?
- Anonymous
- Anonymous
November 15, 2017
so what is the difference between VS code for AI VS Azure ML workbench?- Anonymous
November 17, 2017
Hi Rajesh see this walk through https://blogs.msdn.microsoft.com/uk_faculty_connection/2017/11/02/visual-studio-code-and-the-ai-extension-with-azure-machine-learning-work-bench/
- Anonymous