Pinning Dependencies the Right Way for ML Projects
📰 Medium · DevOps
Learn how to pin dependencies correctly for ML projects to avoid version drift issues and ensure reproducibility
Action Steps
- Use pip-compile to generate a requirements.txt file with pinned dependencies
- Specify exact versions of libraries in your requirements.txt file
- Use a virtual environment to isolate dependencies and ensure reproducibility
- Regularly update and re-pin dependencies to ensure compatibility
- Test your project with different dependency versions to ensure robustness
Who Needs to Know This
Data scientists and ML engineers can benefit from this knowledge to ensure their projects are reliable and reproducible
Key Insight
💡 Pinning dependencies is essential for ML projects because loose dependency ranges can lead to silent breaks in compiled, binary-level contracts
Share This
💡 Pinning dependencies is crucial for ML projects! Learn how to do it right to avoid version drift issues and ensure reproducibility
Key Takeaways
Learn how to pin dependencies correctly for ML projects to avoid version drift issues and ensure reproducibility
Full Article
Title: Pinning Dependencies the Right Way for ML Projects
URL Source: https://medium.com/@sundarbalamurugan/pinning-dependencies-the-right-way-for-ml-projects-b35c82042d44?source=rss------devops-5
Published Time: 2026-06-25T06:57:45Z
Markdown Content:
[Sitemap](https://medium.com/sitemap/sitemap.xml)
[Open in app](https://play.google.com/store/apps/details?id=com.medium.reader&referrer=utm_source%3DmobileNavBar&source=post_page---top_nav_layout_nav-----------------------------------------)
Sign up
[Sign in](https://medium.com/m/signin?operation=login&redirect=https%3A%2F%2Fmedium.com%2F%40sundarbalamurugan%2Fpinning-dependencies-the-right-way-for-ml-projects-b35c82042d44&source=post_page---top_nav_layout_nav-----------------------global_nav------------------)
[](https://medium.com/?source=post_page---top_nav_layout_nav-----------------------------------------)
Get app
[Write](https://medium.com/m/signin?operation=register&redirect=https%3A%2F%2Fmedium.com%2Fnew-story&source=---top_nav_layout_nav-----------------------new_post_topnav------------------)
[Search](https://medium.com/search?source=post_page---top_nav_layout_nav-----------------------------------------)
Sign up
[Sign in](https://medium.com/m/signin?operation=login&redirect=https%3A%2F%2Fmedium.com%2F%40sundarbalamurugan%2Fpinning-dependencies-the-right-way-for-ml-projects-b35c82042d44&source=post_page---top_nav_layout_nav-----------------------global_nav------------------)

Member-only story
# **Pinning Dependencies the Right Way for ML Projects**
[](https://medium.com/@sundarbalamurugan?source=post_page---byline--b35c82042d44---------------------------------------)
[Sundar Balamurugan](https://medium.com/@sundarbalamurugan?source=post_page---byline--b35c82042d44---------------------------------------)
2 min read
·
5 days ago
[](https://medium.com/m/signin?actionUrl=https%3A%2F%2Fmedium.com%2F_%2Fvote%2Fp%2Fb35c82042d44&operation=register&redirect=https%3A%2F%2Fmedium.com%2F%40sundarbalamurugan%2Fpinning-dependencies-the-right-way-for-ml-projects-b35c82042d44&user=Sundar+Balamurugan&userId=e061a0ec0b9b&source=---header_actions--b35c82042d44---------------------clap_footer------------------)
--
[](https://medium.com/m/signin?actionUrl=https%3A%2F%2Fmedium.com%2F_%2Frepost%2Fp%2Fb35c82042d44&operation=register&redirect=https%3A%2F%2Fmedium.com%2F%40sundarbalamurugan%2Fpinning-dependencies-the-right-way-for-ml-projects-b35c82042d44&user=Sundar+Balamurugan&userId=e061a0ec0b9b&source=---header_actions--b35c82042d44---------------------repost_header------------------)
[](https://medium.com/m/signin?actionUrl=https%3A%2F%2Fmedium.com%2F_%2Fbookmark%2Fp%2Fb35c82042d44&operation=register&redirect=https%3A%2F%2Fmedium.com%2F%40sundarbalamurugan%2Fpinning-dependencies-the-right-way-for-ml-projects-b35c82042d44&source=---header_actions--b35c82042d44---------------------bookmark_footer------------------)
[Listen](https://medium.com/m/signin?actionUrl=https%3A%2F%2Fmedium.com%2Fplans%3Fdimension%3Dpost_audio_button%26postId%3Db35c82042d44&operation=register&redirect=https%3A%2F%2Fmedium.com%2F%40sundarbalamurugan%2Fpinning-dependencies-the-right-way-for-ml-projects-b35c82042d44&source=---header_actions--b35c82042d44---------------------post_audio_button------------------)
Share
Press enter or click to view image in full size

## Why ML is different
In ordinary web projects, loose dependency ranges are usually fine. In machine learning, they are dangerous, because the libraries are bound together by compiled, binary-level contracts that break silently when versions drift apart. signspell taught me this the hard way.
URL Source: https://medium.com/@sundarbalamurugan/pinning-dependencies-the-right-way-for-ml-projects-b35c82042d44?source=rss------devops-5
Published Time: 2026-06-25T06:57:45Z
Markdown Content:
[Sitemap](https://medium.com/sitemap/sitemap.xml)
[Open in app](https://play.google.com/store/apps/details?id=com.medium.reader&referrer=utm_source%3DmobileNavBar&source=post_page---top_nav_layout_nav-----------------------------------------)
Sign up
[Sign in](https://medium.com/m/signin?operation=login&redirect=https%3A%2F%2Fmedium.com%2F%40sundarbalamurugan%2Fpinning-dependencies-the-right-way-for-ml-projects-b35c82042d44&source=post_page---top_nav_layout_nav-----------------------global_nav------------------)
[](https://medium.com/?source=post_page---top_nav_layout_nav-----------------------------------------)
Get app
[Write](https://medium.com/m/signin?operation=register&redirect=https%3A%2F%2Fmedium.com%2Fnew-story&source=---top_nav_layout_nav-----------------------new_post_topnav------------------)
[Search](https://medium.com/search?source=post_page---top_nav_layout_nav-----------------------------------------)
Sign up
[Sign in](https://medium.com/m/signin?operation=login&redirect=https%3A%2F%2Fmedium.com%2F%40sundarbalamurugan%2Fpinning-dependencies-the-right-way-for-ml-projects-b35c82042d44&source=post_page---top_nav_layout_nav-----------------------global_nav------------------)

Member-only story
# **Pinning Dependencies the Right Way for ML Projects**
[](https://medium.com/@sundarbalamurugan?source=post_page---byline--b35c82042d44---------------------------------------)
[Sundar Balamurugan](https://medium.com/@sundarbalamurugan?source=post_page---byline--b35c82042d44---------------------------------------)
2 min read
·
5 days ago
[](https://medium.com/m/signin?actionUrl=https%3A%2F%2Fmedium.com%2F_%2Fvote%2Fp%2Fb35c82042d44&operation=register&redirect=https%3A%2F%2Fmedium.com%2F%40sundarbalamurugan%2Fpinning-dependencies-the-right-way-for-ml-projects-b35c82042d44&user=Sundar+Balamurugan&userId=e061a0ec0b9b&source=---header_actions--b35c82042d44---------------------clap_footer------------------)
--
[](https://medium.com/m/signin?actionUrl=https%3A%2F%2Fmedium.com%2F_%2Frepost%2Fp%2Fb35c82042d44&operation=register&redirect=https%3A%2F%2Fmedium.com%2F%40sundarbalamurugan%2Fpinning-dependencies-the-right-way-for-ml-projects-b35c82042d44&user=Sundar+Balamurugan&userId=e061a0ec0b9b&source=---header_actions--b35c82042d44---------------------repost_header------------------)
[](https://medium.com/m/signin?actionUrl=https%3A%2F%2Fmedium.com%2F_%2Fbookmark%2Fp%2Fb35c82042d44&operation=register&redirect=https%3A%2F%2Fmedium.com%2F%40sundarbalamurugan%2Fpinning-dependencies-the-right-way-for-ml-projects-b35c82042d44&source=---header_actions--b35c82042d44---------------------bookmark_footer------------------)
[Listen](https://medium.com/m/signin?actionUrl=https%3A%2F%2Fmedium.com%2Fplans%3Fdimension%3Dpost_audio_button%26postId%3Db35c82042d44&operation=register&redirect=https%3A%2F%2Fmedium.com%2F%40sundarbalamurugan%2Fpinning-dependencies-the-right-way-for-ml-projects-b35c82042d44&source=---header_actions--b35c82042d44---------------------post_audio_button------------------)
Share
Press enter or click to view image in full size

## Why ML is different
In ordinary web projects, loose dependency ranges are usually fine. In machine learning, they are dangerous, because the libraries are bound together by compiled, binary-level contracts that break silently when versions drift apart. signspell taught me this the hard way.
DeepCamp AI