Visual Studio Code (VSCode)

Download and install VSCode

  1. Download VSCode from https://code.visualstudio.com/ for your particular operating system
  2. Install VSCode

Install extensions

  • Azure Machine Learning
  • AWS Toolkit
  • Microsoft Python

Use the built-in command palette

  • Windows: F1 or Ctrl+Shift+P
  • MacOS: F1 or Command+Shift+P

Use the built-in terminal

  • Ctrl+Shift+Backtick(`)

Use VSCode with Azure Machine Learning

Log in to Azure

For the best experience, we recommend signing out of Azure first!

To sign out:

  1. Open the command palette
  2. Type or find Azure: Sign Out

To sign back in:

  1. Open the command palette
  2. Type or find Azure: Sign In and select your Georgetown Azure credentials

You’ll know you are signed to the right Azure account because if you click on the Azure logo on the left-hand side, you will see your Subscription show up in the Machine Learning Panel at the top left. If you click on the > icon to expand, you’ll also see the AzureML workspace you created.

Start (or stop) a compute instance

  1. Use the > icon to expand the elements of your AzureML workspace.
  2. Keep expanding: Workspace > Compute > Compute instances until you see your compute instance(s)
  3. You will see the status of the compute instance
  4. Right click on the compute instance to start (or stop) the instance

Create a remote connection to the AzureML compute instance

  1. Make sure you have a running compute instance
  2. Right click on the compute instance and click on Connect in New Window. A new VSCode window will open up and you’ll see some activity. Once the remote connection is created, you will see the name of your compute instance in a different color background in the bottom-right.
Important

The first time you connect to a unique AzureML compute instance with VSCode, you will see a pop-up in the remote connection asking Do you trust the authors of the files in this folder?

  • Check the Trust the authors… checkbox
  • Click on Yes, I trust the authors
  1. You now have established a remote connection
  2. You can ignore the notifications in the bottom right

Clone a repository into the compute instance

You will be able to use the integrated git in VSCode to clone, commit, push and pull the work in your assignment repositorues. Please follow this workflow (there are things are are specific to AzureML, but this will also work when using VSCode locally)

Before you clone your GitHub repository, make sure you are logged in to GitHub in a browser and have the http URL of your repo copied into the clipboard.

  1. Open the command palette
  2. Type or find Git: Clone
  3. Paste the repo URL into the box and select clone form URL from the dropdown
  4. Make sure you select this path on the AzureML compute instance so the repo is stored in the persistent AzureML storage and not in the VM filesystem: /home/azureuser/cloudfiles/code/Users/<NETID>/
  5. Click OK
Important

Every time you clone a repository using VSCode there will be a pop-up window asking you Would you like to open the cloned repository, or add it to the current workspace?

Hit Cancel. You can always change into the repo directory afterwards. THis is especially true if you are cloning multiple repos at the same time.

You will now see your repository as a directory when you expand the Users directory in the file browser.