<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Rafael Pierre</title>
    <description>The latest articles on DEV Community by Rafael Pierre (@rafaelpierre).</description>
    <link>https://dev.to/rafaelpierre</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F377445%2Fb697f789-73b2-44d6-aee7-cfe7d42b4fc5.jpeg</url>
      <title>DEV Community: Rafael Pierre</title>
      <link>https://dev.to/rafaelpierre</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/rafaelpierre"/>
    <language>en</language>
    <item>
      <title>AI Development Roundup: Plugin Distribution, Custom Chips, and Cinematic Video Control</title>
      <dc:creator>Rafael Pierre</dc:creator>
      <pubDate>Sun, 19 Oct 2025 13:33:46 +0000</pubDate>
      <link>https://dev.to/rafaelpierre/ai-development-roundup-plugin-distribution-custom-chips-and-cinematic-video-control-3bo5</link>
      <guid>https://dev.to/rafaelpierre/ai-development-roundup-plugin-distribution-custom-chips-and-cinematic-video-control-3bo5</guid>
      <description>&lt;p&gt;This week brought major updates across AI tooling, infrastructure, and creative capabilities, signaling shifts in how developers build and deploy AI systems.&lt;/p&gt;

&lt;h2&gt;
  
  
  Streamlined Plugin Distribution
&lt;/h2&gt;

&lt;p&gt;Anthropic launched Claude Code Plugins, enabling developers to package slash commands, subagents, MCP servers, and hooks into a single JSON file for marketplace distribution. The system eliminates the manual configuration process that previously required copying setups from GitHub repositories. Teams can now import standardized agent behaviors with one click, ensuring reproducible workflows across multiple development environments. Since these plugins are JSON-based, they remain portable across different CLI tools without vendor lock-in.&lt;/p&gt;

&lt;h2&gt;
  
  
  Custom Silicon Race Heats Up
&lt;/h2&gt;

&lt;p&gt;OpenAI announced a multi-year partnership with Broadcom to develop 10GW of custom AI accelerators. The chips, designed in-house by OpenAI and manufactured by Broadcom, will incorporate the company's Ethernet, PCIe, and optical connectivity technology. Initial deployment begins in late 2026, with full rollout targeted for end of 2029. This move diversifies OpenAI's compute infrastructure beyond existing partnerships with Nvidia and AMD, aiming to reduce supply chain dependencies and optimize performance specifically for OpenAI's models.&lt;/p&gt;

&lt;h2&gt;
  
  
  AI Video Gains Precision Camera Work
&lt;/h2&gt;

&lt;p&gt;Higgsfield AI released DoP I2V-01, a model that adds cinematic motion control to AI-generated video. The system converts single images into 3-5 second clips with over 50 camera style presets, including dolly shots, whip-pans, and bullet time effects. Beyond their web studio and mobile app Diffuse, Higgsfield now integrates with Kling, Google Veo, and Sora 2/Pro, allowing users to combine scene generation from other models with Higgsfield's camera choreography. Current limitations include a 5-second maximum clip length and 720p resolution cap.&lt;/p&gt;

&lt;h2&gt;
  
  
  Additional Developments
&lt;/h2&gt;

&lt;p&gt;Meta acquired Thinking Machines co-founder Andrew Tulloch for its Superintelligence Lab, reinforcing the company's $72B infrastructure investment this year. Meanwhile, content creators are adopting tools like Wisprflow to transform voice notes into publish-ready posts, streamlining the path from spoken ideas to written content through AI transcription and existing workflows.&lt;/p&gt;

&lt;h2&gt;
  
  
  Implications
&lt;/h2&gt;

&lt;p&gt;The convergence of easier plugin distribution, custom silicon development, and specialized creative tools suggests AI infrastructure is maturing rapidly. Developers gain more modular tooling, major players are hedging against supply constraints, and creative workflows are becoming increasingly automated. Teams should evaluate how these shifts affect their tech stack dependencies and content production pipelines.&lt;/p&gt;




