3 Must Know VS Code Features for ML & Data Science!

AssemblyAI · Beginner ·🧠 Large Language Models ·3y ago

Key Takeaways

The video demonstrates three essential VS Code features for ML and Data Science, including two-parter notebook support, Python interactive mode, and remote development with extensions for remote containers, SSH, and WSL, using tools like VS Code, Google Colab, Python, Jupyter Notebook, and Docker.

Full Transcript

hi everyone i'm patrick and today i show you three of my favorite vs code features that lets you develop python apps and especially machine learning deep learning and data science apps like a pro believe me this will make your work environment so much easier especially the last tip so without further ado let's jump right into it the first feature is the integrated two-parter notebook support so one thing we can of course always do is use a google collab these are amazing but often we also want to develop on our local machine and for this we could spin up the classic two-parter notebook server and use this but let's be honest it doesn't look beautiful and it's also not the best developer experience so i'd much rather have this inside vs code on my local machine and what is really cool is that it has built in support so we can simply create a file with the ending i pi and b and now this is recognized as notebook and we can use this we can here select our environment in this case i want to use my machine learning conda environment and the only thing we have to do for this is have the python extension installed and we also have to install a two fighter kernel inside this environment but if this is not yet the case then it will show you a prompt and you can easily set this up so now we can start coding in the cell and say import numpy snp and as you can see we get auto completions and suggestions so all the great features that we are used to from our ide then we can run the cell and insert a new one we can also insert a markdown cell so all the normal node notebook features we can also connect to a remote server by saying command shift p and open the command palette and then we search for two pointer and select this one and then we can specify a host name if we have one so this is super cool and i recommend trying this out inside vs code and this is feature number one feature number two is the python interactive mode in vs code and a lot of people don't know about this but it's actually an awesome feature so often i don't want to use a two-pointer notebook but rather a normal python script but then i still want to have interactive features to play around with this and test this and we can get this by using a special comment with two percent signs and now we as code will interpret this as a special cell similar to a notebook cell and then here for example we can insert more comments to make more separate cells and then we can click on run cell and now this will open an interactive window then for example let's run the next cell and here we can play around with this for example here i can type code like in a terminal for example i want to display the data frame so i can say command shift and run this i can also create new variables if i need them and then let's also run the last cell so we can also render the plots here then we can also click on variables and inspect all the variables that we have during the session and then for example for the data frame we can click on this button and open a data viewer so here we can analyze our pandas data frame for example we can change the sorting according to the columns and yeah simply this is simply helpful to analyze your data frame and then we can also debug a cell for example here we can click on debug and now we can step over the code just like in a normal debugger and inspect our local variables so this is also super helpful sometimes so yeah i recommend just playing around with these interactive cells by using this comment and let me know if you also find this helpful and this is feature number two and the third feature is really a game changer for your development environment and this is remote development with vs code this extension includes remote containers remote ssh and remote wsl and with this we can connect to a docker container a remote machine or the windows subsystem for linux we can also combine this and can connect to a docker container on a remote machine and then we can create our coding environment inside a docker container and open vs code there and start coding so in the docker container we specify all the dependencies all the cuda drivers for example and all the libraries we need for our project for example tensorflow python scikit-learn whatever and then we can simply set this up once and connect to the container open this code and start coding inside this environment and also all your team members can use the same container and have the very same coding environment so this is really a game changer for your projects and now let me show you how to connect to a docker container with vs code now to get started i recommend checking out these guides for ssh for a container and also for remote docker over ssh and then the way it works is that on our own computer we have vs code and the remote extension and then inside the container we define how this container looks like and then here we can run the application and also use a debugger for example and then inside the container we also open up vs code and then we have to mount the code so we can either copy this from our machine or we can clone it for example from github and to get started of course you have to have docker installed on your machine and then i also recommend installing the docker extension and then after installing the remote extensions in the lower left you find this button and here you have different options for example you can connect to a remote host or we can attach to a running container and the simplest way to get started is click on try a development container sample and then select python and now this will open a remote connection to a container so now we are inside this container so here we have all the starter code we also have the terminal inside this container and then for example in this example it has the requirements flask and it has a simple flask app you can also inspect the docker file if you want to see how this is set up and now to get started you find the command in the readme so we say python and flask run and now if we start this then we can even open this in our browser on our machine so this works and now we can start coding here or debugging here or whatever so yeah this is the simplest way how to get started and now let me also show you how to define our own docker containers so here let's close this remote connection and this and to get started we have to define a docker file where we want to specify how this docker container looks like so here we use a base image and there are different ones available in the docker hub that you can use for example for tensorflow pytorch cuda also at nvidia there are optimized docker containers for example for tensorflow or pytorch that you can use with these instructions so yeah this is worth checking out in our case i start with a simple python base image where i want to copy the requirements and in this case it only has psychic learn and then we say pip install the requirements and then when we have this we have to build the image so we say docker build minus t and give it a name i already did this so this image is now available and now we can select the docker extension and see the images so in this case this one then we can start the container and now when this is started we can say attach shell or attach visual studio code and now this will open a connection to the container and then inside the container we have the requirements file that we copied and then i already created this by hand before so i created a file here and this was cached so this is still here and then we can for example import scikit-learn and build our model and then we can say python main dot pi and by the way if we simply select python then we see this is python 9 because we used a python 9 image so now we say python main.pi and now this is executing the code with this library that we want so this is how to work in a docker container with vs code and yeah these are all the features that i wanted to show you in this video i hope this was helpful to you let me know what you think about these features and if you also have another recommendation for vs code and then i hope to see you in the next video bye

