When Legacy Meets Reality: Untangling ML Pipelines Without Losing Your Mind

Chris Billingham
June 12, 2025
Blog

You've been there. Whether you're the data scientist who just inherited a "simple" ML pipeline from your predecessor, or the consultant walking into a new client engagement, that moment when you first look under the hood is... well, let's just say it's rarely what the documentation promised. Here, indeed, be dragons!

We get it. You're not alone in staring at a screen full of interconnected systems that somehow work in production but make absolutely no sense on paper. The good news? You don't have to tackle this mountain alone, and there are real stories from real practitioners who've walked this path before you.

"What Actually Lives Here?" - The Archaeology Phase

Before you can build anything new or fix anything old, you need to understand what you're working with. This isn't just about reading code – it's about understanding the why behind every decision that got you here.

Take Netflix's experience between 2022-2023, where their data science teams discovered that 60% of their work was infrastructure-related rather than actual ML development. Their sentiment analysis projects were taking four months from idea to deployment, not because the models were complex, but because the infrastructure was a maze of disconnected tools and accumulated technical debt.

Sound familiar? You're probably dealing with something similar – a pipeline that works, but nobody quite remembers why it was built that way. Maybe there are hard-coded paths that made sense three years ago, or data transformations that solve problems that no longer exist.

The reality is that research across 2,641 ML repositories found that 61% of technical debt instances are never removed. That means the weird workaround someone implemented in 2022 is probably still there, quietly doing its thing while new systems build around it.

Following the Data Trail… without a Map!

Here's where things get interesting. You start mapping dependencies and realise that your "simple" recommendation system actually touches seventeen different data sources, each with their own update schedules, quality issues, and that one table that's been marked as "temporary" for two years.

Uber faced this exact challenge when they migrated 1.5 exabytes of HDFS storage serving 10,000+ internal users. Their legacy Hadoop systems had hard-coded paths and interdependent pipelines creating complex dependency mapping across 500,000+ daily queries. The migration wasn't just about moving data – it was about understanding how every piece connected to every other piece.

As a consultant, you might walk into a mid-market company thinking you'll modernize their analytics, only to discover that their core business logic is embedded in SQL procedures that haven't been touched since the original developer left. Or maybe you're the in-house data scientist who inherited a system where data preprocessing stages show the highest technical debt concentration: 35% of all issues in a typical ML project.

The detective work isn't glamorous, but it's essential. You're not just mapping what the system does; you're uncovering the assumptions, constraints, and business rules that shaped every decision. This is exactly why we built Etiq's Lineage feature: it provides you with full visibility of your entire ML pipeline so you never get lost again. It analyzes your scripts directly in your IDE and visualizes the interplay between your data and code, giving you insight into its logical flow. Whether you're working with legacy code and models or building new ones, Lineage works with what you already have, helping you understand the maze without having to redraw the map manually.