&lt;p&gt;&lt;em&gt;This article was originally published on &lt;a href="https://lighthousenewsletter.com" rel="noopener noreferrer"&gt;Lighthouse Newsletter&lt;/a&gt;. Subscribe for weekly AI engineering and product updates.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>ai</category>
      <category>agents</category>
      <category>openai</category>
      <category>chatgpt</category>
    </item>
    <item>
      <title>AI Development Update: Skills, Security, and Parallel Workflows</title>
      <dc:creator>Rafael Pierre</dc:creator>
      <pubDate>Sun, 19 Oct 2025 13:31:32 +0000</pubDate>
      <link>https://dev.to/rafaelpierre/ai-development-update-skills-security-and-parallel-workflows-5a58</link>
      <guid>https://dev.to/rafaelpierre/ai-development-update-skills-security-and-parallel-workflows-5a58</guid>
      <description>&lt;p&gt;Three major developments are reshaping how teams build and deploy AI agents in production.&lt;/p&gt;

&lt;h2&gt;
  
  
  Modular Agent Intelligence
&lt;/h2&gt;

&lt;p&gt;Anthropic introduced Agent Skills, a framework for packaging procedural knowledge into discoverable modules. Instead of overloading system prompts or maintaining separate agents for each workflow, Skills let Claude load instructions contextually through SKILL.md files. The system supports progressive disclosure - starting with metadata, expanding to full instructions when needed, and bundling executable code for deterministic operations. This approach works across Claude.ai, Claude Code, and the API, turning specialized knowledge into portable, composable assets.&lt;/p&gt;

&lt;h2&gt;
  
  
  Persistent Security Threats
&lt;/h2&gt;

&lt;p&gt;Security researchers have identified memory poisoning and goal hijacking as emerging threats to agentic systems. Unlike single-shot prompt injections, these attacks exploit persistence. Memory poisoning involves injecting malicious content into an agent's long-term storage (vector databases, conversation logs), causing every future session to recall corrupted data. Goal hijacks gradually redirect an agent's objectives toward an attacker's agenda. Both attacks unfold across workflows rather than surfacing in isolated responses, requiring teams to treat memory as untrusted input and monitor complete task flows.&lt;/p&gt;

&lt;h2&gt;
  
  
  Parallelized Development Workflows
&lt;/h2&gt;

&lt;p&gt;At DevDay 2025, OpenAI demonstrated Codex handling multiple simultaneous development tasks - seven parallel terminal sessions building arcade games, porting Streamlit apps to FastAPI + Next.js, and generating MCP servers for legacy protocols. The key pattern was delegation at scale: teams launched 3-4 independent jobs, context-switched freely, and reviewed results asynchronously. This approach compressed timelines by treating agentic tools as parallel collaborators rather than sequential assistants.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Bottom Line
&lt;/h2&gt;

&lt;p&gt;Production AI is becoming simultaneously more modular, more vulnerable, and more capable of parallel execution. Teams shipping agents should modularize workflows, red-team memory stores proactively, and experiment with parallel task delegation for multi-workstream projects. The infrastructure exists - the challenge is building for both velocity and durability.&lt;/p&gt;




&lt;p&gt;&lt;em&gt;This article was originally published on &lt;a href="https://lighthousenewsletter.com/blog/skills-poisoned-memory-seven-terminals" rel="noopener noreferrer"&gt;Lighthouse Newsletter&lt;/a&gt;. Subscribe for weekly AI insights and development updates.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>ai</category>
      <category>agents</category>
      <category>openai</category>
      <category>chatgpt</category>
    </item>
    <item>
      <title>Surviving the LLM Jungle: When to use Prompt Engineering, Retrieval Augmented Generation or Fine Tuning?</title>
      <dc:creator>Rafael Pierre</dc:creator>
      <pubDate>Mon, 25 Sep 2023 18:28:24 +0000</pubDate>
      <link>https://dev.to/rafaelpierre/surviving-the-llm-jungle-when-to-use-prompt-engineering-retrieval-augmented-generation-or-fine-tuning-4j9m</link>
      <guid>https://dev.to/rafaelpierre/surviving-the-llm-jungle-when-to-use-prompt-engineering-retrieval-augmented-generation-or-fine-tuning-4j9m</guid>
      <description>&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fjvb8291nqf4jko9v3eqr.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fjvb8291nqf4jko9v3eqr.jpg" alt=" " width="640" height="427"&gt;&lt;/a&gt;&lt;/p&gt;



