<?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 Jeff Kayne on Medium]]></title>
        <description><![CDATA[Stories by Jeff Kayne on Medium]]></description>
        <link>https://medium.com/@jeffkayne94?source=rss-e3aac8bb31b9------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*JAhnqh-3swM3nACshXaPMA.jpeg</url>
            <title>Stories by Jeff Kayne on Medium</title>
            <link>https://medium.com/@jeffkayne94?source=rss-e3aac8bb31b9------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 05 Dec 2026 20:00:13 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@jeffkayne94/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[Collecting user feedback on ML in Streamlit]]></title>
            <link>https://blog.streamlit.io/collecting-user-feedback-on-ml-in-streamlit-d27b0a42cf48?source=rss-e3aac8bb31b9------2</link>
            <guid isPermaLink="false">https://medium.com/p/d27b0a42cf48</guid>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[mlops]]></category>
            <category><![CDATA[streamlit]]></category>
            <category><![CDATA[user-feedback]]></category>
            <category><![CDATA[feedback]]></category>
            <dc:creator><![CDATA[Jeff Kayne]]></dc:creator>
            <pubDate>Thu, 04 May 2023 17:04:54 GMT</pubDate>
            <atom:updated>2023-05-04T17:04:54.683Z</atom:updated>
            <content:encoded><![CDATA[<h4>Improve user engagement and model quality with the new Trubrics feedback component</h4><figure><img alt="trubrics user feedback component" src="https://cdn-images-1.medium.com/max/1024/1*JkRRdNW0GO13qp3r16MS0g.jpeg" /></figure><p>Hey, community! 👋</p><p>I&#39;m Jeff, co-founder of <a href="https://trubrics.com/">Trubrics</a>. We build tools to help data scientists collect user feedback on machine learning (ML). We&#39;ve developed a new component that enables you to do just that with a few lines of code in your Streamlit app!</p><p>Why collect user feedback on ML?</p><ol><li><strong>Improving model performance.</strong> User feedback provides insights into the strengths and weaknesses of the model from the user&#39;s perspective. This information enables fixes and fine-tuning of the ML model, ultimately improving its performance.</li><li><strong>Enhancing user experience.</strong> User feedback can help identify user preferences and pain points. This information can be used to design better user interfaces, improve model usability, and ultimately enhance the user experience.</li><li><strong>Increasing user engagement.</strong> Collecting user feedback shows that you care about your users&#39; opinions and are committed to providing the best possible experience. This can increase user engagement, satisfaction, adoption, and loyalty.</li><li><strong>Growing responsibility of the ML group.</strong> Adding diversity and cross-functional teams to the ML review process helps us strive towards building #responsibleAI and #ethicalAI.</li><li><strong>Continuous model improvement and monitoring.</strong> Collecting user feedback in production can help you improve your ML model by incorporating bug fixes, user needs, and preferences.</li></ol><p>In this post, you&#39;ll learn:</p><ul><li>How to pip install the FeedbackCollector from the <a href="https://github.com/trubrics/trubrics-sdk/">trubrics-sdk</a></li><li>How to get started with just 3 lines of code [Beginner]</li><li>How to collect complex feedback [Advanced]</li><li>How to manage your feedback in the Trubrics platform [Optional]</li></ul><p>👉 Can&#39;t wait to try it? Here are the links to our <a href="https://trubrics-titanic-example.streamlit.app/">demo app</a>, <a href="https://github.com/trubrics/trubrics-sdk/">repo</a>, and <a href="https://trubrics.github.io/trubrics-sdk/streamlit/">docs</a>.</p><h3>How to pip install the FeedbackCollector from the <a href="https://github.com/trubrics/trubrics-sdk/">trubrics-sdk</a></h3><p>Trubrics embeds some Streamlit components, so you&#39;ll need to install both libraries:</p><pre>pip install &quot;trubrics[streamlit]&quot;</pre><p>By the way, Trubrics is tested for Python versions 3.7, 3.8, and 3.9.</p><h3>How to get started with just 3 lines of code [Beginner]</h3><p>Add these three lines of code to your Streamlit app/a blank Python script (if you&#39;re just getting started):</p><pre>from trubrics.integrations.streamlit import FeedbackCollector<br><br>collector = FeedbackCollector()<br>collector.st_feedback(feedback_type=&quot;issue&quot;)</pre><p>What&#39;s going on here? Let&#39;s break it down:</p><ol><li>The <a href="https://trubrics.github.io/trubrics-sdk/streamlit/#feedbackcollector">FeedbackCollector</a> object provides feedback functionality and static metadata about your app (e.g., model version). Create an instance of this object once at the top of your app.</li><li>The <a href="https://trubrics.github.io/trubrics-sdk/streamlit/#st_feedback">st_feedback()</a> method allows you to embed feedback components in your app and save different types of feedback to .json files. Use multiple instances of this method to add different feedback collection points around your app.</li></ol><p>Now you can launch your app with streamlit run basic_app.py !</p><p>You&#39;ll see a feedback component in your app that will let you start collecting <em>qualitative</em> <em>feedback</em> from your users:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*E-soIZ0S2lA4Q5ee" /></figure><p>Try other types of <em>quantitative feedback</em> collection, such as:</p><pre>collector.st_feedback(feedback_type=&quot;faces&quot;)</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*rHlz9Xb7gpU3ydpH" /></figure><pre>feedback = collector.st_feedback(<br>	feedback_type=&quot;thumbs&quot;,<br>	path=&quot;thumbs_feedback.json&quot;<br>)<br><br># print out the feedback object as a dictionary in your app<br>feedback.dict() if feedback else None</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*19ICKwXJ0zja9XAc" /></figure><p>The st_feedback() method returns a feedback object that can be manipulated (in this case, we&#39;re printing it out in the app). And it saves a feedback .json to a specified path, such as path=&quot;thumbs_feedback.json&quot;. To save multiple files, use a dynamic path, such as path=f&quot;thumbs_{timestamp}.json&quot; with a time stamp.</p><p>To learn more about the different feedback types and their available options, read our <a href="https://trubrics.github.io/trubrics-sdk/streamlit/#feedback-types">docs</a>.</p><h3>How to collect complex feedback [Advanced]</h3><p>You can use the Trubrics FeedbackCollector to collect more complex feedback with type=&quot;custom&quot;. This is super useful for collecting forms or survey responses with multiple questions:</p><pre>import streamlit as st<br>from trubrics.integrations.streamlit import FeedbackCollector<br>collector = FeedbackCollector()<br>q1 = st.text_input(&quot;Q 1&quot;)<br>q2 = st.text_input(&quot;Q 2&quot;)<br>q3 = st.text_input(&quot;Q 3&quot;)<br>if q1 and q2 and q3:<br>    button = st.button(label=&quot;submit&quot;)<br>    if button:<br>        feedback = collector.st_feedback(<br>            &quot;custom&quot;,<br>            user_response={<br>                &quot;Q 1&quot;: q1,<br>                &quot;Q 2&quot;: q2,<br>                &quot;Q 3&quot;: q3,<br>            },<br>            path=&quot;./feedback.json&quot;,<br>        )<br>        feedback.dict() if feedback else None</pre><p>This lets you use any Streamlit components to create the feedback form of your choice.</p><p>👉 TIP: For creating more robust forms in Streamlit, check out <a href="https://docs.streamlit.io/library/api-reference/control-flow/st.form">st.form</a>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*8etqZmPl1JWgictQ" /></figure><p>You can use Trubrics&#39; &quot;faces&quot; and &quot;thumbs&quot; feedback UI components in your custom feedback forms, as shown <a href="https://trubrics.github.io/trubrics-sdk/streamlit/#trubrics-ui-components">here</a>.</p><h3>How to manage your feedback in the Trubrics platform [Optional]</h3><p>To manage and collaborate on feedback issues more effectively, we offer functionality that enables you to save feedback directly to our platform from your Streamlit app. This also allows users to authenticate within the apps and track who has recorded what feedback:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*-6ybLUfjTOkgRG-l" /></figure><h3>Wrapping up</h3><p>Thank you for reading our story. We hope that you&#39;re now armed and ready to start collecting feedback on your ML projects. Please try out our component and let us know any feedback. And if you have any questions or ideas, we&#39;d be very happy to hear from you! Drop us a message in the comments below, or contact us on <a href="https://github.com/trubrics/trubrics-sdk/issues">GitHub,</a> <a href="https://www.linkedin.com/in/jeffrey-kayne/">LinkedIn</a>, or via <a href="/service/mailto:jeff.kayne@trubrics.com">email</a>.</p><p>Happy Streamlit-ing! 🎈</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Ftrubrics-titanic-example.streamlit.app%2F%3Fembed%3Dtrue&amp;display_name=Streamlit&amp;url=https%3A%2F%2Ftrubrics-titanic-example.streamlit.app&amp;image=https%3A%2F%2Fstorage.googleapis.com%2Fs4a-prod-share-preview%2Fdefault%2Fst_app_screenshot_image%2Fdb03df35-6325-4d13-8fff-fcff968fa0f4%2FHome_Page.png&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=streamlit" width="560" height="630" frameborder="0" scrolling="no"><a href="https://medium.com/media/f77634472318345b5cb253f74c2bef91/href">https://medium.com/media/f77634472318345b5cb253f74c2bef91/href</a></iframe><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d27b0a42cf48" width="1" height="1" alt=""><hr><p><a href="https://blog.streamlit.io/collecting-user-feedback-on-ml-in-streamlit-d27b0a42cf48">Collecting user feedback on ML in Streamlit</a> was originally published in <a href="https://blog.streamlit.io/">Streamlit</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[A manifesto to include ML Engineers in your data science projects from day 1]]></title>
            <link>https://medium.com/artefact-engineering-and-data-science/a-manifesto-to-include-ml-engineers-in-your-data-science-projects-from-day-1-2964fdd25036?source=rss-e3aac8bb31b9------2</link>
            <guid isPermaLink="false">https://medium.com/p/2964fdd25036</guid>
            <category><![CDATA[data]]></category>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[engineering]]></category>
            <category><![CDATA[data-science]]></category>
            <category><![CDATA[ml-engineering]]></category>
            <dc:creator><![CDATA[Jeff Kayne]]></dc:creator>
            <pubDate>Tue, 24 May 2022 10:54:22 GMT</pubDate>
            <atom:updated>2022-05-24T10:54:22.294Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*fF7gsurPbPBA-NN5KJooSQ.jpeg" /><figcaption>Photo by <a href="https://unsplash.com/@mitchel3uo">Mitchell Luo</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>Many of us developers will know the feeling of struggling to balance time spent with users trying to understand their needs versus actually developing software. This is even more apparent in data science, as in order to build an effective system, a lot of domain knowledge of that system is required. Over the last couple of years working as an ML engineer with different data science teams I have often asked myself how I can separate the responsibilities of optimising model accuracy and building all the software required to make that model functional. My humble opinion is that data scientists should prioritise the accuracy of their models while ML Engineers should prioritise making sure that those models can be used by the wider business.</p><p>As a general rule of thumb in data science projects, the more iterations that you complete, the better. So let’s look at why including an ML engineer from day 1 will help you to iterate, and therefore increase your chances of building a successful system. To cover all aspects we’ll break down each reason into three major topics of data science projects: <strong>data, models </strong>and<strong> infrastructure</strong>.</p><p>Before getting into it, let me just define what I mean by <strong>iteration</strong>. In this article I am referring to end to end iterations of the complete product, often including steps of: data ingestion, preprocessing, model training &amp; evaluation, provisioning infrastructure, etc. What I <em>do not mean </em>is a quick model iteration in a notebook with the tweak of a hyper parameter. If you are used to working in an agile framework, you can equally think of these iterations as project sprints.</p><h3>Reason 1: Accelerate the initial POC delivery</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/500/0*OCmizRuYF4jf0zNb" /></figure><p>Building a skeleton on which you can iterate on is the first priority and can be a lengthy process. This skeleton is usually a POC that contains your initial baseline model and a demo of an application or way of exploiting the output of the model.</p><h4>An ML Engineer will help with:</h4><p><strong>Infrastructure: </strong>selecting compatible cloud resources (VM’s, connections to various data sources) and designing the cloud architecture are some initial considerations for the ML Engineer.</p><p><strong>Data: </strong>getting the necessary data to start building a model and ensuring data availability from various sources with the option to develop new flows if necessary.</p><p><strong>Models:</strong> ensuring that models being tested are in fact compatible with proposed cloud architecture for model deployment and technical requirements (e.g. latency, compute required, production environment requirements).</p><p>The ML Engineer can also help out in this phase defining software engineering best practices with version control, linting, code architecture, tests, etc.</p><h3>Reason 2: Accelerate each iteration</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/659/0*GPOW4sn11xJpo5G8" /></figure><p>Once you have achieved that initial build, the first couple of iterations are often difficult and slow. Speeding up iterations will allow smaller iterations with a single feature change — a much more effective way of developing than changing many things in a model before getting feedback.</p><p><strong>Infrastructure:</strong> time can be saved optimising storage and compute infrastructure. During these iterations an ML engineer can look to version the infrastructure itself, with Infrastructure as Code (IaC) tooling like <a href="https://www.terraform.io/">Terraform</a>. Using IaC allows for automation of infrastructure deployment directly with CI/CD pipelines, accelerating integration of any changes that need to be made to the existing infrastructure, and the creation of different cloud environments (dev, staging, production). Also using specific cloud components can speed up your workflow, for example building images remotely using GCP’s <a href="https://cloud.google.com/build">Cloud Build</a>.</p><p><strong>Data: </strong>preprocessing pipelines may be built rapidly by data science teams in order to get quickly to modelling. An ML Engineer can help in this phase to streamline your processing queries, whether they be in sql, pandas, pyspark etc. Doing this early on can save a lot of time on iterations in the long run as this code is run <em>a lot</em>.</p><p><strong>Models: </strong>complex model architectures can make for a lengthy training process. Also, when a data scientist refers to a “model” they may in fact be referring to a group of 100 models trained on different slices of the data, each with a SHAP explainer for deriving feature importance. An ML engineer can focus on how to parallelise the training pipeline, whether that be on a VM with multiprocessing in python, or distributing your workload across several nodes on the cloud. This itself can be iterated on, but major gains can be made here with surprisingly little effort. Automating deployment of your model with a <a href="https://cloud.google.com/architecture/mlops-continuous-delivery-and-automation-pipelines-in-machine-learning">CI/CD/CT</a> pipeline also greatly speeds up your iterations and ensures repeatability.</p><h3>Reason 3: Reduce the cost of each iteration</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/576/0*oU7Hy0wC8ozQr2uu" /></figure><p>Having an engineer to monitor your project’s cloud budget is critical, especially for data intensive applications.</p><p><strong>Infrastructure: </strong>cost is a major variable in the infrastructure selection equation. Once infrastructure is chosen, budget alerts can be put into place to ensure that costly components are monitored closely.</p><p><strong>Data: </strong>intelligent queries and data storage can also significantly reduce costs of each iteration. For example, aggregating data should be done sparingly during model iterations.</p><p><strong>Models: </strong>parallelising your training pipeline can also save you on uptimes of costly machines or runtime of serverless components.</p><h3>Reason 4: Ensure repeatability &amp; interpretability of each iteration</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/557/0*BXXj5WlMCo-Y9uQn.jpg" /></figure><p>Achieving fast iterations with a quality feedback loop in your project is great, but if you can’t replay each of those scenarios, it’s not much use. Having a repeatable pipeline implicitly means that you should have some way of monitoring pipeline runs, to identify runs based on specific parameters or performance metrics to roll back to if necessary. Setting this up robustly during development helps data scientists to experiment freely (without the need for the infamous Untitled12.ipynb) and prepares the pipeline for production monitoring.</p><p><strong>Infrastructure: </strong>linking the training code version to the infrastructure code version is the “extra mile” here, but is necessary to provide full rollback capabilities to a previous run. Ensuring repeatability and monitoring on a pipeline run basis is for me the essential first level of ML Ops that teams should strive for. Cloud platforms have services (GCP’s <a href="https://cloud.google.com/vertex-ai/?utm_source=google&amp;utm_medium=cpc&amp;utm_campaign=emea-fr-all-en-dr-skws-all-all-trial-e-gcp-1011340&amp;utm_content=text-ad-none-any-DEV_c-CRE_574683660431-ADGP_Hybrid%20%7C%20SKWS%20-%20EXA%20%7C%20Txt%20~%20%20AI%20%26%20ML%20~%20Vertex%20AI-KWID_43700066526085663-kwd-1445093214164-userloc_9054940&amp;utm_term=KW_vertex%20ai%20platform-NET_g-PLAC_&amp;gclid=Cj0KCQjwspKUBhCvARIsAB2IYutwLFuAu35tUPpdvJPb0xE-lKIgAK07C6YgpP_QQW6kF_2vV9VIky8aApfBEALw_wcB&amp;gclsrc=aw.ds">Vertex AI</a> for example) that can be quick to set up, but you may also consider taking the “best of breed” approach using open source tooling. The tradeoff here is balancing greater functionality of specific open source tooling vs the increased complexity of the system’s overall infrastructure.</p><p><strong>Data: </strong>saving all data objects at each stage in the pipeline. Depending on volumes, priority is to save train / test sets of each run.</p><p><strong>Models: </strong>as above, saving all models for each run with all parameters and metrics necessary. Another tip is to log a comment on each run with what has been changed for that specific run to log all experiments during development, as you would with a <em>git commit</em> message.</p><h3>Reason 5: Avoid at all costs the hectic “industrialisation” iterations</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/700/0*z183Pk7vQPjadVla" /></figure><p>When data science emerged it was very exploratory and required a massive effort with a group of software engineers to deploy any model once it had demonstrated good performances on historical data. This “industrialisation” phase is a very painful experience as the development environment (flat files &amp; python notebook) is very different to the production environment (automated data flows with production data &amp; production coding environment). The most successful projects that I have worked on are those where we have been able to copy the production environment as closely as possible in dev early on. This will reduce time to production and allow you to iterate safely in dev, deploying to prod when you are happy with an iteration.</p><p><strong>Infrastructure: </strong>emulating necessary production infrastructure in dev is not always easy and can be costly. This is where infrastructure as code is useful and can allow you easily to swap between environments.</p><p><strong>Data: </strong>something that separates data science development with traditional software engineering or even data engineering is that data scientists require production data in dev. Sandbox data (excluding some data or including some synthetic test data) for regular data engineering is a good practice during development, but can be a big waste of time for data science and can have large impacts on the whole data science pipeline. Thus having read only access to production tables is something to start negotiating with your data team from day 1.</p><p><strong>Models: </strong>from the start of the project only one model (or modelling approach) should be present in your production code. All experiments should stay in notebooks or separate temporary scripts in another folder. This avoids you from accumulating dead code in your production code base, and is easier to maintain or to onboard other devs.</p><h3>Conclusion</h3><p>In summary, building models and building the software surrounding those models should be two priorities from the start of each project. Having therefore separate streams with different responsibilities can help teams concentrate on both in parallel. The role of the ML Engineer is evolving day by day, and I’d love to hear your views on anything that I’ve missed !</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=2964fdd25036" width="1" height="1" alt=""><hr><p><a href="https://medium.com/artefact-engineering-and-data-science/a-manifesto-to-include-ml-engineers-in-your-data-science-projects-from-day-1-2964fdd25036">A manifesto to include ML Engineers in your data science projects from day 1</a> was originally published in <a href="https://medium.com/artefact-engineering-and-data-science">Artefact Engineering and Data Science</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>