<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Gonçalo Costeira on Medium]]></title>
        <description><![CDATA[Stories by Gonçalo Costeira on Medium]]></description>
        <link>https://medium.com/@gcosteira?source=rss-3909b372feac------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*Edulysklu5pcr9FW</url>
            <title>Stories by Gonçalo Costeira on Medium</title>
            <link>https://medium.com/@gcosteira?source=rss-3909b372feac------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Wed, 02 Dec 2026 05:45:29 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@gcosteira/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Productionizing Machine Learning Models]]></title>
            <link>https://medium.com/anybrain/productionizing-machine-learning-models-8b66c3c95584?source=rss-3909b372feac------2</link>
            <guid isPermaLink="false">https://medium.com/p/8b66c3c95584</guid>
            <category><![CDATA[deployment-automation]]></category>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[mlops]]></category>
            <category><![CDATA[ml-model-deployment]]></category>
            <dc:creator><![CDATA[Gonçalo Costeira]]></dc:creator>
            <pubDate>Tue, 10 Dec 2024 15:21:06 GMT</pubDate>
            <atom:updated>2024-12-10T15:21:06.603Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*zp1iuEpputDqfy9oGuVYdw.png" /></figure><h4>Part 2: Deployment Strategies</h4><h3><strong>Turning Models into Real-World Solutions</strong></h3><p>Deploying machine learning (ML) models is crucial in turning your ideas into real-world solutions. While building the model itself is essential, making it work smoothly in a production environment comes with challenges. Your model must be reliable, scalable, and able to handle changing conditions without downtime.</p><p>This post will focus on the deployment phase — an essential part of the MLOps lifecycle. Choosing the right deployment strategy is not a one-size-fits-all decision. Your approach can significantly affect how well your system scales, how reliable it is, and how satisfied your users are. Whether you’re experimenting on a small scale or running large, enterprise-level models, it’s essential to understand the different deployment options.</p><p>This article builds on our <a href="https://blog.anybrain.gg/productionizing-machine-learning-models-7cf001eec3e5">previous post</a> about getting ML models ready for production, where we covered the unique challenges of operationalizing machine learning. Today, we’ll dive into common model deployment strategies, their key features, benefits, and typical use cases.</p><h3>Overview of Deployment Approaches</h3><p>Selecting the right deployment strategy ensures a smooth transition from development to production. Below are the most common approaches, when to use them, and their pros and cons.</p><h4><strong>Shadow Deployment</strong></h4><p>In shadow deployment, we can run a new model alongside your current model without affecting users. The live model handles requests while the latest model works in the background, allowing you to test performance safely.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/328/1*sCEhpPCG48pswPiYuv2fpw.png" /><figcaption>Shadow deployment</figcaption></figure><p>Pros:</p><ul><li>No impact on the user experience.</li><li>It is easy to compare performance with the live model.</li><li>Reduces risk by keeping the new model separate.</li></ul><p>Cons:</p><ul><li>Resource-intensive, as two models run at once.</li><li>No direct user feedback on the shadow model’s predictions.</li></ul><p>Best for: Safely testing new models in real-world conditions without user exposure.</p><h4><strong>A/B Testing</strong></h4><p>In this strategy, we split user traffic between two models to compare performance. Users see one model or another, and you measure metrics like accuracy or engagement to decide which is better.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/401/1*9vXIyY3dDfmrimiF1lgOMA.png" /><figcaption>A/B Testing</figcaption></figure><p>Pros:</p><ul><li>Get real user feedback.</li><li>It is ideal for user-focused applications like e-commerce or recommendation systems.</li></ul><p>Cons:</p><ul><li>Requires a large user base for meaningful results.</li><li>Sensitive to traffic variations and data quality.</li></ul><p>Best for: Directly comparing two models to find the best performance.</p><h4>Multi-Armed Bandit (MAB)</h4><p>Inspired by reinforcement learning, this approach directs more traffic to better-performing models over time, automatically optimizing which model gets the most users.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ROdLqMM8SeJNli6EM3beAg.png" /><figcaption>A/B testing vs Multi-armed Bandit, <a href="https://persona.ly/glossary/performance-metrics/creative-testing-multi-armed-bandit-vs-a-b-testing/">source</a></figcaption></figure><p>Pros:</p><ul><li>Adapts quickly and efficiently to improve performance.</li><li>Less resource waste compared to simple A/B testing.</li></ul><p>Cons:</p><ul><li>It is computationally expensive and requires advanced monitoring.</li></ul><p>Best for: High-traffic scenarios, such as dynamic pricing, where rapid optimization matters.</p><h4><strong>Blue-Green Deployment</strong></h4><p>In a blue-green deployment, we use two environments: one (blue) runs the current model, while the other (green) hosts the new model. After testing the green environment, you switch traffic over with minimal downtime.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/339/1*gsfbjlsKNlzUgfu6jTMTdA.png" /><figcaption>Blue-Green Deployment</figcaption></figure><p>Pros:</p><ul><li>There is little to no downtime.</li><li>Easy rollback if problems arise.</li></ul><p>Cons:</p><ul><li>It can be costly due to duplicate infrastructure.</li><li>Requires careful coordination between environments.</li></ul><p>Best for: Systems where downtime is not acceptable.</p><h4><strong>Canary Deployment</strong></h4><p>In the canary deployment strategy, we introduce a new model to a small group of users. If it performs well, gradually increase the number of users who see it.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/356/1*r25Wycon3klbvDrq3TnOkA.png" /><figcaption>Canary deployment</figcaption></figure><p>Pros:</p><ul><li>Real-world testing with low risk.</li><li>Gradual rollout and easy rollback.</li></ul><p>Cons:</p><ul><li>It needs strong monitoring to catch problems early.</li><li>Slower rollout.</li></ul><p>Best for: Situations where a careful, step-by-step release is essential, especially in consumer-facing apps.</p><h3>Making the Right Choice</h3><p>To deploy your machine learning models effectively, you must understand the various strategies available and when to apply them. Your choice will significantly influence your machine learning systems’ reliability, scalability, and overall performance in a production environment.</p><p>Consider the technical and business aspects when determining which deployment approach is best for your project. Each strategy has advantages and disadvantages, so the right choice will depend on model complexity, business objectives, and available resources.</p><p><strong>Model Complexity: </strong>More complex models, such as those that rely on deep learning architectures or large-scale datasets, may benefit from strategies that allow safer testing before full rollout. For example, a shadow deployment can help validate complex models without disrupting the user experience, while a canary deployment can reveal performance issues at a manageable scale.</p><p><strong>Business Requirements: </strong>Consider your tolerance for downtime or performance dips. If your application must remain constantly available, a blue-green deployment provides seamless transitions with minimal disruption. On the other hand, if your primary goal is to quickly gather user feedback, A/B testing or a multi-armed bandit approach might better align with your business objectives.</p><p><strong>Resource Availability: </strong>Different strategies have different costs. Blue-green deployments, for instance, require parallel production environments, which increases infrastructure overhead. Shadow deployments, which run multiple models simultaneously, can be resource-heavy. Assess whether you have sufficient computing, storage, and budget before committing to a specific approach.</p><p><strong>Risk Tolerance and Compliance: </strong>High-stakes applications — such as those in finance, healthcare, or critical infrastructure — often demand safer, more controlled rollout strategies. Shadow or canary deployments can mitigate risks by detecting issues early while preserving user trust and meeting regulatory requirements. If speed and innovation are top priorities, multi-armed bandit strategies can accelerate iteration but come with a higher operational risk.</p><p>By evaluating these factors, you can choose a deployment strategy that aligns with your technical capabilities, business objectives, and resource limitations. This thoughtful approach ensures that your selected method meets the requirements of your machine learning project and supports long-term success and growth.</p><h3>Practical Guidance</h3><p>Choosing the right deployment strategy is only the beginning. To achieve lasting success, it is crucial to implement effective practices for monitoring, maintenance, and continuous improvement.</p><p><strong>Automate Wherever Possible: </strong>Implement Continuous Integration and Continuous Deployment (CI/CD) pipelines to streamline the model update process. Automated tests, performance checks, and validation steps can help catch issues early and maintain consistent quality.</p><p><strong>Invest in Robust Monitoring and Alerting: </strong>Set up comprehensive monitoring to track key performance indicators like latency, error rates, and throughput. Real-time alerts can help your team quickly address problems as they arise, minimizing downtime and user impact. Logging and metrics tools can also provide insights into user behavior and model performance under different conditions.</p><p><strong>Establish Clear Rollback and Recovery Procedures: </strong>No matter which strategy you choose, be prepared for the unexpected. Have a well-documented rollback plan that allows you to revert to a stable version if performance degrades quickly. A clear incident response process ensures smoother handling of unplanned outages or model failures.</p><p><strong>Gather User Feedback and Iterate: </strong>Incorporate user feedback loops where possible. A/B testing and canary deployments can help you measure how changes affect user behavior for front-end applications. For back-end services, shadow deployments and monitoring tools can guide adjustments. Use these insights to refine models and enhance user satisfaction over time.</p><p><strong>Start Small and Scale Up: </strong>To minimize risk and complexity, begin with limited rollouts. Test your chosen strategy on a subset of traffic or a single region before expanding to a full-scale deployment. Gradually scaling your approach helps validate assumptions, ensure stability, and identify scaling bottlenecks early.</p><p><strong>Align Deployment Strategy with Business Goals: </strong>Regularly revisit your deployment approach to confirm it meets your organization’s evolving needs. As your traffic grows, your model’s complexity increases, or your business priorities shift, be ready to adjust your strategy. Flexibility ensures that your deployment methods continue to deliver the best possible results.</p><h3>Aligning Deployment Strategies with Long-Term Success</h3><p>Choosing the right deployment strategy is crucial in successfully operationalizing your machine learning models. Each approach — whether shadow testing, A/B testing, blue-green deployments, canary releases, or multi-armed bandits — has its strengths, limitations, and ideal use cases. You can select a method that best aligns with your organization’s goals by evaluating model complexity, business requirements, resource availability, and risk tolerance.</p><p>Once you have chosen a strategy, it’s essential to maintain strong operational practices such as effective automation, robust monitoring, and clear rollback procedures. Regular user feedback loops and iterative improvements help ensure that your deployment approach continues to support evolving business needs and technical demands.</p><p>However, there are still important questions that deserve deeper exploration:</p><ul><li><strong>What metrics should be used to evaluate the performance of different deployment strategies?</strong></li><li><strong>How can monitoring be effectively implemented during the various deployment strategies to ensure model performance and user experience?</strong></li></ul><p>These considerations will help refine your deployment workflows, ensuring that your models perform consistently and deliver value over the long term. In our next blog post, we’ll tackle these questions head-on, offering detailed guidance on metrics selection, monitoring best practices, and the essential tools and platforms that can streamline your ML deployment process. Stay tuned!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=8b66c3c95584" width="1" height="1" alt=""><hr><p><a href="https://medium.com/anybrain/productionizing-machine-learning-models-8b66c3c95584">Productionizing Machine Learning Models</a> was originally published in <a href="https://medium.com/anybrain">Anybrain</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Productionizing Machine Learning Models]]></title>
            <link>https://medium.com/anybrain/productionizing-machine-learning-models-7cf001eec3e5?source=rss-3909b372feac------2</link>
            <guid isPermaLink="false">https://medium.com/p/7cf001eec3e5</guid>
            <category><![CDATA[productionizing-ml]]></category>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[mlops]]></category>
            <category><![CDATA[machine-learning-models]]></category>
            <dc:creator><![CDATA[Gonçalo Costeira]]></dc:creator>
            <pubDate>Tue, 12 Mar 2024 15:26:18 GMT</pubDate>
            <atom:updated>2024-11-28T13:23:48.286Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*t5EdFdshf2CMDdeqv9GgLA.png" /></figure><p>Welcome to this series of blog posts where we&#39;ll walk you through how we get machine learning models from the drawing board to real-world use. We want to shed some light on the tricky path to making these models ready for everyday applications, share some helpful tips, and tell you about our experiences at Anybrain. This first post starts our dive into the significant challenges of making machine learning models work outside the lab.</p><h3><strong>Machine Learning System vs Traditional Software System</strong></h3><p>The distinction between machine learning (ML) systems and traditional software systems marks a pivotal shift in the landscape of modern digital infrastructure. These two paradigms diverge significantly in their development, operation, and maintenance approach, each presenting unique challenges and productization opportunities.</p><p>Traditional software systems rely on explicit programming, with developers crafting code to dictate every decision and action the software will take. This rule-based construction contrasts with ML systems, which are engineered to learn from data patterns and make decisions autonomously. The creation of ML systems involves training models on datasets to perform tasks, eliminating the need for explicit programming for each potential outcome.</p><p>A notable difference lies in their dependency on data. ML systems are inherently linked to the quality, quantity, and relevance of their training data, a dependency that introduces significant complexities in ensuring data integrity. These systems stand in contrast to traditional software, where data dependency is less concerned.</p><p>Predictability also sets these systems apart. Traditional software is known for its predictability, with consistent outputs for given inputs. ML systems, however, navigate the realm of unpredictability due to their reliance on probabilistic algorithms and the variable quality of training data. This unpredictability needs a distinct approach to testing and validation, focusing on the system&#39;s performance and ability to apply learned insights to real-world scenarios.</p><p>Traditional software typically sees code modifications or enhancements regarding maintenance and updates. ML systems, however, often require retraining with new data to stay current, in addition to regular code updates. This process is vital to adapt to evolving data patterns and ensure continued accuracy over time.</p><p>The testing and validation phase further underscores the fundamental differences between these systems. While traditional software testing centers on verifying code correctness and functionality, ML systems demand validation of their performance and generalization capabilities, often requiring complex datasets for thorough testing.</p><p>The dynamic nature of data and the necessity for continuous monitoring and updating in ML systems introduce a unique set of challenges. Machine Learning Operations (MLOps) plays a crucial role here. MLOps provides the methodologies and practices needed to streamline the deployment, monitoring, and maintenance of ML systems in production environments.</p><h3><strong>Machine Learning Systems Process</strong></h3><p>Creating and deploying machine learning (ML) models involves a detailed, iterative process with several critical stages extending well beyond initial development.</p><h4>Business &amp; Data Understanding</h4><p>The journey begins with <strong>data collection and preparation</strong>, laying the groundwork with a thorough dataset that&#39;s subsequently cleaned and preprocessed to enhance model robustness. <strong>Feature engineering </strong>follows a crucial step to improve the model&#39;s predictive capabilities and interpretability.</p><h4>Model Development</h4><p>Next, <strong>model selection and training </strong>take place. This phase involves experimentation with various algorithms and settings to optimize performance, leading to <strong>model evaluation</strong>, where the trained model is tested against unseen data to assess its accuracy and generalizability.</p><p>Based on these insights, <strong>hyperparameter tuning and optimization </strong>refine the model further. When the model&#39;s performance is deemed satisfactory, it progresses to <strong>deployment</strong> in a production environment, which can vary based on the application&#39;s specific needs.</p><h4>Model Operations</h4><p>However, deployment isn&#39;t the final step. <strong>Monitoring and maintenance </strong>are ongoing requirements to ensure the model remains effective over time and addresses emerging issues such as data drift. Lastly, the <strong>feedback loop </strong>represents the cyclical nature of the ML workflow, where real-world performance feedback informs continuous improvements and adaptations.</p><p>This holistic approach, from data preparation to continuous monitoring and feedback, highlights the dynamic and iterative nature of ML model development and deployment.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*dCM9klh2bQ9CtFhfW4BISA.jpeg" /><figcaption>Fig1: CRISP-ML(Q) process model by <a href="https://ml-ops.org/content/model-governance">ml-ops.org</a></figcaption></figure><h3>Challenges in Productionizing Machine Learning Models</h3><p>Moving machine learning (ML) models from the experimental phase to commercial use involve technical hurdles throughout development. These include challenges related to data handling, the structure of the model, its ability to scale, performance metrics, and seamless integration into existing operations. Addressing these issues is crucial for the launch and ongoing support of ML-driven products within actual market environments.</p><p>The foundation of any effective ML model lies in the quality and impartiality of its training data. Establishing robust data management systems that automate the processes of data collection, cleansing, and preparation, coupled with data enrichment and systematic quality assessments, is vital for preserving the integrity and applicability of data.</p><p>Implementing strategies such as cross-validation, regularization, and versatile model frameworks is important to ensure that models can accurately predict outcomes on new, unseen data. Additionally, leveraging transfer learning and adapting models to new domains can significantly enhance their versatility across various scenarios.</p><p>Meeting the demands of escalating data volumes and computational needs necessitates refined model designs, which can be achieved using cloud-based and distributed computing resources. Implementing strategies for balancing loads and dynamically scaling resources is key to maintaining consistent performance.</p><p>Updating models in response to changing data landscapes and user requirements while efficiently managing their versions requires a solid MLops strategy. This strategy should automate model training, deployment, and oversight aspects, employing continuous integration and delivery practices for seamless updates and management of models and their data.</p><p>Ensuring model fairness and reducing bias call for models designed with fairness in mind, thorough bias evaluations, and the application of interpretability mechanisms. Cultivating a diverse team for model development can also aid in identifying and counteracting potential biases.</p><p>Improving the transparency and accountability of ML models, particularly those with complex structures, involves integrating interpretability frameworks and approaches, such as feature significance analysis and the application of explainable AI (XAI) techniques. This is essential for building end-users&#39; trust by making model decisions more transparent.</p><p>The effective integration of ML models into preexisting infrastructures necessitates careful consideration of compatibility issues, response times, and anomaly management. This can be achieved by adopting a microservices architecture, using APIs, and incorporating human oversight for enhanced dependability.</p><p>Navigating the technical complexities of making ML models market-ready demands a comprehensive strategy merging advanced engineering solutions with a deep understanding of their practical application contexts.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ExXIJ8eMeOy5P7hjripU0A.jpeg" /><figcaption>Fig1: Machine learning Engineering by <a href="https://ml-ops.org/content/end-to-end-ml-workflow">ml-ops.org</a></figcaption></figure><h3>Overcoming Challenges in Productionizing Machine Learning Models with MLOps</h3><p>As we saw, bringing machine learning (ML) models from development to production is challenging—these range from ensuring model reliability and scalability to maintaining performance over time. As businesses increasingly rely on ML to drive decision-making and automate processes, the stakes for successfully productizing these models have never been higher.</p><p>The production of ML models involves more than algorithm selection and training. It requires a holistic approach to ensure that models are not only accurate but also robust, scalable, and seamlessly integrated into existing systems.</p><p>MLOps, a compound of &quot;machine learning&quot; and &quot;operations,&quot; combines the best practices from machine learning and software development. It aims to automate and streamline the end-to-end machine learning lifecycle, facilitating the deployment, monitoring, and maintenance of ML models in production environments.</p><p>Transitioning ML models from development to production can be daunting. However, the adoption of MLOps practices offers a structured and efficient pathway through this maze. By automating critical aspects of the ML lifecycle, MLOps mitigates the challenges and enhances the overall value and impact of machine learning initiatives. This can be achieved by providing tools for better monitoring and maintenance and ensuring that models remain compliant and scalable.</p><p>As organizations continue to navigate the evolving landscape of ML technologies, the principles and practices of MLOps will play a crucial role in transforming innovative models into tangible business solutions. Embracing MLOps is not merely a strategic choice but a necessity for those looking to leverage the full potential of machine learning in their operations.</p><p>In the following article of this series, we will cover the various Model Deployment Strategies, highlighting their advantages and challenges, and explore how some MLOps techniques can help us overcome these challenges.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=7cf001eec3e5" width="1" height="1" alt=""><hr><p><a href="https://medium.com/anybrain/productionizing-machine-learning-models-7cf001eec3e5">Productionizing Machine Learning Models</a> was originally published in <a href="https://medium.com/anybrain">Anybrain</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>