&lt;h1&gt;
  
  
  Introduction
&lt;/h1&gt;

&lt;p&gt;Navigating the complex world of &lt;strong&gt;Large Language Models (LLMs)&lt;/strong&gt; utilization can sometimes feel like wandering through an uncharted jungle. With a myriad of techniques at your disposal, choosing the right path can be daunting. In this blog, we explore three key strategies for harnessing the power of LLMs: &lt;strong&gt;Prompt Engineering, Retrieval Augmented Generation, and Fine Tuning&lt;/strong&gt;. By the end of this article, you'll have a clearer understanding of when and how to employ these techniques to achieve your &lt;strong&gt;Generative AI&lt;/strong&gt; goals.&lt;/p&gt;

&lt;h2&gt;
  
  
  Prompt Engineering: Crafting the Right Query
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fk89rwkqunopr6o4ti3te.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fk89rwkqunopr6o4ti3te.jpeg" alt=" " width="800" height="531"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Prompt engineering&lt;/strong&gt; is a technique used in the context of &lt;strong&gt;Large Language Models (LLMs)&lt;/strong&gt; to &lt;strong&gt;design&lt;/strong&gt; and &lt;strong&gt;craft&lt;/strong&gt; effective prompts or input queries. The goal of prompt engineering is to &lt;strong&gt;optimize&lt;/strong&gt; the input provided to the model to achieve desired outcomes, &lt;strong&gt;improve&lt;/strong&gt; model performance, and guide the model to produce &lt;strong&gt;more accurate&lt;/strong&gt; or &lt;strong&gt;contextually relevant&lt;/strong&gt; responses.&lt;/p&gt;

&lt;p&gt;Imagine the process of interacting with an &lt;strong&gt;LLM&lt;/strong&gt; as a conversation between you and a highly knowledgeable but somewhat &lt;strong&gt;literal-minded expert&lt;/strong&gt;. In this scenario, &lt;strong&gt;prompt engineering&lt;/strong&gt; is akin to &lt;strong&gt;formulating the right question&lt;/strong&gt;. This technique involves designing precise and effective prompts to elicit the desired responses from the model.&lt;/p&gt;

&lt;p&gt;For example, if you want to generate a creative piece of writing, your prompt should be &lt;strong&gt;open-ended&lt;/strong&gt; and &lt;strong&gt;encourage creativity&lt;/strong&gt;. Conversely, if you seek specific factual information, your prompt should be &lt;strong&gt;clear&lt;/strong&gt; and &lt;strong&gt;structured&lt;/strong&gt;. Effective prompt engineering not only requires an understanding of your task but also a grasp of how language models interpret and respond to prompts.&lt;/p&gt;

&lt;h2&gt;
  
  
  When to Use Prompt Engineering
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;When you need &lt;strong&gt;fine-grained control over the output&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;When generating &lt;strong&gt;specific&lt;/strong&gt;, &lt;strong&gt;structured content&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;When exploring &lt;strong&gt;creative possibilities&lt;/strong&gt; by carefully designing prompts.&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  Prompt Engineering: Key Aspects and Considerations
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Task Definition&lt;/strong&gt;: Here, you define a specific task or question you want the LLM to perform. This task could be anything from &lt;strong&gt;language translation&lt;/strong&gt; and &lt;strong&gt;text summarization&lt;/strong&gt; to &lt;strong&gt;question answering&lt;/strong&gt; or even more specialized tasks like &lt;strong&gt;image captioning&lt;/strong&gt; (although LLMs are primarily text-based).&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Prompt or Query&lt;/strong&gt;: You then formulate a prompt or query for the model that specifies the task. The prompt serves as the input to the model.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Inference&lt;/strong&gt;: The LLM processes the prompt and generates an output based on the provided examples and task description. It leverages its pre-trained language understanding capabilities and generalizes from the limited examples to produce a response.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Evaluation&lt;/strong&gt;: You evaluate the model's output to determine if it successfully performed the task according to your requirements.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Example
&lt;/h3&gt;

&lt;h4&gt;
  
  
  Text Generation Without Prompt Engineering
