<?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 Kumar Abhishek on Medium]]></title>
        <description><![CDATA[Stories by Kumar Abhishek on Medium]]></description>
        <link>https://medium.com/@kumarabhishek-ai?source=rss-d416d37e43c6------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*JSBy0bmNEPirzuyk.jpg</url>
            <title>Stories by Kumar Abhishek on Medium</title>
            <link>https://medium.com/@kumarabhishek-ai?source=rss-d416d37e43c6------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Mon, 23 Nov 2026 20:58:14 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@kumarabhishek-ai/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[Navigate through Bermuda Triangle of AI Adoption]]></title>
            <link>https://kumarabhishek-ai.medium.com/navigate-through-bermuda-triangle-of-ai-adoption-5b1983534b23?source=rss-d416d37e43c6------2</link>
            <guid isPermaLink="false">https://medium.com/p/5b1983534b23</guid>
            <category><![CDATA[ai-cost-optimization]]></category>
            <category><![CDATA[enterprise-ai-adoption]]></category>
            <category><![CDATA[enterprise-ai-solutions]]></category>
            <category><![CDATA[enterprise-architecture]]></category>
            <dc:creator><![CDATA[Kumar Abhishek]]></dc:creator>
            <pubDate>Sat, 10 Oct 2026 12:24:44 GMT</pubDate>
            <atom:updated>2026-10-26T19:28:18.236Z</atom:updated>
            <content:encoded><![CDATA[<p>What happens when AI Adoption in any organization is faster than its AI Maturity. This brings serious problems in the organization in terms of increased token cost, surge in the agent’s run cost, shadow AI spreading, failing governance, declining user trust in AI outcomes, multiplied hallucinations, increased latency.</p><p>There has been continuous discussions around AI being working for POCs and MVPs , but when moving to scaling AI applications, Enterprise AI Architects find various checklists missing on the floor.</p><p>The real challenge of AI is no longer: “Can the model generate?”</p><p>The challenge is: “Can the enterprise sustain generation economically, reliably, and at human adoption scale?”</p><p>Below diagram shows organizational tension between operating cost, revenue, and organizational complexity. Enterprises entering the AI era often pass through a dangerous middle zone (Red Bermuda Triangle) where informal AI usage outpaces governance, causing operational instability, escalating inference cost, performance degradation, and trust issues.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/598/1*vt2bOWfEsgjmX5_YZhDbfw.png" /><figcaption><strong>Formal &amp; Informal AI Adoption &amp; Usage</strong></figcaption></figure><p>In an <strong>Informal AI Usage </strong>in any organization, informal AI adoption grows faster than governance. Every Business Unit in the organization tries running AI experiments without prior AI Governance, data readiness, hence as AI adoption increases informally, AI Operational cost multiplies multi fold and hence AI Adoption control becomes challenging.</p><p>In <strong>Formal AI Usage </strong>in any organization, AI Maturity leads AI Adoption. Prior to AI Adoption, Data Governance, Data Trust, Data readiness for AI implementation is already matured. Business Processes are streamlined and re-engineered to ensure AI is successful producing business values and with optimized AI Operations cost .</p><p><strong>3 phases of AI Adoption impacts AI Operational Cost burden in any organization:</strong></p><p><strong>Early Adoption</strong> Characteristics:</p><ul><li>experimentation</li><li>excitement</li><li>low governance</li><li>manageable cost</li></ul><p>AI feels magical.</p><p><strong>Scaling Risk Zone (Red Bermuda Triangle) characteristics</strong>:</p><ul><li>exploding token costs</li><li>latency issues</li><li>security concerns</li><li>hallucination incidents</li><li>duplicate copilots</li><li>uncontrolled agent proliferation</li></ul><p>This is where AI enthusiasm meets enterprise reality. High adoption without maturity leads to “Shadow AI,” fragmented workflows, unoptimized token spending, and severe data privacy risks.</p><p><strong>Mature AI Operating Model</strong></p><p>Successful organizations eventually:</p><ul><li>formalize AI governance,</li><li>standardize architectures,</li><li>implement model routing,</li><li>optimize inference economics,</li><li>centralize observability.</li></ul><p>At this stage:</p><ul><li>cost stabilizes,</li><li>latency improves,</li></ul><p>adoption becomes sustainable ensuring active user retention, trust, and business value realization.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/920/1*br2QUSiBckv_eO6bu8__UA.png" /><figcaption><strong>4 Forces of AI Adoption</strong></figcaption></figure><p>This above visual highlights a trade-off:</p><ul><li><strong>Green line</strong> = Business value created.</li><li><strong>Blue line</strong> = Managed/Formal AI operational burden.</li><li><strong>Purple line</strong> = Unmanaged/Shadow AI burden.</li></ul><p>Enterprise AI Architects, need to optimize the below:</p><ul><li>Cost per agent’s decision</li><li>Cost per business outcome</li><li>Cost per automated workflow</li><li>Cost per customer interaction</li></ul><p>Hence , future of AI is not only about adding Agentic efficiency, but also optimize the overall AI Operations cost in the scaled scenario.</p><p>How to ensure that AI Operations cost is contained and optimized? This can be ensured with strong Enterprise AI Architectural practice with strong Data foundation.</p><p>Few pointers to notice while creating scalable Architecture considering non-functional and security requirements for successful AI implementation:</p><ul><li>Ensure that Agent’s are protected from any <strong>Prompt Injection</strong>. All Agents included in the agentic workflow have their own identity captured and used in the session appropriately.</li><li>Ensure that <strong>Risk and Complexity assessment </strong>of the tasks are done while agents consider appropriate reasoning to think. You can consider Risk Analyzer or Sensitivity Detector layer for your agents.</li><li>Not all Agents decisions need LLM endpoint to be consumed incurring token cost.</li><li>Ensure <strong>Decision Admissibility </strong>is applied strongly. All actions need not to be taken for all Agent’s decisions. It needs to be ensured that agentic decisions trigger tools invocation only when decisions are in-compliance with regulatory and policies constraints.</li><li>Ensure that Agent’s outcomes are valid and <strong>trusted outcomes </strong>for the end-users. Ensure appropriate Guardrails are applied on top of input and output of agents.</li><li>Ensure that <strong>Observability </strong>is taken care for all agents considered , designed in the agentic workflow.</li></ul><p>Below is the enterprise scale AI Reference Architecture showcasing different customized layers to ensure high AI Adoption as per the :</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*U7tmK4eiyZAaCjub2ybDBQ.png" /><figcaption><strong>Reference Architecture ensuring high AI Adoption with Maturity</strong></figcaption></figure><p>Below are the details of each architectural layer of the above diagram:</p><ol><li><strong>Intent Detection &amp; Classification</strong>: once user enters his/her query in the chat UI, query reaches the intent detection layer, which classifies the intent of the user query/prompt. As per the classified intent, query is processed.</li></ol><p>2. <strong>Context &amp; Session Management</strong>: enrich the prompt / user query with appropriate contextual information. This can be done using user query specific context information cached or stored in long term memory.</p><p>3. <strong>Risk &amp; Complexity Scoring Engine</strong>: The ‘<strong>Risk + Complexity Scoring Engine’ Layer</strong> is the intelligence governance engine of Enterprise AI systems. Purpose of this layer is to analyze “How much intelligence, governance, cost, latency, and oversight should this agent request receive?” Based on this layer decision, request is routed to appropriate model. Ultimately, it controls and contains AI Operational costs.</p><p>4. <strong>Policy Decision Engine</strong>: This layer ensure that the decisions taken by the agent is in-compliance with regulatory requirements. Also, it ensure the organizational policies adhered by agents or not while agents take decisions.</p><p>5. <strong>Adaptive Modular Router</strong>: Based on the complexity assessment of the prompt / user query, this layer takes Routing decision. I named it as MILA (Multiple Interface Linked Architecture)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/501/1*YvVhhYGHFzzAfhj0JiKioQ.png" /><figcaption><strong>Complexity and Risk based Routing Decision table</strong></figcaption></figure><p>Requests can be redirected to any deterministic Rule Engine or Small Language Model or custom build Machine Learning model or Human Escalation.</p><p>6. <strong>Agent Execution Layer</strong>: this layer represents the Agent runtime, Framework (Microsoft Agentic Workflow [MAF]), LangGraph, LangChain, AWS Strands etc) used to build Agentic workflow, Orchestration patterns, Tool Selector mechanism.</p><p>7. <strong>Tool / Knowledge Base</strong>: this layer represents the tools serving as tools for the Agents in the agentic workflow. Workflow can be based on multi-agent or single-agent.</p><p>8. <strong>Observability / Traceability</strong>: different agents take different decisions based on the context, and explainability of the agentic decisions and actions has to be taken care before Agentic Workflows are operationalized. Token count should also be visualized per prompt / user request level for every input and output level.</p><p>9. <strong>Validate Outcome</strong>: ensure that outcomes generated by the agents are free from any IP, PII, PHI or other sensitive information.</p><p>10. <strong>Trusted outcome received by the user</strong>: Lastly, outcome served by the agents to the end users should be trusted and validated outcome. It should be free from any ambiguity and inconsistencies.</p><p><strong>4 Forces System of AI Adoption</strong>:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*3nDmJEc32e7nV-lofjwmRA.png" /><figcaption><strong>AI Adoption Flywheel</strong></figcaption></figure><p><strong>Looking Ahead</strong></p><p>Strong Enterprise AI Architecture can help scaling up AI applications ensuring higher <strong>AI Adoption </strong>with optimized <strong>Run Cost </strong>improving <strong>Latency </strong>and <strong>Accuracy </strong>.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=5b1983534b23" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Obfuscating Python code]]></title>
            <link>https://kumarabhishek-ai.medium.com/obfuscating-python-code-a67010f025b3?source=rss-d416d37e43c6------2</link>
            <guid isPermaLink="false">https://medium.com/p/a67010f025b3</guid>
            <category><![CDATA[python-code-obfuscation]]></category>
            <dc:creator><![CDATA[Kumar Abhishek]]></dc:creator>
            <pubDate>Thu, 16 Apr 2026 20:08:37 GMT</pubDate>
            <atom:updated>2026-04-16T20:08:37.604Z</atom:updated>
            <content:encoded><![CDATA[<p>Sometimes you want to share your application code to the customer or some vendor and also want to ensure that your source code is not reverse engineered. Code obfuscation is very much possible in Python world. You need to install pyarmor to obfuscate your python code and then create docker Image consuming the obfuscated code.</p><p>This prevents Python source code files being extracted using reverse engineering from your docker image and hence provides a mechanism to save your application source code from being stolen or misused.</p><p>Below are the simple pip commands to install and then use Pyarmor:</p><ol><li>install pyarmor : python -m pip install -U pyarmor</li><li>check if pyarmor is installed properly: python -m pip show pyarmor.</li><li>you can also see the pyarmor using : python -m pyarmor.cli — version</li><li>you can obfuscate code using this : python -m pyarmor.cli gen -O dist -r package1/sub-package1</li><li>update Dockerfile to use obfuscate code files as input while creating docker image:</li><li>run ci-cd pipeline to create docker image, push docker image to Azure Container Registry (ACR) and then pull docker image from ACR and deploy on to the target.</li></ol><p>Below is the code snippet from the Dockerfile:</p><p># — — — — — Stage 1: Builder — — — — — <br>FROM python:3.12-slim AS builder<br>WORKDIR /app</p><p># Install Python deps<br>COPY requirements.txt ./<br>RUN pip install — no-cache-dir — upgrade pip &amp;&amp; \<br> pip install — no-cache-dir -r requirements.txt</p><p># Install PyArmor CLI<br>RUN pip install — no-cache-dir -U pyarmor</p><p>RUN python -m pyarmor.cli gen -O /obf -r &lt;YOUR_ROOT_PACKAGE_NAME&gt;</p><p># — — — — — Stage 2: runtime — — — — — <br>FROM python:3.12-slim AS runtime<br>WORKDIR /app</p><p># Replace &lt;YOUR_ROOT_PACKAGE_NAME&gt;/ with obfuscated &lt;YOUR_ROOT_PACKAGE_NAME&gt;/</p><p># COPY requires src and dest; <br>COPY — from=builder /obf/&lt;package_name&gt; /app/&lt;YOUR_ROOT_PACKAGE_NAME&gt;<br>COPY — from=builder /obf/pyarmor_runtime_000000 /app/pyarmor_runtime_000000</p><p>EXPOSE 8000</p><p>CMD [“python”, “-u”, “-m”, “uvicorn”, “main:app”, “ — host”, “0.0.0.0”, “ — port”, “8000”, “ — log-level”, “info”]</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a67010f025b3" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Agentic AI Strategy to Enterprise Scale]]></title>
            <link>https://kumarabhishek-ai.medium.com/agentic-ai-strategy-to-enterprise-scale-4573822e0d76?source=rss-d416d37e43c6------2</link>
            <guid isPermaLink="false">https://medium.com/p/4573822e0d76</guid>
            <category><![CDATA[agentic-ai-maturity]]></category>
            <dc:creator><![CDATA[Kumar Abhishek]]></dc:creator>
            <pubDate>Tue, 07 Apr 2026 07:39:51 GMT</pubDate>
            <atom:updated>2026-06-09T20:12:28.800Z</atom:updated>
            <content:encoded><![CDATA[<p><strong>Agentic AI Strategy to Enterprise Scale</strong></p><p>Defining AI Strategy which can really allow AI@Scale in coherence with Business Value Chain is a cumbersome time taking activity. Enterprises need to evaluate their current state of AI Maturity and swiftly move towards achieving the AI Maturity in steady manner .</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/940/1*yQIQ8OBmsem2Kwfntd4Z1A.png" /></figure><p>The above diagram shows the levels of AI Maturity</p><p>AI Maturity starts from NO AI Strategy progressing ahead achieving Adaptive AI maturity level:</p><ol><li><strong>L1 (NO AI Strategy)</strong>: enterprises have no AI strategy defined. There is no roadmap to improve on data quality and data serve mechanism so that data can be AI ready.</li><li><strong>L2 (Technical AI Strategy)</strong>: Measure data quality &amp; maturity. AI acts as standalone AI strategy without business value chain amalgamation.</li><li><strong>L3 (Business aligned AI Strategy)</strong>: This has unidirectional connect between Business &amp; AI. AI works as supporting tool for the business rather than the core business model. It is usually a strategic fit, where business identifies which problem to solve to reduce operational cost, or enhance customer experience etc.</li><li><strong>L4 (Business Embedded AI Strategy)</strong>: This has bidirectional connect between Business and AI. Focus on building AI into the existing software systems, consuming processes which people use on daily basis. e.g. AI integration with ERP, CRM systems to increase efficiency of these systems.</li></ol><p>5. L5 (<strong>Business Adaptive AI Strategy): </strong>Here focus is to define AI which can learn and improve by itself, without any manual intervention.</p><p>One aspect is common across all Agentic AI Strategies i.e. help Business to become Prescriptive Analytics organization where decisions are taken based on facts rather than emotions.</p><p>In order to achieve maximum AI maturity level, enterprises need to embrace their journey following Agent AI Application Lifecycle.</p><p><strong>Agentic AI Application Lifecycle</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*WcAcdZfMftnuYrNYIX9PHQ.png" /><figcaption>Apply Agentic AI Lifecycle during POC itself</figcaption></figure><p><strong>Ideation</strong>: An idea can be based on various themes, which mostly represents Horizontal AI where a particular AI Automation can be impactful for various industry domains. At the same time, Vertical AI based themes can be based on a particular industry requirements. Autonomous Agents with limited or full Human Intervention is subject to design and complexity of requirements.</p><p><strong>Value Model: </strong>Most of the Agentic AI Implementation fail or not adopted by the business users due to lack of Value Model identified prior to kick-off of the design and build. Value Model helps answering , why Agentic AI based Solution is needed. What is the impact it can bring to the business along with the end users (humans).</p><p><strong>How to identify Agentic AI Value Model &amp; Returns</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/920/1*Y1h_mCfzCxXzYPGPVazUxQ.png" /><figcaption>Business Value Model for Agentic AI Solution</figcaption></figure><p>Before solutioning AI based solution, AI Tech folks in collaboration with Business folks need to define the Value Model which can really show how AI Agent is going to help end users. Particularly, in Agentic AI world, it becomes utmost important to define the value model of the AI System so that effort put in to build AI apps doesn’t go wasted. Ultimately, end users should get benefited with AI based implementations.</p><p><strong>Scaling Challenges for AI Agents</strong></p><p>Its very important to consider all edge conditions to be addressed during the Agentic AI POC itself. Most of the time, development teams run the POC consuming sample data and demonstrate that expected results are achieved. This sounds like a very immature way of working with Agents.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*LH8CZhfPuPvHUBnEPj7ezQ.png" /><figcaption>Challenges for Scaling AI Agents Workflow</figcaption></figure><p>Specifically, in the industries like Banking, Finance , Healthcare where regulations are very tight and need to be enforced by agents, the agents start failing in Production.</p><p>What’s the way out to succeed in Production:</p><ol><li><strong>Don’t run Agents in Silos</strong>: consume all necessary tools, policies or knowledge base during the POC itself to full-proof your Agentic workflow. Address all your dependencies before starting your Agentic Workflow POC.</li><li><strong>Data Quality Assurance</strong>: always ensure that AI Agents are fed with high quality, consistent and accurate data. Feeding bad data to AI Agents can cause cascading failures.</li><li><strong>Ensure that async Orchestration works </strong>as expected with the Agentic Workflow. Test LLM hallucination with all possible scenarios and fix the defects.</li><li><strong>Validate the Human-In-The-Loop </strong>(human intervention) agentic flow with all probable scenarios.</li><li><strong>Automated Policy Enforcement</strong>: Ensure Regulatory requirements are addressed during the POCs</li><li><strong>Enforce Governance before Scaling</strong>: Governance related aspects should be taken care during POCs itself. Usually, when we go with Autonomous Agentic Workflows, we need to ensure that the decisions taken by the Agents are captured on the fly and are explainable. Most of the time, Observability frameworks/tools capture the decision taken by agents and go ahead, but it is also important for the Observability mechanism to explain details about a particular decision taken by agents. You can have your own Enterprise level “Agent Control Plane” addressing this requirement.</li><li><strong>Apply Roolback Strategy</strong>: You need to have Rollback strategy for the Agentic applications in Production. You can think about applying various deploy patterns like Blue-Green, Canary, Rolling deployment to reduce the downtime of Agentic workflow(s).</li></ol><p><strong>Data Strategy:</strong></p><p>Data security and governance are the foundational pillars for scaling agentic AI from experimental pilots to enterprise-grade production. Because agentic AI operates with autonomy — independently planning, reasoning, and accessing tools — traditional, manual security and governance approaches are insufficient.</p><p>Effective data security and governance enable scalability by acting as guardrails that prevent autonomous agents from creating risks, allowing them to function reliably across massive, distributed datasets.</p><p><strong>Strategy to balance Cost, Latency &amp; Performance</strong></p><p>You need to apply a balancing act between Cost, Latency and Performance.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*vnhh5i_ip-uP6bLPAuFDuw.png" /><figcaption>Apply balancing act between Cost, Latency &amp; Performance</figcaption></figure><p><strong>Looking Ahead</strong></p><p>When AI Agents are moving from individual tools / assistants to fully Autonomous Agentic Workflows, the challenge is as much as a POC culture as a technical one. Effort estimation needs to be done appropriately looking at complete end-to-end POC rather than only looking at the core agentic functionality. Hence, ignoring Non-Functional Requirements (NFR) during POC can be fatal for scaling the Agentic AI application.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=4573822e0d76" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How to build MCP Server]]></title>
            <link>https://kumarabhishek-ai.medium.com/how-to-build-mcp-server-4b58cd4f116f?source=rss-d416d37e43c6------2</link>
            <guid isPermaLink="false">https://medium.com/p/4b58cd4f116f</guid>
            <dc:creator><![CDATA[Kumar Abhishek]]></dc:creator>
            <pubDate>Mon, 15 Sep 2025 11:36:40 GMT</pubDate>
            <atom:updated>2025-09-15T11:36:40.351Z</atom:updated>
            <content:encoded><![CDATA[<p>Model Context Protocol has been playing a crucial role in integrating various tools with Agents in a very streamlined manner. You can expose your tools via APIs and connect to the MCP clients. There has been lots of confusion about MCP. Below clarifies the doubt:</p><p>1) What MCP Server IS NOT</p><p>•MCP is not a framework for building agents</p><p>• MCP is not a Python library</p><p>• MCP is not a container</p><p>• MCP is not a way to code agents</p><p>Ultimately,</p><ul><li>MCP (Model Context Protocol) is a protocol — it’s a standard.</li><li>It is a simple way to integrate tools, resources and prompts</li></ul><p>Below diagram shows, how the ecosystem works:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*EvVNulhvJLPIkrdz.png" /></figure><p>Host represents the IDE where your MCP Client is residing.</p><p>MCP Client connect with MCP Server in 1:1 way. This means that 1 MCP Client will connect to 1 MCP Server. It might be the case that you have multiple tools exposed on 1 MCP Server.</p><p>MCP Server can connect to the resources in 2 ways:</p><p>1) STDIO</p><p>2) Server Sent Event (SSE)</p><p>STDIO is the mechanism to connect any MCP Client with MCP Server, when client and the server are in the same network.</p><p>In certain scenario, when you are using tool exposed on a MCP Server which is build by any 3rd party open source provider. In this case, you will need to use STDIO as the mechanism to connect to the MCP Server. You will go ahead using SSE in a very rare scenario, when you want to consume an API which is located on a remote server.</p><p>In both the scenarios, only the MCP Client source code differentiates.</p><p>Below diagram shows a typical flow where relevant answer for a chatbot query is resulted by a tool available on any MCP server.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/703/0*HQk0QbNi5TIZc5FC.png" /></figure><p>In the above sequence diagram, the flow is like below in sequential manner :</p><p>1)User enters a query in the chatbot UI</p><p>2)Agentic AI application receives the user query and routes the query to the Bedrock LLM Model</p><p>3)LLM model processes the user query and with the help of System Prompt, it decides which tool to invoke to process the user’s query</p><p>4)LLM model sends the tool details to the AI Application.</p><p>5)AI Application has MCP Client which translates the Tool Use response as per the MCP Protocol</p><p>6)MCP Client routes the request to the MCP Server</p><p>7)MCP Server executes the tool as per the request and sends the result back to the MCP Client</p><p>8)MCP Client receives the tool result</p><p>9)MCP Client sends the tool result to the Bedrock LLM model to format the result in the presentable format</p><p>10)LLM model sends the result to the AI Application</p><p>11)AI Application sends the result to the end user</p><p>If you want to try to build MCP server on your own Windows laptop, you will need to do the below and ultimately validate your local MCP Server tools.</p><p>1) Set up the Python Environment. Below are the steps:</p><ol><li>Create Python virtual environment</li></ol><p>uv init my-mcp-server<br>cd my-mcp-server<br>uv venv<br> source .venv/bin/activate # or .venv\Scripts\activate on Windows</p><ol><li>Add dependencies (Python libraries) for MCP</li></ol><p>uv add mcp</p><p>Now, you need to instantiate FastMCP in your Python code as below:</p><p>from mcp import FastMCP</p><p>mcp = FastMCP(name=”My_MCP_server”)</p><p>Now, you need to write python functions which you would like to expose as tools using MCP. So, write Python functions and expose them as MCP tools. In this below example, I wrote maths.py where I have 3 functions ( add, subtract and multiply ) .</p><p>Below is the glimpse of Python functions written to perform mathematical actions on 2 numbers:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/903/0*nPBZPoMT0KcLjDPe.png" /></figure><p>Below is the equivalent MCP Server code for the same mathematical functions above:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/902/0*T8P52pMKJNX48MIl.png" /></figure><p>Note that all python functions are bind yy annotation @mcp.tool()</p><ol><li>Expose data as MCP resource . Note @mcp.resource annotation used in the get_my_data() function</li><li>Execute MCP Server script on terminal : uv run maths_server.py</li></ol><p>Now, you can test your MCP Server using MCP Inspector. Once you have your functions exposed as MCP tool, open terminal ( I used Visual Studio Code terminal), type the command as below to start the MCP Inspector:</p><p>npx @modelcontextprotocol uv run &lt;file_path&gt;\\maths_server.py</p><p>​​​​See the below diagram:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/938/0*u7eFmJ_mjgKcv_eF.png" /></figure><p>Once you see the above message in the terminal, click on the MCP Inspector link as highlighted in red block. You can see the Inspector screen on the browser.</p><p>Now, you can validate your tool available on your MCP Server build on your local laptop Python environment.</p><ol><li>First select STDIO as your connectivity mechanism between MCP Client and Server. Click on Connect</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/426/0*hKanbmCnMrde8bHt.png" /></figure><ol><li>Once connected, you can navigate to the tools tab on this UI.</li><li>Click on list tools. You can see your functions exposed as tools using MCP server. You can validate the result published by your tool as done above for the add tool.</li></ol><p>Model Context Protocol Inspector is an efficient way to validate tools exposed on your MCP Server. Once validated on your local python environment on your own laptop, you can push these source code files ( maths.py and maths_server.py) on the cloud native Git repository and build the tool on your MCP server on cloud environment.</p><p>You can even dockerize the MCP Server tool and deploy it on Kubernetes.</p><p>In my next article, I will mention steps to dockerize your MCP Server.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=4b58cd4f116f" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[AI Governance]]></title>
            <link>https://kumarabhishek-ai.medium.com/ai-governance-81088b5b803d?source=rss-d416d37e43c6------2</link>
            <guid isPermaLink="false">https://medium.com/p/81088b5b803d</guid>
            <category><![CDATA[ai-governance-market]]></category>
            <category><![CDATA[ai-governance]]></category>
            <dc:creator><![CDATA[Kumar Abhishek]]></dc:creator>
            <pubDate>Wed, 27 Nov 2024 17:21:27 GMT</pubDate>
            <atom:updated>2024-11-27T19:16:46.810Z</atom:updated>
            <content:encoded><![CDATA[<p><strong>Why AI Governance ?</strong></p><p>There are various stakeholders involved in Ideation of AI based applications. All these stakeholders have their own area of concerns. Its important to address concerns from all stakeholders and measure it using different metrices. AI Governance is not taken care appropriately in organizations and hence causing problems related to control, monitor and audit mechanism of AI systems.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ONO_m3wTiBKo0grVPQZ7FA.png" /></figure><p>Any typical AI project has below steps and it is important to link every step with relevant goal of AI Governance from all stakeholder’s perspective :</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*itPCHYqVQYgTZ1amrQ8LIw.png" /></figure><p>AI Governance has been the key aspect for all organizations irrespective of their domain they are operating in.</p><p><strong>How to bring AI Governance — build culture :</strong></p><p>In order to achieve Enterprise level AI Governance, you need to foster a culture where everything and anything ( benefits , risks, metrices ) should be measurable, as far as applicable :</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*mzdNvKh6yfm4n0CvWOoSRA.png" /></figure><p><strong>Foundation </strong>— enterprises can have foundation based on any cloud platform or even at on-prem. In order to use LLM models to implement Generative AI solutions, AI foundation can be inclusive of Azure Open AI, AWS Bedrock or GCP Vertex AI based on the choice.</p><p><strong>AI Governance Platform — </strong>It is important for any enterprise to capture the metrics from their current AI based applications. There can be different KPIs related to measuring Return On Investment (ROI) from AI.</p><p><strong>Tools, accelerators , frameworks — </strong>tools can help accelerating delivering AI Systems. There are various frameworks , tools available facilitating AI applications development and operations support. Automation obviously plays a very vital part in achieving the accelerated “Time To Market”.</p><p><strong>Culture — </strong>culture plays an important part in achieving business goals in minimum span of time. Internal and External factors can create negative impacts on enterprise AI goals and appropriate culture can help reducing those impacts. A proper Culture also helps in reducing Cloud Infra cost and increasing overall efficiency.</p><p><strong>Operating Model — </strong>Any AI based application requires high performing Computes ( usually GPUs) , Storage and Data Trust. In modern era, there are ways to enhance operating model for AI based applications . Site Reliability Engineering ( SRE), AI/ML/LLM Model Monitoring, Cloud Infra Monitoring are important areas playing vital role in operating model. One of the goal of Operating Model is to reduce the overall Run Cost of the AI Applications at various stages of execution.</p><p><strong>Factors affecting AI Governance :</strong></p><ol><li><strong>Ethical Considerations</strong></li></ol><ul><li>Social impact of Gen AI (job displacement, societal disruptions)</li><li>Potential for manipulation and deception</li><li>Balancing innovation with ethical safeguards</li><li>Frameworks for ethical decision-making in the context of Gen AI Components helping AI Governance</li></ul><p><strong>2. AI Governance Frameworks</strong></p><ul><li>Global overview of AI regulations and emerging legal frameworks</li><li>Principles of responsible AI (transparency, fairness, accountability, privacy)</li><li>Designing AI governance structures within organizations</li><li>Best practices for AI development and risk assessment</li><li>Auditing and monitoring AI Systems</li></ul><p><strong>Components helping AI Governance :</strong></p><ol><li><strong>Visual dashboard</strong>: Use a dashboard that provides real-time updates on the health and status of AI systems, offering a clear overview for quick assessments.</li><li><strong>Health score metrics</strong>: Implement an overall health score for AI models by using intuitive and easy-to-understand metrics to simplify monitoring.</li><li><strong>Automated monitoring</strong>: Employ automatic detection systems for bias, drift, performance and anomalies to help ensure models function correctly and ethically.</li><li><strong>Performance alerts</strong>: Set up alerts for when a model deviates from its predefined performance parameters, enabling timely interventions.</li><li><strong>Custom metrics</strong>: Define custom metrics that align with the organization’s key performance indicators (KPIs) and thresholds to help ensure AI outcomes contribute to business objectives.</li><li><strong>Audit trails</strong>: Maintain easily accessible logs and audit trails for accountability and to facilitate reviews of AI systems’ decisions and behaviors.</li><li><strong>Open source tools compatibility</strong>: Choose <a href="https://www.ibm.com/topics/open-source">open source</a> tools compatible with various machine learning development platforms to benefit from the flexibility and community support.</li><li><strong>Seamless integration</strong>: Helps ensure that the AI Governance platform <a href="https://www.ibm.com/topics/application-integration">integrates</a> seamlessly with the existing infrastructure, including databases and software ecosystems, to avoid silos and enable efficient workflows.</li></ol><p><strong>The Future of Gen AI Governance</strong></p><ul><li>Evolving regulatory landscape and trends in AI policy</li><li>Emerging technologies for AI Explainability and Trust</li><li>Collaborative governance models and industry standards</li><li>The role of public engagement in shaping Gen AI governance</li></ul><p><strong>From Where to start with :</strong></p><p>1) <strong>Address Data Governance </strong>— ensure Data Governance framework is enabled in the organization.</p><p>2) <strong>Address</strong> <strong>Risk Management </strong>— ensure Risk Assessment is performed for all AI/ML models identifying risks involved with the models. Is you model predicting fair outcomes or is your model biased in producing prediction result for a certain scenario ? There should be a techno-business authority in the organization to address Model Risk Management (MRM) concerns identified from the business.</p><p><strong>3) Address Regulatory Compliances </strong>— Ensure reliable data, Scale effectively, Optimize resources, Prevent Data Downtime</p><p><strong>4) Conduct Ethical AI Design Workshops </strong>: Introduce ethical AI principles (transparency, fairness, accountability, privacy) through discussions and case studies. Participants design AI governance structures and present frameworks for feedback.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=81088b5b803d" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Multi-model deploy under single service endpoint]]></title>
            <link>https://kumarabhishek-ai.medium.com/multi-model-deploy-under-single-service-endpoint-cb02a0cc18d2?source=rss-d416d37e43c6------2</link>
            <guid isPermaLink="false">https://medium.com/p/cb02a0cc18d2</guid>
            <category><![CDATA[machine-learning-ai]]></category>
            <category><![CDATA[cloud-computing]]></category>
            <category><![CDATA[multi-model]]></category>
            <category><![CDATA[machine-learning]]></category>
            <dc:creator><![CDATA[Kumar Abhishek]]></dc:creator>
            <pubDate>Sat, 15 Oct 2022 05:43:55 GMT</pubDate>
            <atom:updated>2022-10-15T05:43:55.393Z</atom:updated>
            <content:encoded><![CDATA[<p>In scenarios where you you need to access corpus data while predicting against the user query, it becomes inevitable to define your corpus data as a model in the scoring method (run method under score.py).</p><p>Hence Corpus Data can be represented as a model itself. Use Corpus model as a separate model under score initialization. So ultimately, your score.py file would look like this:</p><pre><strong>from</strong> azureml.core.model <strong>import</strong> Model<br><br><strong>def</strong> init():<br>    <strong>global</strong> model_1, model_2<br>    <em># Here &quot;my_first_model&quot; is the name of the model registered under the workspace.</em><br>    <em># This call will return the path to the .pkl file on the local disk.</em><br>    model_1_path <strong>=</strong> Model<strong>.</strong>get_model_path(model_name<strong>=</strong>&#39;my_first_model&#39;)<br>    model_2_path <strong>=</strong> Model<strong>.</strong>get_model_path(model_name<strong>=</strong>&#39;my_corpus_data_model&#39;)<br>    <br>    <em># Deserialize the model files back into scikit-learn models.</em><br>    model_1 <strong>=</strong> joblib<strong>.</strong>load(model_1_path)<br>    model_2 <strong>=</strong> joblib<strong>.</strong>load(model_2_path)<br><br><br><strong>def</strong> run(raw_data):<br>    <strong>try</strong>:<br>        data <strong>=</strong> json<strong>.</strong>loads(raw_data)[&#39;data&#39;]<br>        data <strong>=</strong> np<strong>.</strong>array(data)<br>        <br>        <em># Call predict() on each model</em><br>        result_1 <strong>=</strong> model_1<strong>.</strong>predict(data)<br>        result_2 <strong>=</strong> model_2<strong>.</strong>predict(data)<br><br>        <em># You can return any JSON-serializable value.</em><br>        <strong>return</strong> {&quot;prediction1&quot;: result_1<strong>.</strong>tolist(), &quot;prediction2&quot;: result_2<strong>.</strong>tolist()}<br>    <strong>except</strong> Exception <strong>as</strong> e:<br>        result <strong>=</strong> str(e)<br>        <strong>return</strong> result</pre><p>Now, it is important to register both of your models as separate models:</p><pre><strong>from</strong> azureml.core.model <strong>import</strong> Model<br><br>my_model_1 <strong>=</strong> Model<strong>.</strong>register(model_path<strong>=</strong>&quot;first_model.pkl&quot;,<br>                            model_name<strong>=</strong>&quot;my_first_model&quot;,<br>                            workspace<strong>=</strong>ws)<br><br>my_model_2 <strong>=</strong> Model<strong>.</strong>register(model_path<strong>=</strong>&quot;corpus_model.pkl&quot;,<br>                            model_name<strong>=</strong>&quot;my_corpus_data_model&quot;,<br>                            workspace<strong>=</strong>ws)</pre><p>This pattern is mostly significant in Sentence Transformer models, where it is necessary to access corpus data while producing the prediction against the user query.</p><p>Other benefits:</p><ul><li>Multi-model endpoints provide a scalable and cost-effective solution to deploying large numbers of models.</li><li>Multi-model endpoints also enable time-sharing of memory resources across your models.</li><li>Multi-model endpoints also help in reducing Carbon Emission while model training.</li></ul><p>Hence it’s is win-win situation as far as sustainability inclusive solution is concerned.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=cb02a0cc18d2" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Delta Lake Architectural Case Study]]></title>
            <link>https://kumarabhishek-ai.medium.com/delta-lake-architectural-case-study-526fc0c0847c?source=rss-d416d37e43c6------2</link>
            <guid isPermaLink="false">https://medium.com/p/526fc0c0847c</guid>
            <category><![CDATA[delta-lake]]></category>
            <category><![CDATA[lambda-architecture]]></category>
            <category><![CDATA[cloud-computing]]></category>
            <dc:creator><![CDATA[Kumar Abhishek]]></dc:creator>
            <pubDate>Sat, 15 Oct 2022 04:59:04 GMT</pubDate>
            <atom:updated>2022-10-15T04:59:04.307Z</atom:updated>
            <content:encoded><![CDATA[<p>Problem Statement &amp; Solution:</p><p>Requirement is to accommodate data refinement in real time manner on top of existing Blob Storage layer reducing problems of Lambda Architecture. Refined data should be available to be used in dashboards / reports in real time manner.</p><p>Lambda Architecture has limitation to aggregate processing of big volume of batch and streaming data in order to create a real time visualization (dashboard / report).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*412LDg2cJaRJgiHF" /></figure><p>Real time Aggregation of dataset is quite cumbersome in Lambda Architecture.</p><p>Solution: Solution is to adopt vast improvement upon the traditional Lambda Architecture. At the same time help in automated solution to reduce data-duplication, cleansing etc..</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*elCsPghwnosAFCR2" /></figure><p>Flow is pretty much streamlined in Delta Lake and helps in aggregating batch as well as streaming data in more streamlined manner. It is easy to manage and can be pipelined in automated way.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=526fc0c0847c" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Running MLOps pipeline securely using Azure DevOps]]></title>
            <link>https://kumarabhishek-ai.medium.com/running-mlops-pipeline-securely-using-azure-devops-8368fe4b2943?source=rss-d416d37e43c6------2</link>
            <guid isPermaLink="false">https://medium.com/p/8368fe4b2943</guid>
            <category><![CDATA[mlops-solution]]></category>
            <category><![CDATA[mlops]]></category>
            <dc:creator><![CDATA[Kumar Abhishek]]></dc:creator>
            <pubDate>Thu, 29 Sep 2022 10:27:52 GMT</pubDate>
            <atom:updated>2022-09-29T10:27:52.016Z</atom:updated>
            <content:encoded><![CDATA[<p>Running MLOps pipeline securely using Azure DevOps</p><p>Sometimes Data Scientists use “Confidential” business datasets to perform ML experiments and ultimately train models as per the business problem statement. They have been asked to automate the whole process and create the MLOps pipeline, which runs in a highly secured environment (Managed System Identity) and automates consumption of “Confidential Dataset.”</p><p>Below is a typical MLOps (Machine Learning Ops) pipeline. Steps in this pipeline can be set up using a YML file and stored in a GIT repository.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/663/0*-3mQFvEpjegO_rnk.png" /></figure><p>Now, there is a defined configuration ,which you need to follow and execute to achieve MLOps pipeline running in Azure in the most secured way. Below are the steps performed on Azure from Infra and Azure DevOps perspective to create a ‘Managed System Identity’ (MSI) enabled MLOps pipeline:</p><h3>Infra Side</h3><ul><li>Create a Linux VM on Azure (usual Ubuntu 18.04, 20.04) to be used as your Azure DevOps build slave.</li><li>Enable System Assigned Managed Identity on Linux VM.</li><li>Login to your Linux VM and install Build Agent on the same (note: Create Personal Access Token [PAT ] in Azure DevOps and which will help to connect to your Azure DevOps Organization).</li></ul><p>Once your VM is provisioned on Azure and the necessary DevOps build agent is installed on it, you need to attach this Linux VM to the Azure Machine Learning Workspace so that ultimately when your MLOps pipeline runs, it can submit the experiment to run on Azure Machine Learning (AML) compute.</p><p><strong>In order to attach your Self-Hosted Linux VM with AML, navigate to your AML workspace -&gt; IAM -&gt; Create Role Assignment -&gt; Add Hostname of your Azure VM with ‘Contributor’ role.</strong></p><h3>DevOps Engineering</h3><p>Next, are steps from <strong>DevOps Engineering </strong>using Azure DevOps:</p><p>- Follow the below steps to set up Agent Pool in your <strong>Azure DevOps organization</strong>. Your Azure DevOps organization page url will be <a href="https://dev.azure.com/%3CYOUR_ORGANIZATION_NAME%3E">https://dev.azure.com/&lt;YOUR_ORGANIZATION_NAME&gt;</a>.</p><p>- Go to your Azure DevOps Organization page -&gt; Organization Settings -&gt; Agent pool -&gt; New Agent -&gt;. Enter the same Linux VM hostname, which you set up to be used as your Self-Hosted Agent.</p><p>- You have a VM and you need to add this VM to your Azure DevOps Agent Pool so that when the MLOps pipeline runs, it can execute all steps on this Self-Hosted Azure VM.</p><p>Please note that only the Azure DevOps Organization Admin can set up the Agent Pool. Also, make sure that your Self-Hosted VM is visible online in your Azure DevOps Agent Pool.</p><p>- Create Service Connection in Azure DevOps.</p><p>- Create Service Connection in Azure DevOps based on Managed Identity.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/751/0*ZcSfv2JPrPJOLqtn.png" /></figure><p>Your setup is complete now from Azure Infra and DevOps Admin perspective.</p><p>Now, you need to jump on creating your MLOps pipeline on Azure DevOps.</p><p>Create your YML based Pipeline file and make sure that Azure Subscription Name is the name of your Service Connection:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/523/0*Wfd6PlB3Te4UBfe9.png" /></figure><p>Once you follow all steps as mentioned above, you can see the final outcome as :</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/667/0*Qib-DHYCp8FJ8KFx.png" /></figure><p>Please note that the image above shows that the MLOps pipeline is running using System Assigned Managed Identity (MI) and running all your pipeline steps in a secured manner.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=8368fe4b2943" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[AI for Sustainability]]></title>
            <link>https://kumarabhishek-ai.medium.com/ai-for-sustainability-13cacd0405e1?source=rss-d416d37e43c6------2</link>
            <guid isPermaLink="false">https://medium.com/p/13cacd0405e1</guid>
            <dc:creator><![CDATA[Kumar Abhishek]]></dc:creator>
            <pubDate>Tue, 27 Sep 2022 10:58:03 GMT</pubDate>
            <atom:updated>2022-09-27T11:08:06.081Z</atom:updated>
            <content:encoded><![CDATA[<p>This is high time to consider Sustainability aspects while doing ML / Deep Learning models training / re-training / inferencing .</p><p>I urge data scientists and other Python developers to explore Code Carbon (<a href="https://codecarbon.io/">https://codecarbon.io/</a> ) to evaluate the sustainability aspects of your ML / Deep Learning model like:<br>1) what is the carbon volume (in Co2Eq) emitted by your ML model while doing training / re-training<br>2) what is the carbon volume (in Co2Eq) emitted by your ML model while training or deploying on a target like Kubernetes ?</p><p>CodeCarbon is helpful to evaluate volume of Co2 emission by any application deployed at On-premise datacenter or cloud.</p><p>You can also explore / identify your strategy to reduce Carbon Emission by my ML / Deep Learning model and apply them while doing ML model training / re-training / inferencing.</p><p>Hence, you need to evaluate your ML model or application performance not only for Non Functional Requirements coverage but you should also consider sustainability aspects of your ML model or application when deployed to on-premise datacenter or a public cloud.</p><p>Sample source code is available here: <a href="https://lnkd.in/d4CHmr7k">https://lnkd.in/d4CHmr7k</a></p><p>Code Carbon estimates the amount of carbon dioxide (CO2) produced by the cloud or personal computing resources used to execute the code.</p><p>Carbon dioxide (CO₂) emissions, expressed as kilograms of CO₂-equivalents [CO₂eq], are the products of two main factors :</p><p>C = Carbon Intensity of the electricity consumed for computation: quantified as kg of CO₂ emitted per kilowatt-hour of electricity<br>and<br>P = Power Consumed by the computational infrastructure: quantified as kilowatt-hours. Below shows the formula to calculate Power / Energy consumption by a compute resource:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/807/1*xostIvi0M7mpDal5jzULiQ.png" /></figure><p>Ultimately, Carbon dioxide emissions (CO₂eq) can then be calculated as C * P</p><p>It then shows developers how they can lessen emissions by optimizing their code or by hosting their cloud infrastructure in geographical regions that use renewable energy sources</p><p>You can also dashboard sustainability related reports using the CodeCarbon util.</p><p>Happy sustainability coding using CodeCarbon.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=13cacd0405e1" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Running secured MLOps pipeline in Azure DevOps]]></title>
            <link>https://kumarabhishek-ai.medium.com/running-secured-mlops-pipeline-in-azure-devops-f6a890cbecbf?source=rss-d416d37e43c6------2</link>
            <guid isPermaLink="false">https://medium.com/p/f6a890cbecbf</guid>
            <dc:creator><![CDATA[Kumar Abhishek]]></dc:creator>
            <pubDate>Tue, 27 Sep 2022 10:21:06 GMT</pubDate>
            <atom:updated>2022-09-27T10:21:06.491Z</atom:updated>
            <content:encoded><![CDATA[<p>Sometimes Data Scientists use “Confidential” business datasets to perform ML experiments and ultimately train models as per the business problem statement. They have been asked to automate the whole process and create the MLOps pipeline, which runs in a highly secured environment (Managed System Identity) and automates consumption of “Confidential Dataset.”</p><p>Below is a typical MLOps (Machine Learning Ops) pipeline. Steps in this pipeline can be set up using a YML file and stored in a GIT repository.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/663/0*qksLj-hJL3Bs4ncP.png" /></figure><p>Now, there is a defined configuration ,which you need to follow and execute to achieve MLOps pipeline running in Azure in the most secured way. Below are the steps performed on Azure from Infra and Azure DevOps perspective to create a ‘Managed System Identity’ (MSI) enabled MLOps pipeline:</p><h3>Infra Side</h3><ul><li>Create a Linux VM on Azure (usual Ubuntu 18.04, 20.04) to be used as your Azure DevOps build slave.</li><li>Enable System Assigned Managed Identity on Linux VM.</li><li>Login to your Linux VM and install Build Agent on the same (note: Create Personal Access Token [PAT ] in Azure DevOps and which will help to connect to your Azure DevOps Organization).</li></ul><p>Once your VM is provisioned on Azure and the necessary DevOps build agent is installed on it, you need to attach this Linux VM to the Azure Machine Learning Workspace so that ultimately when your MLOps pipeline runs, it can submit the experiment to run on Azure Machine Learning (AML) compute.</p><p><strong>In order to attach your Self-Hosted Linux VM with AML, navigate to your AML workspace -&gt; IAM -&gt; Create Role Assignment -&gt; Add Hostname of your Azure VM with ‘Contributor’ role.</strong></p><h3>DevOps Engineering</h3><p>Next, are steps from <strong>DevOps Engineering </strong>using Azure DevOps:</p><p>- Follow the below steps to set up Agent Pool in your <strong>Azure DevOps organization</strong>. Your Azure DevOps organization page url will be <a href="https://dev.azure.com/%3CYOUR_ORGANIZATION_NAME%3E">https://dev.azure.com/&lt;YOUR_ORGANIZATION_NAME&gt;</a>.</p><p>- Go to your Azure DevOps Organization page -&gt; Organization Settings -&gt; Agent pool -&gt; New Agent -&gt;. Enter the same Linux VM hostname, which you set up to be used as your Self-Hosted Agent.</p><p>- You have a VM and you need to add this VM to your Azure DevOps Agent Pool so that when the MLOps pipeline runs, it can execute all steps on this Self-Hosted Azure VM.</p><p>Please note that only the Azure DevOps Organization Admin can set up the Agent Pool. Also, make sure that your Self-Hosted VM is visible online in your Azure DevOps Agent Pool.</p><p>- Create Service Connection in Azure DevOps.</p><p>- Create Service Connection in Azure DevOps based on Managed Identity.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/751/0*8Ija49_OdyiQgq-C.png" /></figure><p>Your setup is complete now from Azure Infra and DevOps Admin perspective.</p><p>Now, you need to jump on creating your MLOps pipeline on Azure DevOps.</p><p>Create your YML based Pipeline file and make sure that Azure Subscription Name is the name of your Service Connection:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/523/0*YSGD85vjQEZY39JE.png" /></figure><p>Once you follow all steps as mentioned above, you can see the final outcome as :</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/667/0*N6QmFGFrGG_TSJCR.png" /></figure><p>Please note that the image above shows that the MLOps pipeline is running using System Assigned Managed Identity (MI) and running all your pipeline steps in a secured manner.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f6a890cbecbf" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>