Uploaded October 2021 | Updated November 2026, 1 day ago
In the last video of the “SOLID for ML Engineers” series, you can learn about the Dependency Inversion Principle, , how to spot its violations, and how you can refactor ML code to respect it.
By satisfying the Dependency Inversion Principle, your ML code will protect your components from the most unstable elements of your code, decrease coupling, and facilitate testing.
Slides:
github.com/musikalkemist/solidforml/blob/main/solidforml/06%20Depndency%20Inversion%20Principle/Dependency%20Inversion%20Principle.pdf
Code:
github.com/musikalkemist/solidforml/blob/main/solidforml/06%20Depndency%20Inversion%20Principle/dependencyinversion.py
===============================
Interested in hiring me as a consultant/freelancer?
valeriovelardo.com
Join The Sound Of AI Slack community:
valeriovelardo.com/the-sound-of-ai-community
Connect with Valerio on Linkedin:
linkedin.com/in/valeriovelardo
Follow Valerio on Facebook:
facebook.com/TheSoundOfAI
Follow Valerio on Twitter:
twitter.com/musikalkemist
===============================
Content:
0:00 Intro
0:17 Defining Dependency Inversion
0:57 How to spot DIP violations
1:30 Code example
2:56 DIP violations in the code example
3:46 Code example design
5:12 How to enforce DIP
6:20 Benefits of DIP
8:10 Refactoring the code
12:34 Final considerations
In the last video of the “SOLID for ML Engineers” series, you can learn about the Dependency Inversion Principle, , how to spot its violations, and how you can refactor ML code to respect it.
By satisfying the Dependency Inversion Principle, your ML code will protect your components from the most unstable elements of your code, decrease coupling, and facilitate testing.
Slides:
github.com/musikalkemist/solidforml/blob/main/solidforml/06%20Depndency%20Inversion%20Principle/Dependency%20Inversion%20Principle.pdf
Code:
github.com/musikalkemist/solidforml/blob/main/solidforml/06%20Depndency%20Inversion%20Principle/dependencyinversion.py
===============================
Interested in hiring me as a consultant/freelancer?
valeriovelardo.com
Join The Sound Of AI Slack community:
valeriovelardo.com/the-sound-of-ai-community
Connect with Valerio on Linkedin:
linkedin.com/in/valeriovelardo
Follow Valerio on Facebook:
facebook.com/TheSoundOfAI
Follow Valerio on Twitter:
twitter.com/musikalkemist
===============================
Content:
0:00 Intro
0:17 Defining Dependency Inversion
0:57 How to spot DIP violations
1:30 Code example
2:56 DIP violations in the code example
3:46 Code example design
5:12 How to enforce DIP
6:20 Benefits of DIP
8:10 Refactoring the code
12:34 Final considerations