&lt;/h4&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Prompt: "Write a product description for the new smartphone."
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;In this case, the prompt is relatively &lt;strong&gt;vague&lt;/strong&gt;, and the LLM might generate a &lt;strong&gt;generic&lt;/strong&gt; or &lt;strong&gt;less informative&lt;/strong&gt; response because it lacks specific details about the smartphone.&lt;/p&gt;

&lt;h4&gt;
  
  
  Text Generation With Prompt Engineering
&lt;/h4&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Prompt: "Write a compelling product description for the new XYZ Phone, highlighting its key features such as the 6.5-inch AMOLED display, Snapdragon 855 processor, dual-camera setup for stunning photography, and long-lasting battery life of up to 2 days."
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;In this engineered prompt:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;The model is &lt;strong&gt;explicitly instructed&lt;/strong&gt; to write a &lt;em&gt;compelling product description&lt;/em&gt; with a clear task.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Specific details&lt;/strong&gt; about the smartphone are provided, such as the &lt;strong&gt;display size, processor, camera features, and battery life&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;By mentioning &lt;em&gt;compelling&lt;/em&gt;, you convey the expectation of &lt;strong&gt;persuasive&lt;/strong&gt; and &lt;strong&gt;engaging&lt;/strong&gt; language.&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  Retrieval Augmented Generation: Expanding the Horizon
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fnzzxwnoc1erotyl57qym.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fnzzxwnoc1erotyl57qym.jpg" alt=" " width="640" height="427"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;br&gt;&lt;br&gt;
&lt;strong&gt;Retrieval augmented generation (RAG)&lt;/strong&gt; is a technique that combines the strengths of &lt;strong&gt;large language models&lt;/strong&gt; with &lt;strong&gt;external knowledge sources&lt;/strong&gt;. It involves retrieving relevant information from a vast corpus of data and then using it to enhance the generation capabilities of the LLM. This approach can lead to &lt;strong&gt;more accurate and contextually rich responses&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;For instance, when generating medical advice, you can retrieve the latest research papers and clinical guidelines to ensure that the information provided is up-to-date and evidence-based. This strategy allows LLMs to function as &lt;strong&gt;dynamic encyclopedias&lt;/strong&gt;, offering &lt;strong&gt;insights&lt;/strong&gt; and &lt;strong&gt;recommendations&lt;/strong&gt; grounded in &lt;strong&gt;real-world data&lt;/strong&gt;.&lt;/p&gt;

&lt;h3&gt;
  
  
  When to Use Retrieval Augmented Generation
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;When your task requires access to &lt;strong&gt;external knowledge&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;When you need to provide &lt;strong&gt;accurate&lt;/strong&gt; and &lt;strong&gt;current information&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;When you want to enhance the &lt;strong&gt;contextuality&lt;/strong&gt; of generated content.&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  Fine Tuning: Tailoring the Model to Your Needs
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fdzqi7o3msrp2zyqjqef9.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fdzqi7o3msrp2zyqjqef9.jpg" alt=" " width="640" height="426"&gt;&lt;/a&gt;&lt;br&gt;
&lt;br&gt;&lt;br&gt;
&lt;strong&gt;Fine tuning&lt;/strong&gt; involves training a pre-trained LLM on a specific dataset or task to adapt it to your unique requirements. This technique allows you to specialize a &lt;strong&gt;general-purpose large language model&lt;/strong&gt; for a particular domain, making it more efficient and proficient in a specific area.&lt;/p&gt;

&lt;p&gt;For example, if you are building a &lt;strong&gt;chatbot for customer support&lt;/strong&gt; in the &lt;strong&gt;fashion industry&lt;/strong&gt;, &lt;strong&gt;fine tuning&lt;/strong&gt; can help the model understand and respond to &lt;strong&gt;fashion-related&lt;/strong&gt; queries with greater accuracy. It &lt;strong&gt;refines&lt;/strong&gt; the model's knowledge and behavior to align with the nuances of the domain in question.&lt;/p&gt;

&lt;h3&gt;
  
  
  When to Use Fine Tuning
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;When you have access to &lt;strong&gt;domain-specific data&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;When you want the model to &lt;strong&gt;excel in a particular field&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;When you need to &lt;strong&gt;optimize&lt;/strong&gt; the model's performance for a &lt;strong&gt;specific task&lt;/strong&gt;.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Conclusion
&lt;/h3&gt;

