May we use cookies so Meta, Google, LinkedIn and ChatGPT see your visit and we learn which ads work? PrivacyMay we use cookies to see which pages help, and let Meta, Google, LinkedIn and ChatGPT see your visit, so we know which of our ads work? That way we spend less on ads that do not work. We do not sell your data, and the site works the same if you decline. You can change your answer at any time under Cookie settings at the foot of the page. Privacy policy
Loading...
AI Engineering · Packaging And Registry
Free preview: the first 2 parts of this 27-part lesson.
Already bought the course? Sign in to read the whole lesson.
this lesson is part of
Generative AI and Agentic AI Engineering
Unlock this lesson and the 208 other paid lessons
$35 once, by card or PayPal
See the Generative AI and Agentic AI courseread the rest of this lesson in
Generative AI and Agentic AI Engineering
Unlock this lesson and the 208 other paid lessons
$35 once, by card or PayPal
See the Generative AI and Agentic AI coursein Packaging And Registry
This lesson is part of the AI Engineering course. Unlock the full course, a separate one-time payment, for lifetime access.
One-time payment by card or PayPal
Get Lifetime AccessOne-time payment: UPI, card or netbanking
Get Lifetime AccessFoundation lessons of this course are free, no payment needed. Try them now
Let me start with two copies of the same book.
A friend and I each buy the same novel. We read it, and the story is the same, word for word. Are the two books the same? For reading, yes. But if you look closely, one copy may have a small printing mark on the last page, or a different date of printing. The story is the same; the copies are not quite the same.

Now imagine your job is to check that the two copies are exactly the same, down to the last mark of ink. You could compare them page by page with a magnifying glass, like the woman in the picture. Or you could find a faster way: something like a fingerprint for a whole book, which changes if even one mark changes.
A trained model saved to a file has the same two questions. When I train the same model twice, I know from earlier lessons that the predictions can come out the same. But is the file the same, every byte? In this lesson I find out, and when the answer is no, I find the exact mark that differs.
This lesson uses the model from the features chapter. If it is new to you, please read what a feature is first. That lesson built six features for each customer of a real online shop. It asked one question: at the start of a month, will this customer buy something in the next 30 days? The model is a gradient boosted tree model from scikit-learn, and it scored a test AP of 0.5450. AP, average precision, is a score from 0 to 1 for how well the model ranks the buyers above the others.
Two lessons from the ML lifecycle chapter sit close to this one, and I will not repeat them. Same code, different model measured how much the scores move when only the random seed changes. Lineage and rollback rebuilt last month's model from its written record and checked that its answers came back. Both ask about the model's behaviour.
This lesson asks about the file. In saving formats compared, lesson 2 of this chapter, one saved file came out one byte longer than another. The reason was a thread count stored inside the model. Here I follow that thread to the end.