DEEP LEARNING IN PRODUCTION BOOK

Design, develop, train, deploy, scale and maintain your Machine Learning models

Become a Machine Learning Engineer

Machine Learning gradually transforms more and more industries. Tech and non-tech companies are starting to incorporate AI into their business to outgrow their competition. Thus, machine learning engineering is one of the more sought after and well paid skills of today.

A Machine Learning Engineer can be described as a role that bridges the gap between data science and IT. A ML Engineer is much more than a guy who builds ML models. Depending on the company, his/her responsibilities also include:

Designing the entire ML lifecycle

Developing data processing pipeline

Training the models in cloud clusters

Deploying and maintaining large scale ML systems

It is estimated that 50% of IT leaders will struggle to move their AI projects past proof of concept (POC) to a production level of maturity. This is where you come into play.

After reading this book, you will be ready to build a fully-functional Deep Learning application. The background and skills that you will acquire from this book will provide you better job opportunities, will differentiate you from other data scientists and machine learning researchers and the most important thing: they will make you a better and more well-rounded engineer.

What will you learn?

how to design a deep learning system from scratch

how to structure and develop production-ready machine learning code

how to develop efficient and scalable data pipelines

how to optimize the model’s performance and memory requirements

how to make it available to the public by setting up a service on the cloud

how to scale and maintain the service as the user base grows

Is this book for you?

Are you a Deep Learning researcher with no software experience?

Are you a software engineer who is starting out with Machine Learning?

Do you want to become a Machine Learning Engineer?

If you are interested in learning how to take a simple model and transform it into a real-world application, then you came to the right place. Whether you are a software engineer, an ML researcher, a Data Scientist or an ML enginner, I'm sure that you will find value in this book.

Have a look at a free sample

Your browser does not support embed PDFs. Download the free sample from here.

Table of Contents

Preface
xi
Acknowledgements
xii
1 About this Book
13
2 Designing a Machine Learning System
5
2.1 Machine learning: phase zero
5
2.2 Data engineering
7
2.3 Model engineering
8
2.4 DevOps engineering
8
2.5 Putting it all together
9
2.6 Tackling a real-life problem
9
3 Setting up a Deep Learning Workstation
13
3.1 Laptop setup
14
3.2 Frameworks and libraries
14
3.3 Development tools
15
3.4 Python package and environment management
17
4 Writing and Structuring Deep Learning Code
21
4.1 Best practices
21
4.2 Unit testing
34
4.3 Debugging
43
5 Data Processing
55
5.1 ETL: Extract, Transform, Load
56
5.2 Data reading
57
5.3 Processing
60
5.4 Loading
63
5.5 Optimizing a data pipeline
65
6 Training
71
6.1 Building a trainer
72
6.2 Training in the cloud
79
6.3 Distributed training
88
7 Serving
101
7.1 Preparing the model
101
7.2 Creating a web application using Flask
104
7.3 Serving with uWSGI and Nginx
110
7.4 Serving with model servers
117
8 Deploying
123
8.1 Containerizing using Docker and Docker Compose
123
8.2 Deploying in a production environment
136
8.3 Continous Integration and Delivery (CI/CD)
141
9 Scaling
145
9.1 A journey from 1 to millions of users
145
9.2 Growing with Kubernetes
159
Building an End-to-End Pipeline
175
10.1 MLOps
175
10.2 Building a pipeline using TFX
179
10.3 MLOps with Vertex AI and Google cloud
188
10.4 More end to end solutions
198
Where to Go from Here
201
Appendix
203
List of Figures
207
Index
208
About the Author
209

FAQ

How did this book come to life?

Deep Learning in Production is a product of one year of effort. The pages and the code you will read, began as articles on our blog AI Summer and they were later combined and organized into a single resource. The reason I decided to invest the time in writing this book is very simple. The practices and principles mentioned here are what I wish I knew when I started my journey on machine learning.

Do I need to have programming experience?

Yes. The book goes really deep in software development techniques and frameworks so a solid programming experience is a requirement.You don’t need to be an expert programmer but understanding the fundamentals of Python is a must.

What libraries and tools are covered?

A lot of them. To give you a sneak peek, you will familiarize yourself with Tensorflow,Flask, uWSGI, Nginx, Docker, Kubernetes, Google cloud and more.

Do I need special hardware to run the code?

Everything can be executed in a single CPU without a problem. Besides, we will make extended use of the cloud so no fancy hardware is required.

How much time do I need to read this book?

The book is about 200 pages with a lot of code. With enough focus, it will take you a week. The average reader will need about two-three weeks.

Is there a money-back guarantee?

Books purchased from the Kindle Store can be returned within seven days of purchase with 100% refund. Leanpub has a 45-day guarantee.

I don't need a copy of the book but would like to thank the author. Can I donate?

Sure. Feel free to support us.

Can I use the code in my projects?

You are free and even encouraged to use our content in your project, whether it’s for educational purposes, for fun, or for profit.

However, we do ask that you cite AI Summer by providing a link back to this page. You can also use the following format to cite us:

 @article{aisummer,    title   = “Deep Learning in Production”,    author  = “Sergios Karagiannakos”,     journal = “https://theaisummer.com/”,     year    = “2021”,     url     = “https://theaisummer.com/deep-learning-in-production-book/”    } 
Is there a Github repository wil all the code?

Of course there is. You can find it here

I have another question. How can I reach you?

You can send us an email, ping us on social, or even better contact us on our Discord server.