&lt;p&gt;In the vast LLM jungle, understanding when to use &lt;strong&gt;prompt engineering, retrieval augmented generation, or fine tuning&lt;/strong&gt; is crucial for achieving your goals. These techniques offer versatile tools for tailoring &lt;strong&gt;large language models&lt;/strong&gt; to your specific needs, whether you require &lt;strong&gt;precise responses, access to external knowledge, or domain expertise&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Remember: the choice between these techniques often depends on the unique demands of your project. Each of these approaches has distinct requirements - in terms of volume and quality of data, as well as costs - and also particular advantages and caveats. But that is the topic for another post.&lt;/p&gt;

</description>
      <category>llm</category>
      <category>promptengineering</category>
      <category>chatgpt</category>
      <category>beginners</category>
    </item>
    <item>
      <title>PyJaws: A Pythonic Way to Define Databricks Jobs and Workflows</title>
      <dc:creator>Rafael Pierre</dc:creator>
      <pubDate>Fri, 12 May 2023 13:01:40 +0000</pubDate>
      <link>https://dev.to/rafaelpierre/pyjaws-a-pythonic-way-to-define-databricks-jobs-and-workflows-2e9n</link>
      <guid>https://dev.to/rafaelpierre/pyjaws-a-pythonic-way-to-define-databricks-jobs-and-workflows-2e9n</guid>
      <description>&lt;p&gt;&lt;strong&gt;PyJaws&lt;/strong&gt; enables declaring &lt;a href="https://docs.databricks.com/workflows/index.html" rel="noopener noreferrer"&gt;Databricks Jobs and Workflows&lt;/a&gt; as Python code, allowing for:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Code Linting (e.g. with &lt;a href="https://flake8.pycqa.org/en/latest/" rel="noopener noreferrer"&gt;Flake&lt;/a&gt; or &lt;a href="https://beta.ruff.rs/docs/" rel="noopener noreferrer"&gt;Ruff&lt;/a&gt;)&lt;/li&gt;
&lt;li&gt;Formatting (e.g. with &lt;a href="https://github.com/psf/black" rel="noopener noreferrer"&gt;Black&lt;/a&gt;)&lt;/li&gt;
&lt;li&gt;Parameter Validation&lt;/li&gt;
&lt;li&gt;Modularity and reusability&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;In addition to those, &lt;strong&gt;PyJaws&lt;/strong&gt; also provides some nice features such as &lt;strong&gt;cycle detection&lt;/strong&gt; out of the box.&lt;/p&gt;

&lt;p&gt;Folks who have used Python-based orchestration tools such as &lt;a href="https://airflow.apache.org/" rel="noopener noreferrer"&gt;Apache Airflow&lt;/a&gt;, &lt;a href="https://luigi.readthedocs.io/en/stable/" rel="noopener noreferrer"&gt;Luigi&lt;/a&gt; and &lt;a href="https://www.mage.ai/" rel="noopener noreferrer"&gt;Mage&lt;/a&gt; will be familiar with the concepts and the API if PyJaws.&lt;/p&gt;

&lt;p&gt;PyJaws leverages some existing libraries in order to allow for modularisation, reusability and validation, such as:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Click - for providing a rich CLI functionality&lt;/li&gt;
&lt;li&gt;Pydantic - for efficient parameter validation&lt;/li&gt;
&lt;li&gt;NetworkX - for Graph and Cycle Detection features&lt;/li&gt;
&lt;li&gt;Jinja2 - for templating&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Check it out: &lt;a href="https://github.com/rafaelpierre/pyjaws" rel="noopener noreferrer"&gt;https://github.com/rafaelpierre/pyjaws&lt;/a&gt;&lt;/p&gt;

