Skip to content
MLG 024 Tech Stack episode artwork

Oct 7, 2017 59 min

MLG 024 Tech Stack

from Machine Learning Guide

A machine learning tech stack: pandas cleans the data, NumPy hands it to a deep learning framework that runs on the GPU, and scikit-learn scales features and covers shallow algorithms. Also covers TensorFlow vs PyTorch, NVIDIA GPUs and CUDA, cloud GPUs and spot instances, Keras, and splitting a web app server from a GPU job server with a message queue. Links Notes and resources at ocdevel.com/mlg/24 Join the free MLG group: listen to my other AI shows, ask me questions, and talk with other listeners What does a deep learning framework do? It gives you the building blocks (layers, activation functions, optimizers), automatic differentiation so backpropagation is computed for you, and execution on a GPU. How much faster a GPU runs than a CPU depends on the model and on how much data moves between them. Which framework? PyTorch is now the default deep learning framework for research and most new work (MLG 010). TensorFlow, usually through Keras, is still widely deployed, and Google's own research has largely moved to JAX. Keras 3 runs on JAX, TensorFlow or PyTorch. Theano stopped development in 2017 and lives on in the PyTensor fork. Caffe is retired. TensorFlow 2 runs eagerly The graph-building the episode describes, placeholders and feed dicts passed to session.run, is TensorFlow 1. TensorFlow 2 runs eagerly, line by line like ordinary Python, as PyTorch does, and tf.function compiles a function into a graph when you want the speed. Starting in Keras's high-level API and dropping to lower-level code where you need control still works. GPUs: NVIDIA, AMD and Apple silicon GPU deep learning still centers on NVIDIA's CUDA. You no longer download CUDA and cuDNN by hand: pip install tensorflow[and-cuda] installs them with TensorFlow, and PyTorch's install selector picks a build for your CUDA version. Building TensorFlow from source for speed is rarely worth it now. AMD: PyTorch runs on supported AMD GPUs through ROCm. Apple silicon: Macs train on their own GPU through PyTorch's MPS backend, Apple's tensorflow-metal plugin or Apple's MLX, so a Mac works for learning and small models. Official TensorFlow builds have no macOS GPU support of their own. Windows: TensorFlow's GPU support needs WSL2, since native Windows GPU builds ended after TensorFlow 2.10. Ubuntu remains a common choice. MLA 012 covers Docker for machine learning. The GTX 1080 Ti from the episode is several generations old. For a laptop, see Laptop for machine learning and gaming. Cloud GPUs AWS no longer lists the p2 instances from the episode among its EC2 instance types. Single-GPU options now include G5 (NVIDIA A10G), G6 (L4) and G6e (L40S) instances, and P5/P5e (H100, H200) and P6 (B200, B300) instances handle large training jobs. Spot Instances still cost up to 90% less than on-demand. EC2 interrupts a Spot Instance mainly when it needs the capacity back, so a high maximum price doesn't guarantee you keep it, and setting a maximum price makes interruptions more frequent. Save checkpoints so a training run can resume. Google Cloud has rented TPUs since a beta in February 2018. For learning, hosted notebooks such as Google Colab and Kaggle Notebooks run on cloud GPUs without any setup. MLA 013 covers the tech stack for customer-facing machine learning products. The data pipeline Source: a CSV, a folder of images, a database such as Postgres, or an API. Quandl, the financial data API from the episode, is now Nasdaq Data Link. pandas (or Polars) loads and cleans it: read_csv, read_sql, and null handling with fillna, ffill, which carries yesterday's price forward over a missing day, and bfill. scikit-learn scales features with StandardScaler (zero mean, unit variance) or MinMaxScaler (a set range, often 0 to 1), and supplies toy data: load_iris ships with it, and fetch_openml downloads MNIST as 'mnist_784'. torchvision and Keras have MNIST loaders too. It also covers the shallow algorithms deep learning frameworks leave out, such as support vector machines, naive Bayes and random forests. NumPy arrays are the hand-off format. PyTorch and TensorFlow accept them and convert their tensors back with .numpy(), but they compute with their own compiled kernels on CPU as well as GPU, not with NumPy. Keep the math inside framework operations so it runs on the GPU. App server and job server The architecture in the episode still holds. A web app server takes user requests and puts jobs on a queue, and GPU job servers, called workers, take jobs off it. A job waits in the queue rather than getting lost while a worker is busy or down, and several workers can share the load. Celery runs the workers in Python, with RabbitMQ, Redis or Amazon SQS as its broker. ZeroMQ is a messaging library, not a broker, and isn't among Celery's brokers. To serve models over HTTP, NVIDIA Triton and, for large language models, vLLM are common, and Amazon SageMaker hosts managed endpoints. Reinforcement learning Tensorforce is no longer maintained. For deep reinforcement learning, pair Gymnasium environments with Stable-Baselines3 agents. Where to learn the stack Aurélien Géron's Hands-On Machine Learning, the book praised in the episode. The 3rd edition (2022) uses Scikit-Learn, Keras and TensorFlow; the PyTorch edition (2025) switches to PyTorch and Hugging Face. Andrew Ng's Machine Learning Specialization on Coursera, now taught in Python; the original course the episode mentions used Octave and MATLAB. Daniel Bourke's Learn PyTorch for Deep Learning, a free online book and video course. Next: MLG 025, on convolutional neural networks.

Episode details come from the podcast's RSS feed.

Embed this episode

Ready to play

MLG 024 Tech Stack

0:00 59:43

No transcript yet.

Requests help us decide what to transcribe next.

Frequently asked questions

How long is this episode of Machine Learning Guide?

This episode is 59 minutes long.

When was this Machine Learning Guide episode published?

This episode was published on October 7, 2017.

Can I download this Machine Learning Guide episode?

Yes. Use the download control on the episode player to save the publisher-provided media file.