Original Description

3 Must Know VS Code Features for ML & Data Science! Get your Free Token for AssemblyAI Speech-To-Text API 👇https://www.assemblyai.com/?utm_source=youtube&utm_medium=referral&utm_campaign=yt_pat_53 ▬▬▬▬▬▬▬▬▬▬▬▬ CONNECT ▬▬▬▬▬▬▬▬▬▬▬▬ 🖥️ Website: https://www.assemblyai.com 🐦 Twitter: https://twitter.com/AssemblyAI 🦾 Discord: https://discord.gg/Cd8MyVJAXd ▶️ Subscribe: https://www.youtube.com/c/AssemblyAI?sub_confirmation=1 🔥 We're hiring! Check our open roles: https://www.assemblyai.com/careers ▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬ #MachineLearning #DeepLearning #VsCode
Watch on YouTube ↗ (saves to browser)
Sign in to unlock AI tutor explanation · ⚡30

Playlist

Uploads from AssemblyAI · AssemblyAI · 0 of 60

← Previous Next →
1 Python Speech Recognition in 5 Minutes
Python Speech Recognition in 5 Minutes
AssemblyAI
2 Python Click Part 1 of 4
Python Click Part 1 of 4
AssemblyAI
3 Python Click Part 2 of 4
Python Click Part 2 of 4
AssemblyAI
4 Python Click Part 3 of 4
Python Click Part 3 of 4
AssemblyAI
5 Python Click Part 4 of 4
Python Click Part 4 of 4
AssemblyAI
6 Deep learning in 5 minutes | What is deep learning?
Deep learning in 5 minutes | What is deep learning?
AssemblyAI
7 How to make a web app that transcribes YouTube videos with Streamlit | Part 1
How to make a web app that transcribes YouTube videos with Streamlit | Part 1
AssemblyAI
8 How to make a web app that transcribes YouTube videos with Streamlit | Part 2
How to make a web app that transcribes YouTube videos with Streamlit | Part 2
AssemblyAI
9 Batch normalization | What it is and how to implement it
Batch normalization | What it is and how to implement it
AssemblyAI
10 Real-time Speech Recognition in 15 minutes with AssemblyAI
Real-time Speech Recognition in 15 minutes with AssemblyAI
AssemblyAI
11 Regularization in a Neural Network | Dealing with overfitting
Regularization in a Neural Network | Dealing with overfitting
AssemblyAI
12 Add speech recognition to your Streamlit apps in 5 minutes
Add speech recognition to your Streamlit apps in 5 minutes
AssemblyAI
13 Transformers for beginners | What are they and how do they work
Transformers for beginners | What are they and how do they work
AssemblyAI
14 Automatic Chapter Detection With AssemblyAI | Python Tutorial
Automatic Chapter Detection With AssemblyAI | Python Tutorial
AssemblyAI
15 Deep Learning Series Part 1 - What is Deep Learning?
Deep Learning Series Part 1 - What is Deep Learning?
AssemblyAI
16 Deep Learning Series part 2 - Why is it called “Deep Learning”?
Deep Learning Series part 2 - Why is it called “Deep Learning”?
AssemblyAI
17 Activation Functions In Neural Networks Explained | Deep Learning Tutorial
Activation Functions In Neural Networks Explained | Deep Learning Tutorial
AssemblyAI
18 Deep Learning Series part 3 - Deep Learning vs. Machine Learning
Deep Learning Series part 3 - Deep Learning vs. Machine Learning
AssemblyAI
19 Deep Learning Series part 4 - Why is Deep Learning better for NLP?
Deep Learning Series part 4 - Why is Deep Learning better for NLP?
AssemblyAI
20 Intro to Batch Normalization Part 1
Intro to Batch Normalization Part 1
AssemblyAI
21 Intro to Batch Normalization Part 2
Intro to Batch Normalization Part 2
AssemblyAI
22 Intro to Batch Normalization Part 3 - What is Normalization?
Intro to Batch Normalization Part 3 - What is Normalization?
AssemblyAI
23 Intro to Batch Normalization Part 4
Intro to Batch Normalization Part 4
AssemblyAI
24 Intro to Batch Normalization Part 5
Intro to Batch Normalization Part 5
AssemblyAI
25 Sentiment Analysis for Earnings Calls with AssemblyAI
Sentiment Analysis for Earnings Calls with AssemblyAI
AssemblyAI
26 Summarizing my favorite podcasts with Python
Summarizing my favorite podcasts with Python
AssemblyAI
27 Introduction to Regularization
Introduction to Regularization
AssemblyAI
28 How/Why Regularization in Neural Networks?
How/Why Regularization in Neural Networks?
AssemblyAI
29 Getting Started With Torchaudio | PyTorch Tutorial
Getting Started With Torchaudio | PyTorch Tutorial
AssemblyAI
30 Types of Regularization
Types of Regularization
AssemblyAI
31 Tuning Alpha in L1 and L2 Regularization
Tuning Alpha in L1 and L2 Regularization
AssemblyAI
32 Dropout Regularization
Dropout Regularization
AssemblyAI
33 What is GPT-3 and how does it work? | A Quick Review
What is GPT-3 and how does it work? | A Quick Review
AssemblyAI
34 Backpropagation For Neural Networks Explained | Deep Learning Tutorial
Backpropagation For Neural Networks Explained | Deep Learning Tutorial
AssemblyAI
35 Jupyter Notebooks Tutorial | How to use them & tips and tricks!
Jupyter Notebooks Tutorial | How to use them & tips and tricks!
AssemblyAI
36 Best Free Speech-To-Text APIs and Open Source Libraries
Best Free Speech-To-Text APIs and Open Source Libraries
AssemblyAI
37 Regularization - Early stopping
Regularization - Early stopping
AssemblyAI
38 Regularization - Data Augmentation
Regularization - Data Augmentation
AssemblyAI
39 Bias and Variance for Machine Learning | Deep Learning
Bias and Variance for Machine Learning | Deep Learning
AssemblyAI
40 Recurrent Neural Networks (RNNs) Explained - Deep Learning
Recurrent Neural Networks (RNNs) Explained - Deep Learning
AssemblyAI
41 What is BERT and how does it work? | A Quick Review
What is BERT and how does it work? | A Quick Review
AssemblyAI
42 Introduction to Transformers
Introduction to Transformers
AssemblyAI
43 Transformers | What is attention?
Transformers | What is attention?
AssemblyAI
44 Transformers | how attention relates to Transformers
Transformers | how attention relates to Transformers
AssemblyAI
45 Transformers | Basics of Transformers
Transformers | Basics of Transformers
AssemblyAI
46 Supervised Machine Learning Explained For Beginners
Supervised Machine Learning Explained For Beginners
AssemblyAI
47 Transformers | Basics of Transformers Encoders
Transformers | Basics of Transformers Encoders
AssemblyAI
48 Transformers | Basics of Transformers I/O
Transformers | Basics of Transformers I/O
AssemblyAI
49 How to evaluate ML models | Evaluation metrics for machine learning
How to evaluate ML models | Evaluation metrics for machine learning
AssemblyAI
50 Unsupervised Machine Learning Explained For Beginners
Unsupervised Machine Learning Explained For Beginners
AssemblyAI
51 Weight Initialization for Deep Feedforward Neural Networks
Weight Initialization for Deep Feedforward Neural Networks
AssemblyAI
52 Q-Learning Explained - Reinforcement Learning Tutorial
Q-Learning Explained - Reinforcement Learning Tutorial
AssemblyAI
53 Should You Use PyTorch or TensorFlow in 2022?
Should You Use PyTorch or TensorFlow in 2022?
AssemblyAI
54 What is Layer Normalization? | Deep Learning Fundamentals
What is Layer Normalization? | Deep Learning Fundamentals
AssemblyAI
55 I created a Python App to study FASTER
I created a Python App to study FASTER
AssemblyAI
56 How to create your FIRST NEURAL NETWORK with TensorFlow!
How to create your FIRST NEURAL NETWORK with TensorFlow!
AssemblyAI
57 Neural Networks Summary: All hyperparameters
Neural Networks Summary: All hyperparameters
AssemblyAI
58 Getting Started with OpenAI API and GPT-3 | Beginner Python Tutorial
Getting Started with OpenAI API and GPT-3 | Beginner Python Tutorial
AssemblyAI
59 Convert Speech-To-Text In Python in 60 seconds!
Convert Speech-To-Text In Python in 60 seconds!
AssemblyAI
60 Gradient Clipping for Neural Networks | Deep Learning Fundamentals
Gradient Clipping for Neural Networks | Deep Learning Fundamentals
AssemblyAI