</description>
      <category>spark</category>
      <category>dataengineering</category>
      <category>airflow</category>
      <category>orchestration</category>
    </item>
    <item>
      <title>Keeping Your Machine Learning Models on the Right Track: Getting Started with MLflow, Part 2</title>
      <dc:creator>Rafael Pierre</dc:creator>
      <pubDate>Thu, 21 Jul 2022 09:24:48 +0000</pubDate>
      <link>https://dev.to/rafaelpierre/keeping-your-machine-learning-models-on-the-right-track-getting-started-with-mlflow-part-2-451k</link>
      <guid>https://dev.to/rafaelpierre/keeping-your-machine-learning-models-on-the-right-track-getting-started-with-mlflow-part-2-451k</guid>
      <description>&lt;p&gt;This post was &lt;a href="https://mlopshowto.com/keeping-your-machine-learning-models-on-the-right-track-getting-started-with-mlflow-part-2-bbc980a1f8dc" rel="noopener noreferrer"&gt;originally published&lt;/a&gt; at &lt;a href="https://mlopshowto.com" rel="noopener noreferrer"&gt;MLOpsHowTo.com&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;TLDR;&lt;/strong&gt; &lt;em&gt;MLflow Model Registry allows you to keep track of different Machine Learning models and their versions, as well as tracking their changes, stages and artifacts. Companion Github Repo for this post&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://mlopshowto.com/keeping-your-machine-learning-models-on-the-right-track-getting-started-with-mlflow-part-1-f8ca857b5971" rel="noopener noreferrer"&gt;In our last post&lt;/a&gt;, we discussed the importance of &lt;strong&gt;tracking Machine Learning experiments, metrics and parameters&lt;/strong&gt;. We also showed how easy it is to get started in these topics by leveraging the power of MLflow (for those who are not aware, &lt;a href="https://mlflow.org/" rel="noopener noreferrer"&gt;MLflow&lt;/a&gt; is currently the de-facto standard platform for machine learning experiment and model management).&lt;/p&gt;

&lt;p&gt;In particular, &lt;strong&gt;Databricks&lt;/strong&gt; makes it even easier to leverage MLflow, since it provides you with a completely managed version of the platform.&lt;/p&gt;

&lt;p&gt;This means you don’t need to worry about the underlying infrastructure to run MLflow, and it is completely integrated with other Machine Learning features from Databricks Workspaces, such as &lt;strong&gt;Feature Store, AutoML&lt;/strong&gt; and many others.&lt;/p&gt;

&lt;p&gt;Coming back to our experiment and model management discussion, although we covered the experiment part in the last post, we still haven’t discussed how to manage the models that we obtain as part of running our experiments. This is where MLflow Model Registry comes in.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Case for Model Registry
&lt;/h2&gt;

&lt;p&gt;As the processes to &lt;strong&gt;create, manage and deploy machine learning models&lt;/strong&gt; evolve, organizations need to have a central platform that allows different personas such as data scientists and machine learning engineers to collaborate, share code, artifacts and control the stages of machine learning models. Breaking this down in terms of functional requirements, we are talking about the following desired capabilities:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;discovering&lt;/strong&gt; models, visualizing experiment runs and the code associated with models&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;transitioning&lt;/strong&gt; models across different deployment stages, such as Staging, Production and Archived&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;deploying&lt;/strong&gt; different versions of a registered model in different stages, offering Machine Learning engineers and MLOps engineers the ability to deploy and conduct testing of different model versions (for instance, A/B testing, Multi-Armed Bandits etc)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;archiving&lt;/strong&gt; older models for traceability and compliance purposes&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;enriching&lt;/strong&gt; model metadata with textual descriptions and tags&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;managing&lt;/strong&gt; authorization and governance for model transitions and modifications with access control lists (ACLs)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fds70co20k5km3beekyx0.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fds70co20k5km3beekyx0.jpg" alt=" " width="800" height="420"&gt;&lt;/a&gt;&lt;br&gt;
A typical MLOps Model Lifecycle using MLflow&lt;/p&gt;

&lt;h2&gt;
  
  
  Getting Started with MLflow Model Registry
&lt;/h2&gt;

&lt;p&gt;Now to the practical part. We will run some code to train a model and showcase MLflow Model Registry capabilities. Hereby we present two possible options for running the notebooks from this quickstarter: you can choose to run them on Jupyter Notebooks with a local MLflow instance, or in a Databricks workspace.&lt;/p&gt;

&lt;h3&gt;
  
  
  Jupyter Notebooks