When Platforms Evolve (And You're Left Behind)

Sometimes the challenge isn't legacy code – it's that the platforms you're using have evolved faster than your ability to keep up. Take the Azure ML SDK migration from V1 to V2 that many teams faced in 2022. What used to be simple PythonScriptStep sequences suddenly required complex node-based architecture with artificial input/output connections, even when scripts didn't actually need data passing between them.

You're not imagining it – platform evolution can genuinely create more complexity than it solves, especially when you're maintaining production systems that were built on the previous paradigm. The question becomes: do you rebuild everything to match the new way, or do you create bridging solutions that buy you time?

Building (or Rebuilding) with Reality in Mind

Once you understand what you're working with, the real work begins. Whether you're updating an existing pipeline or building something new, you're making decisions that future-you (or your successor) will either thank you for or curse your name over.

The research shows that large-scale projects have 40-60% more pipeline stages than small implementations, and data cleaning consumes 25-40% of total pipeline development time in production systems. This isn't a failure of planning – it's the reality of working with real data in real business contexts.

For smaller companies, the constraints are different but no less real. Mistplay, a mobile gaming startup, faced increasing data quality issues with their Firebase Analytics/BigQuery setup as their business grew. Unlike enterprises with dedicated platform teams, they needed serverless, managed solutions with predictable pricing and minimal engineering overhead.

The trick is building systems that learn how you work, rather than forcing you to learn how they work. Your tools should adapt to your workflow and your existing codebase, not the other way around.

The Documentation Dilemma

Let's talk about documentation – that thing we all know we should do better but somehow never quite get right. You know your pipeline inside and out right now, but will you remember why you chose that particular transformation logic six months from now?

The challenge isn't just writing documentation; it's writing documentation that actually helps. Multiple industry studies show that technical debt accumulates at 15-20% annually in mature projects, often because the reasoning behind decisions gets lost over time.

Document the why, not just the what. Future-you doesn't need to know that you used pandas for data preprocessing – that's obvious from the code. Future-you needs to know why you chose that specific windowing function, or why you decided to retrain weekly instead of daily.

Testing in the Real World

Here's the thing about ML pipeline testing – it's not just about unit tests and integration tests. You're dealing with data that changes, models that drift, and business requirements that evolve. Your testing strategy needs to account for all of that.

The research reveals some sobering realities: only 53-54% of enterprise AI proof-of-concepts reach production, with legacy system integration being a primary bottleneck. But when organizations properly address these challenges, the results are dramatic – Netflix saw deployment times drop from 4 months to 7 days, while Uber achieved 50% reduction in pipeline runtime.

Your testing needs to cover not just "does this work?" but "will this keep working when the upstream data schema changes?" and "how will we know when this model starts making worse predictions?"

The challenge is knowing what to test and where to put those tests. You could spend hours writing tests for edge cases that will never happen, or miss the obvious failure points that will definitely bite you in production. That's why Etiq's Testing Recommendations feature exists: our expert data science copilot sits directly within your IDE and observes at the point you're coding, analysing what you're writing, the data you're using, and the AI models you're developing. It then recommends the most relevant tests for your script and where to put them. You can run these tests directly in the Etiq IDE extension, giving you insights into where issues may lie and enabling you to act on them before they cause problems.

The Path Forward

Whether you're untangling someone else's work or building something new, remember that you're not trying to create the perfect system – you're creating a system that works reliably and can evolve with your needs.

Start with understanding what you have. Map the dependencies, document the assumptions, and identify the parts that are working well (yes, there are probably some). Then make incremental improvements that reduce complexity rather than adding to it.

The good news is that you don't have to tackle these challenges alone. Etiq's Data Science Copilot was built specifically for these moments. Our Lineage feature helps you visualize your pipeline's complexity and understand how your data flows through your code, while our Testing Recommendations ensure you're writing the right tests before problems arise. These tools work with your existing workflow and codebase, adapting to how you work rather than forcing you to learn yet another platform.

Most importantly, be kind to future-you. The decisions you make today about architecture, documentation, and testing will determine whether you'll be solving interesting problems six months from now, or still debugging the pipeline you built last week.

The legacy systems and technical debt challenges are real, but they're not insurmountable. Every successful ML team has walked this path, and with the right approach and the right tools working alongside you, you can build something that not only works today but keeps working tomorrow.

Having trouble untangling your ML pipeline challenges? You're not alone, and you don't have to figure it all out by yourself. At Etiq, we built our Data Science Copilot specifically for these moments, because we know that understanding your pipeline and testing it properly shouldn't be the hardest part of your job.

Ready to see how Etiq can help with your ML pipeline challenges? Try our Data Science Copilot free for 28 days and experience how Lineage and Testing Recommendations can make your workflow smoother. No credit card required, no pressure: just see if it works for you.

Or if you'd prefer to stay in the loop with more insights like these, subscribe to our newsletter for practical tips from data scientists who've been where you are.

Start Your Free Trial