(Day 126) Optimization lecture by Chi Jin from Princeton University + using Docker for the 1st time

Ivan Ivanov · May 6, 2024

Hello :) Today is Day 126!

A quick summary of today:

  • went over two of the lectures from Day 2 of MLx Fundamentals - optimization by Chi Jin and practical session on optimization by Ziyan Wang from King’s College London
  • deployed a basic ML model using docker

I wanted to go over Professor Jin’s lecture again and take notes, because I plan on taking his lecture on optimization and reading some of the suggested books which I shared yesterday.

Covered topics:

Gradient descent, smooth functions, Descent Lemma, convex optimization, accelerated GD, stochastic optimization, SGD, nonconvex optimization.

image image image image image image

As for the practical tutorial, the material was covered in yesterday’s post and nothing extra special was part of the live lecture.

Tomorrow I will rewatch and take notes on Professor Kun Zhang from CMU’s lecture on causal representation learning.

I also found a simple tutorial on deploying an ML model with docker.

I registered for this course: DataTalksClub’s MLops zoomcamp which starts soon.

So it has been on my mind to start learning about MLops. Today I searched quickly and found the above nice short tutorial on building a small app.py with an iris prediction model.

I installed Docker desktop (for the 1st time ever)

image

Wrote this in app.py

image

Created a requirements.txt

And a Dockerfile

image

And followed the commands to containarize the app, build an image, run the docker container, and tag and push it to Docker hub.

So now in my Docker desktop I can run, and I get the output which is the accuracy and Model saved! as in my app.py

image

But also, the image is on docker hub as well (here). I am yet to exactly know the potential of what I did today, but I think it is a good 1st step towards learning more about MLops.

That is all for today!

See you tomorrow :)