&lt;/h3&gt;

&lt;p&gt;If you want to run these examples using Jupyter Notebooks, please follow these steps:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Clone this Github repo to your local machine&lt;/li&gt;
&lt;li&gt;Make sure you are running Python 3.8.7 (quick hint: you can run multiple Python versions on a single machine by installing pyenv)&lt;/li&gt;
&lt;li&gt;Once you have a working Python 3.8.7 installation, create a virtual environment by running python -m venv .venv&lt;/li&gt;
&lt;li&gt;Configure your virtual environment by running make env. Alternatively, you can do it manually by running the following from the terminal:
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;export SYSTEM_VERSION_COMPAT=1 &amp;amp;&amp;amp; \
source .venv/bin/activate &amp;amp;&amp;amp; \
pip install --upgrade pip &amp;amp;&amp;amp; \
pip install wheel &amp;amp;&amp;amp; \
pip install -r requirements.txt &amp;amp;&amp;amp; \
pre-commit install
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;Run the first notebook jupyter/01_train_model.ipynb. This will create an experiment and multiple runs with different hyperparameters for a diabetes prediction model.&lt;/li&gt;
&lt;li&gt;Run the second notebook jupyter/02_register_model.ipynb. By doing so, we will register our model artifact into MLflow model registry. We will also do some basic sanity checks in order to confirm that our model can be promoted to Staging.&lt;/li&gt;
&lt;li&gt;For this example we are running a simple, local instance of MLflow with a SQLite backend — which is good enough for a toy example, but not recommended for a test or production setup. It is also possible to run MLflow locally or remotely as a standalone web application, and also with a Postgresql backend. For more details on how to achieve this, please refer to the different scenarios presented in this link.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Databricks
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Running the same code with Databricks Managed MLflow is even simpler, since the environment is already configured when you use an LTS ML cluster. Please make sure that you have such a cluster available, and then clone the repo into your workspace. For more details on Databricks integration with repos, please refer to this article.&lt;/li&gt;
&lt;li&gt;Run the first notebook &lt;code&gt;databricks/01_train_model.py&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;Run the second notebook &lt;code&gt;databricks/02_register_model.py&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;Bonus: if you run these notebooks on a Databricks Workspace, you will be able to visualize the different runs associated with your experiment:&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Experiments, runs and models
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fo38bol62733gz2j3b658.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fo38bol62733gz2j3b658.png" alt=" " width="800" height="338"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Looking at the screenshot above, you might notice that on the first row of our table, in the models column, we have an icon which differs from the other rows. This is due to the fact that the model artifact for that specific run was registered as a model, and a new model version was created (version 1). &lt;/p&gt;

&lt;p&gt;If we click on its link, we get redirected to the following window.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Frbvkhdg5i22e8800gboz.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Frbvkhdg5i22e8800gboz.png" alt=" " width="800" height="442"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;On the window above, we have an overview of the model version that was registered. We can see that it has the tag prediction_works = true. We can also see that it is in Staging. Depending on which persona is accessing this data, it might be possible to manually change the stage (to promote the model to Production, for instance), or reverting it back to None.&lt;/p&gt;

&lt;p&gt;Moreover, with Workspace Object Access Control Lists, you could limit the permissions for each type of user. Let’s say that you wish to block data scientists from transitioning model stages, while you want to allow team manager to do so. In such scenario, Data Scientists would have to request transitions to a given stage.&lt;/p&gt;

&lt;p&gt;These transitions would then need to be approved by someone with the right permissions. Finally, all of the requests and model stage transitions are tracked in the same window (and of course, they are also available programatically).&lt;/p&gt;

&lt;p&gt;Once a model has been transitioned to Production, it is quite simple to deploy it either as an automated job or as a Real time REST API Endpoint. But that is the topic for another post.&lt;/p&gt;

&lt;p&gt;All the code used in this post is available in &lt;a href="https://github.com/rafaelvp-db/mlflow-getting-started" rel="noopener noreferrer"&gt;this Github Repo&lt;/a&gt;.&lt;/p&gt;

</description>
      <category>machinelearning</category>
      <category>mlops</category>
      <category>datascience</category>
    </item>
  </channel>
</rss>