This video teaches three essential VS Code features for ML and Data Science, including two-parter notebook support, Python interactive mode, and remote development, and demonstrates how to use these features to build and deploy ML models. By mastering these features, viewers can improve their ML development workflow and increase productivity. The video provides a comprehensive overview of the tools and techniques used in ML development, making it an ideal resource for beginners.

Key Takeaways
  1. Create a file with the ending .ipynb
  2. Install the Python extension and a two-parter kernel in the environment
  3. Run a cell and insert a new one
  4. Insert a markdown cell
  5. Connect to a remote server by using the command palette
  6. Connect to a Docker container with VS Code using the remote extension
  7. Define how the container looks like inside the container
  8. Run the application and use a debugger inside the container
  9. Mount the code from the machine or clone it from GitHub
  10. Attach to a running container or connect to a remote host using the remote extension
💡 The video highlights the importance of using VS Code extensions, such as the remote development extension, to streamline the ML development workflow and improve productivity. By leveraging these extensions, viewers can create a seamless development environment that integrates with various tools and

Related AI Lessons

Sub-10ms AI Workflows: Accelerating sim.ai with On-Device Semantic Search using Moss
Learn how to accelerate AI workflows with on-device semantic search using Moss, achieving sub-10ms response times and improving user experience
Medium · Machine Learning
Stop Guessing: Guaranteed Structured Output from LLMs in Node.js
Learn to guarantee structured output from LLMs in Node.js and stop parsing JSON manually
Dev.to · Hardik Mehta
Spring AI Tutorial — Your First REST Endpoint with OpenAI (2026)
Build a REST endpoint with Spring Boot 3 and OpenAI to create an LLM-powered API, leveraging the power of AI in your applications
Dev.to AI
Notes: Memory, Context, and Large Language Models (LLMs)
Learn how memory and context work in Large Language Models (LLMs) and potential improvements
Dev.to · Vladimir Panov
Up next
5 Levels of AI Agents - From Simple LLM Calls to Multi-Agent Systems
Dave Ebbelaar (LLM Eng)
Watch →