<?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 Sourabh Burnwal on Medium]]></title>
        <description><![CDATA[Stories by Sourabh Burnwal on Medium]]></description>
        <link>https://medium.com/@sourabhburnwal?source=rss-fa9c325d8a80------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*RYrrqwOf5ck8OEgyxtA54g.jpeg</url>
            <title>Stories by Sourabh Burnwal on Medium</title>
            <link>https://medium.com/@sourabhburnwal?source=rss-fa9c325d8a80------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Thu, 03 Dec 2026 22:16:13 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@sourabhburnwal/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[So, how to get started in MLOps?]]></title>
            <link>https://sourabhburnwal.medium.com/so-how-to-get-started-in-mlops-e9704101d101?source=rss-fa9c325d8a80------2</link>
            <guid isPermaLink="false">https://medium.com/p/e9704101d101</guid>
            <category><![CDATA[llm]]></category>
            <category><![CDATA[mlops]]></category>
            <category><![CDATA[machine-learning]]></category>
            <dc:creator><![CDATA[Sourabh Burnwal]]></dc:creator>
            <pubDate>Sat, 02 Mar 2024 12:24:01 GMT</pubDate>
            <atom:updated>2024-03-02T12:24:01.341Z</atom:updated>
            <content:encoded><![CDATA[<p>I have been working in MLOps for some time now, and the most frequent question I get asked is how to get started in this field. Now, there is no direct, simple answer to this as MLOps is evolving like anything, and no two jobs have the same set of requirements. However, there is a common set of skills to set the foundation in MLOps. So, let’s try to answer this question and come up with a roadmap on ‘How to get started in MLOps?’.</p><h4>What is MLOps?</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/464/1*m9Csbv9I6F6E9lWr5N6eZw.png" /></figure><p>Before we start, let’s first understand what this field is all about. People usually tend to go with what’s-hot-right-now, and there is nothing wrong about it. But, you should understand which kind of problems you will be solving as an MLOps Engineer and if that’s what you want to do for the next few years.</p><blockquote>MLOps, or Machine Learning Operations, focuses on deploying, monitoring, and managing machine learning models in production environments. MLOps engineers tackle problems like deploying models, setting up CI/CD pipelines, monitoring model performance, optimizing scalability and efficiency, implementing version control and governance, managing data pipelines, and facilitating collaboration between teams. Their goal is to bridge the gap between machine learning research and production deployment, ensuring models deliver value effectively.</blockquote><h4>Challenges in ML Production</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/460/1*ZO4vwom3_1Q9Zpx3lCkt7w.png" /></figure><p>Building a Machine Learning product has its own set of challenges, and we are not going to talk about them today. Instead, let’s talk about what happens after you have built your product and now you want to deploy, scale, and maintain it in the long run. You see, now we are dealing with a different set of challenges, some of which are:</p><ul><li><strong>Deployment Challenges:</strong> Ensuring smooth deployment of machine learning models into production environments, addressing issues related to scalability, performance, and integration with existing systems.</li><li><strong>Pipeline Automation:</strong> Designing and implementing automated CI/CD pipelines for building, testing, and deploying machine learning models, streamlining the development process and reducing manual errors.</li><li><strong>Model Monitoring and Observability</strong>: Setting up monitoring systems to track model performance in real-time, detecting issues such as data drift, model degradation, or anomalies that may affect model accuracy.</li><li><strong>Scalability and Efficiency:</strong> Optimizing machine learning workflows for scalability and efficiency, ensuring models can handle large volumes of data and computational resources are utilized effectively.</li><li><strong>Version Control and Governance:</strong> Establishing version control systems for tracking changes to data, models, and code, and implementing governance processes to ensure compliance with regulations and standards.</li><li><strong>Data Management:</strong> Managing data pipelines for preprocessing and preparing data for machine learning models, ensuring data quality, reliability, and consistency.</li></ul><blockquote>It’s important to understand that every ML project has a different set of requirements for MLOps. Some might not even need a dedicated MLOps team.</blockquote><h4>How to start the right way?</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/458/1*QvzRCVpSPA6j4r2EjfH7ig.png" /></figure><p><strong>First, some worthy mentions:</strong></p><ul><li><strong>List of MLOps Resources</strong>: <a href="https://github.com/visenger/awesome-mlops">https://github.com/visenger/awesome-mlops</a></li><li><strong>Learn MLOps from GitHub repositories:</strong> <a href="https://www.kdnuggets.com/2023/02/learn-mlops-github-repositories.html">https://www.kdnuggets.com/2023/02/learn-mlops-github-repositories.html</a></li><li><strong>The ultimate collection of MLOps repositories:</strong> <a href="https://levelup.gitconnected.com/the-ultimate-collection-of-mlops-github-repositories-836a72c8b7d3">https://levelup.gitconnected.com/the-ultimate-collection-of-mlops-github-repositories-836a72c8b7d3</a></li><li><strong>Designing Machine Learning Systems by Chip Huyen:</strong> <a href="https://www.oreilly.com/library/view/designing-machine-learning/9781098107956/">https://www.oreilly.com/library/view/designing-machine-learning/9781098107956/</a></li><li><strong>Neptune’s MLOps blog:</strong> <a href="https://neptune.ai/blog/category/mlops">https://neptune.ai/blog/category/mlops</a></li></ul><p>These resources are more than enough to get started. However, if you are still curious, let me share how I did:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/816/1*iR-UMHS-ygbB41rlVYhTeA.png" /></figure><p>There are 3 pillars of a good MLOps foundation: ML, DevOps, and Software Engineering. Specific skills mostly depend on the job requirements, nevertheless, it’s always better to have a strong foundation. Please note that Computer Vision and NLP are not required and it’s up to your interests to choose one or go with both. Similarly, I added LLMs because it’s a new field and has somewhat different challenges than other domains in the MLOps context. Learn Ansible, and Terraform as per your interests, and requirements.</p><h4>Let’s get into specifics</h4><p>Now assuming you have your fundamentals clear, we can deep dive into specific sub-grid of MLOps. There are a ton of tools that are used in MLOps. Since the field is evolving at a rapid rate, new tools keep getting launched. I am listing down some of the tools you can start with:</p><ul><li><strong>Data Management and Preprocessing:</strong> Kafka, Apache Spark, Hadoop, Hive</li><li><strong>Data Versioning:</strong> DVC</li><li><strong>Model Versioning and Experiment Tracking:</strong> MLFlow, Weights and Biases</li><li><strong>Packaging and Orchestration:</strong> Flask, Docker, Kubernetes, Apache Airflow</li><li><strong>Model Deployment:</strong> Nvidia Triton Inference Server, TorchServe, Seldon Core, Google Vertex AI, AWS Sagemaker</li><li><strong>Monitoring and Observability:</strong> Prometheus, Grafana, OpenTelemetry, ELK Stack</li></ul><p>Before we wrap up, I just want to mention that there is no end to how many tools and technologies you can learn in MLOps. Similarly, there is no ideal minimum set of requirements you need to have before entering this field. If you have your fundamentals right, understand what kind of problems an ML project runs into when we scale, and are willing to learn along the way, you are ready for this field.</p><p>Happy learning!!!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e9704101d101" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Docker Swarm and GPUs]]></title>
            <link>https://sourabhburnwal.medium.com/docker-swarm-and-gpus-c549156d96eb?source=rss-fa9c325d8a80------2</link>
            <guid isPermaLink="false">https://medium.com/p/c549156d96eb</guid>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[docker]]></category>
            <category><![CDATA[docker-swarm]]></category>
            <category><![CDATA[mlops]]></category>
            <category><![CDATA[devops]]></category>
            <dc:creator><![CDATA[Sourabh Burnwal]]></dc:creator>
            <pubDate>Sat, 19 Mar 2022 18:44:02 GMT</pubDate>
            <atom:updated>2022-03-19T18:44:02.957Z</atom:updated>
            <content:encoded><![CDATA[<p><em>#MLiP-1</em><br>Hey Everyone!</p><p>So, you have a unique use-case. You want to deploy an application that may be on cloud or on-premise, and you can’t use anything pre-built simply because it doesn’t give you much control over how you want to operate it. Let’s assume, for instance, your application needs a GPU to run and you also need to pass shm size for some reason. This article covers two things:</p><p>1. How to enable GPU access in a docker swarm service? (since you can’t use <em>--gpus</em> like in <em>docker run</em>)</p><p>2. How to pass shm size argument while creating a docker swarm service?</p><h4>What is Docker Swarm?</h4><p>When you want to scale an application either on cloud or on-premise, one of the ways to do that is creating a docker image of your application, and orchestrating it using an orchestration tool. You must have heard about Kubernetes, right? Well, docker swarm is another. Docker swarm is a container orchestration tool, with master-worker architecture.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/800/1*YNFBjw_2RDsnxk_Q-yag4Q.png" /><figcaption>Fig 1: A service on a swarm with 4 nodes (<a href="https://docs.docker.com/engine/swarm/how-swarm-mode-works/services/">source</a>)</figcaption></figure><p>As you can see, this swarm aka cluster has 4 nodes. The master node is called swarm manager and others are workers. One can interact with the cluster through the manager and run the commands.</p><p>I recommend going through the <a href="https://docs.docker.com/engine/swarm/key-concepts/">documentation</a> for further info if you are new to this. Let’s quickly get on with our main goal for this article. We will first pull a Triton inference server docker image from the Nvidia NGC catalog and a machine learning model from their Github repo. Later, we will deploy the server on a docker swarm. I currently have one machine, so won’t be able to show you a multi-node setup, but adding a new node is just a one-line command.</p><h4>Configuration to setup GPU for Docker Swarm</h4><p>[The steps below are for Linux-based OS (Ubuntu 20.04 in my case) and Nvidia GPUs (gtx 1660ti, driver version 510.47)]</p><pre>$ nvidia-smi -a | grep UUID</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/765/1*4DPsPUEf6_ae47ZoEOi0OA.png" /><figcaption>Fig 2: Output of GPU uuid</figcaption></figure><p>Update the /etc/docker/daemon.json file to this and include your GPU uuid:</p><pre>{<br>    &quot;runtimes&quot;: {<br>        &quot;nvidia&quot;: {<br>            &quot;path&quot;: &quot;nvidia-container-runtime&quot;,<br>            &quot;runtimeArgs&quot;: []<br>        }<br>    },<br>    &quot;default-runtime&quot;:&quot;nvidia&quot;,<br>    &quot;node-generic-resources&quot;: [<br>            &quot;NVIDIA-GPU=GPU-4b0429cc&quot;<br>    ]</pre><pre>}</pre><p>Next, uncomment the second line in /etc/nvidia-container-runtime/config.toml, so your file should look like this:</p><pre>disable-require = false<br>swarm-resource = &quot;DOCKER_RESOURCE_GPU&quot;<br>#accept-nvidia-visible-devices-envvar-when-unprivileged = true<br>#accept-nvidia-visible-devices-as-volume-mounts = false</pre><pre>[nvidia-container-cli]<br>#root = &quot;/run/nvidia/driver&quot;<br>#path = &quot;/usr/bin/nvidia-container-cli&quot;<br>environment = []<br>#debug = &quot;/var/log/nvidia-container-toolkit.log&quot;<br>#ldcache = &quot;/etc/ld.so.cache&quot;<br>load-kmods = true<br>#no-cgroups = false<br>#user = &quot;root:video&quot;<br>ldconfig = &quot;@/sbin/ldconfig.real&quot;</pre><pre>[nvidia-container-runtime]<br>#debug = &quot;/var/log/nvidia-container-runtime.log&quot;</pre><p>Restart the docker service:</p><pre>$ sudo systemctl restart docker.service</pre><blockquote><em>Pull the Triton Inference server image from Nvidia NGC Catalog and create a model directory for the server. (Triton Inference server is just an example of an application that can be orchestrated on docker swarm/k8s which uses GPU.)</em></blockquote><p>Create a docker swarm:</p><pre>$ sudo docker swarm init --advertise-addr &lt;ip-of-any-network-interface&gt;</pre><p>This command will initialize a docker swarm cluster with that machine as swarm manager. The output will consist of a command which you can use to add workers to this swarm.</p><p>Note: you can use the ifconfig command to find out the IP for different network interfaces.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*DnhXS5_gCXkh_Rmrf9jOpA.png" /><figcaption>Fig 3: Output of swarm init</figcaption></figure><h4>Start a service with GPU access and custom shm size</h4><p>For GPU access, the argument is --generic-resource &quot;NVIDIA-GPU=0&quot; , and for shm size, the argument is --mount type=tmpfs,target=/dev/shm .</p><p>So, in the case of running a service of triton inference server, it would look like this:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*lCLA9agkQWcajOPySM4Kcg.png" /><figcaption>Fig 4: Output of docker service create</figcaption></figure><p>As it can be seen in the output, we have successfully created a service that has GPU access and can use an unrestricted amount of shared memory. Now, you can scale it to some number and the cluster will scale up.</p><p>That’s it for this article. Feel free to drop a comment if I missed anything or you face any issues in any step.</p><h4>References:</h4><ul><li><a href="https://gist.github.com/tomlankhorst/33da3c4b9edbde5c83fc1244f010815c">https://gist.github.com/tomlankhorst/33da3c4b9edbde5c83fc1244f010815c</a></li><li><a href="https://github.com/triton-inference-server/server">https://github.com/triton-inference-server/server</a></li><li><a href="https://docs.docker.com/engine/swarm/">https://docs.docker.com/engine/swarm/</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c549156d96eb" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Machine Learning in Production]]></title>
            <link>https://sourabhburnwal.medium.com/machine-learning-in-production-82b932ac3f72?source=rss-fa9c325d8a80------2</link>
            <guid isPermaLink="false">https://medium.com/p/82b932ac3f72</guid>
            <category><![CDATA[data-science]]></category>
            <category><![CDATA[infrastructure]]></category>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[devops]]></category>
            <category><![CDATA[mlops]]></category>
            <dc:creator><![CDATA[Sourabh Burnwal]]></dc:creator>
            <pubDate>Thu, 17 Mar 2022 14:19:08 GMT</pubDate>
            <atom:updated>2022-03-17T14:19:08.287Z</atom:updated>
            <content:encoded><![CDATA[<p><em>#MLiP-0</em><br>Hey Everyone!</p><p>I am Sourabh, working in MLOps and Infrastructure. Basically, I create CI/CD pipelines and deploy Machine Learning models (mostly vision based) in production. The goals are scalability, high availability, fault-tolerance, almost zero downtime, and of course low latency. It takes me quite a while to solve the problems I face in day-to-day work. One reason of which is, I am slow in learning. I just am. But the second and probably the major reason is, there aren’t many resources available on the internet.</p><p>So, I have decided to share my knowledge with the community. I am starting a series called MLiP (Machine Learning in Production), where I will share whatever I know and am learning in my work. This is quite an exciting field, and I don’t know everything. So, throw a comment if I got it wrong somewhere ;)</p><p>See you in the next article !!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=82b932ac3f72" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>