<?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[Comet - Medium]]></title>
        <description><![CDATA[Comet is a meta machine learning platform that enables data scientists and teams to track, compare, explain, and optimize their experiments and models. - Medium]]></description>
        <link>https://medium.com/comet-ml?source=rss----aeed698699d2---4</link>
        <image>
            <url>https://cdn-images-1.medium.com/proxy/1*TGH72Nnw24QL3iV9IOm4VA.png</url>
            <title>Comet - Medium</title>
            <link>https://medium.com/comet-ml?source=rss----aeed698699d2---4</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 14 Nov 2026 15:45:44 GMT</lastBuildDate>
        <atom:link href="https://medium.com/feed/comet-ml" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Introducing Comet Interactive Reports, ML Templates & More]]></title>
            <link>https://medium.com/comet-ml/introducing-comet-interactive-reports-ml-templates-more-5199b7345adc?source=rss----aeed698699d2---4</link>
            <guid isPermaLink="false">https://medium.com/p/5199b7345adc</guid>
            <category><![CDATA[deep-learning]]></category>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[artificial-intelligence]]></category>
            <category><![CDATA[data-science]]></category>
            <dc:creator><![CDATA[Dominic Garcia]]></dc:creator>
            <pubDate>Tue, 08 Dec 2020 14:05:05 GMT</pubDate>
            <atom:updated>2020-12-08T14:05:05.134Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*5FsJtOGUuRNczEHRZbPnnA.jpeg" /></figure><p>Workflows and processes are a critical need for every machine learning and AI project. When done well, they can enable you to operate more efficiently and ensure that your hard work can successfully make it into production on time. But if you’re a data scientist, although workflows and processes are helpful, they’re not data science.</p><p>That raises the question — what steps can you take to make workflows and processes as easy as possible for you to spend less time on logistics, and more time on data science?</p><p>That’s the question we set out to answer as we worked on the next iteration of Comet’s Workspaces and Projects. Some of the features were straightforward — for example, making it easy to create and share interactive reports with your colleagues and executives. But others — like ML Templates — were designed to help you standardize how you approach and manage your experiments, ultimately enabling you to go from planning, to experimentation, to production as efficiently as possible while still supporting reproducibility and visibility as part the process.</p><p>With that in mind, let’s take a look at the three main features of this update:</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fplayer.vimeo.com%2Fvideo%2F486663390%3Fapp_id%3D122963&amp;dntp=1&amp;display_name=Vimeo&amp;url=https%3A%2F%2Fvimeo.com%2F486663390&amp;image=https%3A%2F%2Fi.vimeocdn.com%2Fvideo%2F1007281584_1280.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=vimeo" width="1920" height="1080" frameborder="0" scrolling="no"><a href="https://medium.com/media/b6e979a91c6df3003e9aa3f1ba64b5db/href">https://medium.com/media/b6e979a91c6df3003e9aa3f1ba64b5db/href</a></iframe><h3>Interactive Reports</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*kkBerjiDp4J5zWgSBiLCoQ.png" /></figure><p><strong>Check out the full report:</strong> <a href="https://www.comet.ml/team-comet-ml/cnn-visualizations/reports/visualizations-to-interpret-convolutional-neural-networks">Visualizations to Interpret Convolutional Neural Networks</a></p><p>As you know, it’s not enough to simply do your experiment and push on with your day. At a certain point, you have to not only share the results with internal stakeholders, but may have to also report results to executives. With Comet Interactive Reports, you can create fully interactive reports that you can share with your team to provide updates on the status or results of your projects. You can also embed custom panels into each report as well, if there are custom items you need to report on.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*osK_23u77npaKkMSsXSagA.png" /></figure><p><strong>Check out the full report:</strong> <a href="https://www.comet.ml/team-comet-ml/tf-model-analysis/reports/tensorflow-model-analysis">Tensorflow Model Analysis</a></p><p>You can share, download, or when appropriate, even publish your reports publicly to the <a href="https://www.comet.ml/site/report-library">Comet Report Library</a>.</p><h3>Machine Learning Templates</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*KWZKr069EyeO1DJhnwx9AQ.png" /></figure><p>While every machine learning project is unique, that doesn’t mean the workflow or process has to be. No matter what you’re working on, there will likely be consistency in how you scope the project and what you have track. Rather than reinvent the wheel for every project, standardizing your approach to common ML requirements can help you spend less time on planning and more time on data science.</p><p>That’s where Comet ML Templates come in. The initial templates are below ( <a href="https://www.comet.ml/signup">Free Comet account</a> required):</p><p><a href="https://www.comet.ml/reports-templates/project-scope-template/reports/project-scope"><strong>Project Scoping Template</strong></a> — easily define and track the objectives, evaluation criteria, and deliverables for your machine learning project.</p><p><a href="https://www.comet.ml/reports-templates/baseline-classification-models-template/reports/baseline-classification-model-template"><strong>Baseline Classification Models</strong></a> — assess the performance of simple baseline models on a classification task.</p><p><a href="https://www.comet.ml/reports-templates/baseline-regression-models-template/reports/baseline-regression-model-template"><strong>Baseline Regression Models</strong></a> — assess the performance of simple baseline models on a regression task.</p><p><a href="https://www.comet.ml/reports-templates/hyperparameter-search-template/reports/hyperparameter-search-template"><strong>Hyperparameter Search</strong></a> — a pre-built template that provides the necessary panels and outline to analyze and present the results from a Hyperparameter Search.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*52ELGpbWxlm5d5G_Ao_Jyw.png" /></figure><h3>CodeCarbon Panel &amp; Emissions Tracking Template</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/868/0*VfkLxOSICeosetbS.png" /><figcaption><em>Comet </em><a href="http://comet.ml/demo/gallery/view/new#select-panel?gallery-tab=Featured&amp;preview-template-id=IMJs48h1kvnfdaZ3L34x4jmae"><em>CodeCarbon Panel</em></a></figcaption></figure><p><a href="https://codecarbon.io/">CodeCarbon</a> is a lightweight software package that seamlessly integrates into your Python codebase that estimates the amount of carbon dioxide (CO2) produced by the cloud or your personal computing resources when you execute the code. It shows developers how they can lower emissions by either optimizing code or by hosting cloud infrastructures in regions that use renewable energy sources. CodeCarbon was developed via a joint initiative between <a href="http://mila.quebec/">Mila</a>, <a href="https://www.bcg.com/en-us/beyond-consulting/bcg-gamma/default">BCG GAMMA</a>, <a href="http://haverford.edu/">Haverford College</a>, and <a href="http://www.comet.ml/">Comet ML</a>.</p><p>As part of the initiative, we’ve developed a <a href="http://comet.ml/demo/gallery/view/new#select-panel?gallery-tab=Featured&amp;preview-template-id=IMJs48h1kvnfdaZ3L34x4jmae">new interactive panel</a> and <a href="https://www.comet.ml/reports-templates/template-codecarbon/reports/emissions-tracking-template/preview">Emissions Tracking Template</a> ( <a href="https://www.comet.ml/signup">Comet Account required</a>) that you can use to proactively incorporate and consider the carbon emissions of your project.</p><p>If you missed the announcement earlier this week, you can check out our <a href="https://www.comet.ml/site/introducing-codecarbon-an-open-source-tool-to-help-track-the-co2-emissions-of-your-research/">recent blog post</a>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*hYdz-ScCTjqv70SnReT7qw.jpeg" /></figure><h3>Upcoming Live Demo</h3><p>If you’d like to see all of the new features in action, be sure to sign up for our upcoming live demo on Thursday, December 10. <a href="https://us02web.zoom.us/webinar/register/7116014704917/WN_U-fc0bsMTryRbXrPTVKkpA">Register here.</a></p><p><em>Originally published at </em><a href="https://www.comet.ml/site/introducing-reports-ml-templates/"><em>https://www.comet.ml</em></a><em> on December 7, 2020.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=5199b7345adc" width="1" height="1" alt=""><hr><p><a href="https://medium.com/comet-ml/introducing-comet-interactive-reports-ml-templates-more-5199b7345adc">Introducing Comet Interactive Reports, ML Templates &amp; More</a> was originally published in <a href="https://medium.com/comet-ml">Comet</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Industry Q&A: Where do most machine learning projects fail?]]></title>
            <link>https://medium.com/comet-ml/industry-q-a-where-do-most-machine-learning-projects-fail-2005e009b0f5?source=rss----aeed698699d2---4</link>
            <guid isPermaLink="false">https://medium.com/p/2005e009b0f5</guid>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[artificial-intelligence]]></category>
            <dc:creator><![CDATA[Dominic Garcia]]></dc:creator>
            <pubDate>Wed, 28 Oct 2020 16:05:28 GMT</pubDate>
            <atom:updated>2020-10-28T16:05:28.737Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*oAmxlreQI7Jna7F-.png" /></figure><p><em>Comet recently hosted the online panel, </em><a href="https://info.comet.ml/panel-addressing-ml-challenges/"><em>“How do top AI researchers from Google, Stanford and Hugging Face approach new ML problems?”</em></a><em> This is the second post in a series where we recap the questions, answers, and approaches that top AI teams in the world are taking to critical machine learning challenges. You can access the </em><a href="https://www.comet.ml/site/how-to-start-the-machine-learning-research-process/"><em>first post here.</em></a></p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fplayer.vimeo.com%2Fvideo%2F470175032%3Fapp_id%3D122963&amp;dntp=1&amp;display_name=Vimeo&amp;url=https%3A%2F%2Fvimeo.com%2F470175032&amp;image=https%3A%2F%2Fi.vimeocdn.com%2Fvideo%2F978662572_1280.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=vimeo" width="1920" height="1080" frameborder="0" scrolling="no"><a href="https://medium.com/media/542d58b7427cf0fc4545b2fafc2225e5/href">https://medium.com/media/542d58b7427cf0fc4545b2fafc2225e5/href</a></iframe><p>Although every machine learning project is different, there are common pitfalls and challenges that machine learning teams face when building and training models, and then taking them into production. Many of these challenges can be addressed when taken into consideration upfront, such as understanding the end goal, as well as the limitations that will be faced in your production environment.</p><p><strong>Gideon Mendels, Comet</strong><br> You all have a lot of experience. You’ve seen a lot of models in production, models that didn’t make it to production. Where do you see most machine learning projects fail? I say projects and not models because we’re looking at how we bring value to the business or to the team. As a follow up, what would you tell a junior data scientist to be careful about? What is your number one tip for someone coming into the industry?</p><p><strong>Piero Molino, Stanford &amp; Ludwig</strong><br>In terms of failures, I would say a couple the situations usually arise when you don’t know or understand what you’re optimizing for beforehand. Then when you try to deploy a model, the model is not really doing what you expect. You have to understand, “What’s the final goal?”</p><p>One example I can give — for recommender systems, if you have your model that has a higher mean reciprocal rank, or whatever metric that you care about, but then you put it in the hands of the users and find out what you’re really trying to optimize for is something like the click through rate or maybe an even more downstream metric, such as how many items did they end up buying or they end up watching.</p><p>There’s not always a one-to-one kind of relationship between the performance that you see offline and the performance that you see online. Things can look promising at the beginning, but don’t end up deployed in production.</p><p>The other aspect I want to stress — when you have a model and put it into production, in many cases, there will be a distribution shift between the training data and the real data. The more time that passes, the more this shifts. If you don’t do a good job at monitoring, improving the models, adapting them, to make sure they’re as aligned as possible, you can see degradation of performance over time.</p><p><strong>Ambarish Jash, Google AI<br></strong> Piero brings up really good points. In big systems, your model is not the only one in the system. Having big offline gains doesn’t always translate to online gains. One of the major reasons is you may not be passing any orthogonal signal to the system that you’re training. So it always makes sense to make sense what the final goal is.</p><p>Typically that final goal is not just one final object, like driving CTR or a person buys. There are auxiliary goals as well. You can’t create a model keeping these goals in mind at the same time, so you need to do A/B testing, look at the data when it comes back. You have to be willing to fail the first few times.</p><p>Looking at the distributional shift in your data, having continuous retraining pipelines is easier said than done. You have to understand how many steps you want to fine tune, how to set the learning rate, how you accommodate new and sparse objects. There’s a tone of systems work that must go on in the background to put something into production.</p><p><strong>Victor Sanh, Hugging Face</strong><br>One rookie mistake I see — if you don’t take into account production constraints from the very beginning, you can end up with an overcomplicated model that will never make it into production.</p><p>There’s stories where you have this great model with really high accuracy, but it took 24 hours to run. So you’d never take that into production. You have to understand those constraints at the beginning, or you’ll never make it to the end.</p><p>Another point is being stuck in “wishful thinking.” It’s when you look at the results and see what you want, not what they say. It can be super challenging at the beginning not to see the results for what they are. This is especially hard when you’re on deadline.</p><p><em>Want to watch the full panel? It’s available </em><a href="https://info.comet.ml/panel-addressing-ml-challenges/"><em>on-demand here.</em></a></p><p><em>Originally published at </em><a href="https://www.comet.ml/site/industry-qa-where-most-machine-learning-projects-fail/"><em>https://www.comet.ml</em></a><em> on October 20, 2020.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=2005e009b0f5" width="1" height="1" alt=""><hr><p><a href="https://medium.com/comet-ml/industry-q-a-where-do-most-machine-learning-projects-fail-2005e009b0f5">Industry Q&amp;A: Where do most machine learning projects fail?</a> was originally published in <a href="https://medium.com/comet-ml">Comet</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Industry Q&A: How do you start the machine learning research process?]]></title>
            <link>https://medium.com/comet-ml/industry-q-a-how-do-you-start-the-machine-learning-research-process-ae03ca583fa7?source=rss----aeed698699d2---4</link>
            <guid isPermaLink="false">https://medium.com/p/ae03ca583fa7</guid>
            <category><![CDATA[artificial-intelligence]]></category>
            <category><![CDATA[data-science]]></category>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[ai]]></category>
            <dc:creator><![CDATA[Dominic Garcia]]></dc:creator>
            <pubDate>Tue, 20 Oct 2020 17:33:44 GMT</pubDate>
            <atom:updated>2020-10-20T17:33:44.126Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*QArJhTD52D0LM-Au.png" /></figure><p><em>Comet recently hosted the online panel, </em><a href="https://info.comet.ml/panel-addressing-ml-challenges/"><em>“How do top AI researchers from Google, Stanford and Hugging Face approach new ML problems?”</em></a><em> This post is our first in a series where we recap the questions, answers, and approaches that top AI teams in the world are taking to critical machine learning challenges.</em></p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fplayer.vimeo.com%2Fvideo%2F466584783%3Fapp_id%3D122963&amp;dntp=1&amp;display_name=Vimeo&amp;url=https%3A%2F%2Fvimeo.com%2F466584783&amp;image=https%3A%2F%2Fi.vimeocdn.com%2Fvideo%2F972321475_1280.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=vimeo" width="1920" height="1080" frameborder="0" scrolling="no"><a href="https://medium.com/media/9543b06218804ab2314007f8365fe17c/href">https://medium.com/media/9543b06218804ab2314007f8365fe17c/href</a></iframe><p>One of the hardest parts of machine learning is simply getting started. Do you have the necessary data? Do you have the systems in place to manage your model? If you need to take it into production, do you have a good understanding of what the production environment looks like? All of these are considerations that need to be made in order to ensure your work is successful — and if the problem you’re trying to solve is worth pursuing.</p><p><strong>Gideon Mendels, Comet</strong><br> There are a number of challenges to even approaching a machine learning challenge. There are so many moving parts. For those of us in the industry, it’s very different from what you might see in something like a Kaggle competition, where you have a clean dataset and the metrics are figured out for you.</p><p>So how do you start the research process? What do you do when you have a new problem?</p><p><strong>Ambarish Jash, Google AI</strong><br> Two parts, one is the research problem and coming up with the problem definition. The other is the challenge of putting it in production. Production puts a significant amount of constraint on the research you can do. One approach is to:</p><ul><li>Define the problem</li><li>Define the system you’re going to build</li></ul><p>If you need to go into production, I would strongly recommend you about building the system first and maybe start with simpler models. In the long run, it makes things like debugging and maintenance simpler.</p><p>Keep things simple, build out pipelines. Once these are built, you can start to rapidly iterate on the model. You need a lot of data, and most of the time, the loss isn’t exactly what you care about. Having a strong evaluation framework is important too, because as you start to add complexity to your model, you will need to figure out if it’s making sense with your final task.</p><p><strong>Piero Moilino, Stanford &amp; Ludwig<br></strong> This depends on the project, based on if it’s a theory applied project or a research project. For theory applied, I’m often the only one with access to data and there usual isn’t much historical progress on the data. While on a research problem, there may be papers about it and I can start from there.</p><p>If the project is applied, the first thing I do is try to understand the data. That’s the number one thing. Is there signal for the problem I want to solve? In many cases, a machine learning project won’t work simply because there isn’t enough signal for it in the data.</p><p>After looking at the data, I personally use tools that I build for myself. This is just because it’s easier for me to compare different models, have a standard pipeline, and then I can reuse it. Usually I train a simple model, see what’s there, look at the predictions, do some visualizations, understand the predictions and learning curves.</p><p>Once I feel I have a global understanding of the problem, the data, and an initial simple solution, then I double down on complex models or more sophisticated solutions. But something simple first, then scale up, is really good advice.</p><p>I believe that machine learning projects are much closer to research projects than software projects. For software, usually you define your constraints and implement, and you know it will work ahead of time. That’s not the case for machine learning.</p><p>In machine learning, you don’t know if the problem will work to begin with. By starting simple, and understanding if you have signal, you can get an idea if you have what you need to solve the problem. Otherwise you can spend a lot of time and end up with a model that doesn’t work. Fail fast and try to figure it out early if you can solve the problem.</p><p><strong>Victor Sanh, Hugging Face</strong><br>My approach is to “really lose.” We have a spreadsheet with a lot of ideas that come along, and we take the ones that excite us the most.</p><p>But I agree with Piero and Ambarish — you take the problems, then you want to start fast and iterate fast at the beginning. You want to understand the data and learning processes, so you can decide “is it worth it to pursue this problem for a few weeks?”</p><p>The first two weeks are decisive, because that’s when you get a sense of your data and understand if there’s actually improvement that you can do there.</p><p><em>Want to watch the full panel? It’s available </em><a href="https://info.comet.ml/panel-addressing-ml-challenges/"><em>on-demand here.</em></a></p><p><em>Originally published at </em><a href="https://www.comet.ml/site/how-to-start-the-machine-learning-research-process/"><em>https://www.comet.ml</em></a><em> on October 13, 2020.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ae03ca583fa7" width="1" height="1" alt=""><hr><p><a href="https://medium.com/comet-ml/industry-q-a-how-do-you-start-the-machine-learning-research-process-ae03ca583fa7">Industry Q&amp;A: How do you start the machine learning research process?</a> was originally published in <a href="https://medium.com/comet-ml">Comet</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Using Comet’s Model Registry]]></title>
            <link>https://medium.com/comet-ml/using-comets-model-registry-8d60eda2b25?source=rss----aeed698699d2---4</link>
            <guid isPermaLink="false">https://medium.com/p/8d60eda2b25</guid>
            <category><![CDATA[model]]></category>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[model-registry]]></category>
            <dc:creator><![CDATA[Dominic Garcia]]></dc:creator>
            <pubDate>Mon, 14 Sep 2020 14:43:12 GMT</pubDate>
            <atom:updated>2020-09-14T14:43:12.562Z</atom:updated>
            <content:encoded><![CDATA[<p>In Machine Learning, a “model” could be anything. The following pasta machine could be described as a model. It takes “input”, and a set of “hyperparameters”. Well, at least a couple of hyperparameters: the “cutter” determines whether the “output” is fettuccine or spaghetti, and the speed that you spin the crank determines the thickness of the noodles. Change the hyperparameters and you get different output.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*xRouaItUh_Cau0c6faApIg.jpeg" /><figcaption><em>A Pasta Machine Learning Model. Photo by Magic Madzik.</em></figcaption></figure><p>Of course, the internals of a pasta machine don’t change over time, and it doesn’t produce better “output” every time you cook (given appropriate “loss” ratings from your dinner guests). That would be cool! So, the metaphor is not complete, but I do like the idea of <strong>Pasta Machine Learning</strong>.</p><p>The pasta machine shows that the idea of a model can be varied between chefs, er, I mean data scientists.</p><p>Thanks to <a href="https://towardsdatascience.com/how-scikit-learn-changed-machine-learning-forever-90c1eebe3484">scikit learn</a>, models in Python often have a similar interface to one another (for better or worse). For example, models often have methods like:</p><p>model.fit()<br>model.train()<br>model.test()</p><p>Regardless of what kind of model you are using in your Machine Learning code, <a href="https://comet.ml/">Comet ML</a> can handle it. Comet has a sophisticated system for logging, registering, versioning, and deploying machine learning models.</p><p>The steps of the Comet model pipeline are:</p><ol><li>Log an Experiment Model, via <a href="https://www.comet.ml/docs/python-sdk/Experiment/#experimentlog_model">Comet’s Python SDK Experiment</a></li><li>Register an Experiment Model</li><li>Track Model Versions of the Registered Models</li><li>Deploy a Registered Model</li></ol><p>We’ll go through each of these steps.</p><p><strong>1. Log an Experiment Model</strong></p><p>To Comet, a model can be composed of any files or folders in the file system. That is, a model can be any collection of files.</p><p>The first step in the model pipeline is to log all of the associated files with a model name via an Experiment.</p><p>If all of the files connected to a model are in a single folder (and all of the files there are related to the model), you can simply log the model with a name and the path to the folder. Here, we use the name “MNIST CNN” and all of the model files are in the “../models/run-026/” folder:</p><p>from comet_ml import Experiment<br> experiment = Experiment()<br> experiment.log_model(&quot;MNIST CNN&quot;, &quot;../models/run-026/&quot;)</p><p>After you log a model via an Experiment, you will see the model and all of its individual files in the Experiment’s Assets Tab.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/958/1*Q0xNAm8Fe3I8Xb6q_govlQ.png" /><figcaption><em>The Experiment Model in the Comet.ml UI after running the above code.</em></figcaption></figure><p>From the Experiment’s Assets tab, you can download the model, see if it has been registered before, or register it as a new model, or a new version of an existing model.</p><p>Clicking the + Register link will take you to the Registry view:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/105/0*qXPp6oVwEpFMO8gd.png" /></figure><p><strong>2. Register a Model</strong></p><p>After you log a model through an Experiment through the SDK, you can then register it. Registered Models belong to a workspace, and are shared with your team there.</p><p>You can register an Experiment’s model in two ways:</p><p>1. Through the Experiment’s Asset Tab in the Comet.ml User Interface<br>2. <a href="https://www.comet.ml/docs/python-sdk/APIExperiment/#apiexperimentregister_model">Programmatically through the Comet Python SDK</a></p><p>To register an experiment’s model via the Comet User Interface, simply go the Experiment’s Asset tab, locate the model in the asset list, and click on the Register link.</p><p>If you have previously registered a model, you can save this model to an Existing version:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/519/1*Cb4AnnUdVNB9h-xX4PSFDg.png" /></figure><p>However, if you would like to save this as a new model, simply click the “Register New Model” link. That will bring up the Register Model window:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/758/1*4OKIZTlL84IREpVqldXwUw.png" /><figcaption><em>The Register Model dialog.</em></figcaption></figure><p>Here, you can give the registered model a name, a version, and set its visibility to Public or Private.</p><p>You can also register an experiment’s model via the Python API. That would look similar to:</p><p>from comet_ml import API<br> api = API()<br> experiment = api.get(&quot;workspace/project/experiment&quot;)<br> experiment.register_model(&quot;MNIST CNN&quot;)</p><p><strong>3. Track Model Versions</strong></p><p>Registered models belong to the workspace. In this manner, you can share your models with the workspace team. At the workspace view, you can select between viewing the Projects or the Registered Models:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/945/1*uBik9W094ITOAfp5_3WtcA.png" /><figcaption><em>The Card view of the Registered Models. You can also see the Registered Models in a List view.</em></figcaption></figure><p>Selecting a registered model’s card in the Model Registry will take you to the detailed view of the registered model:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/883/1*RMJJuGC9JqrtZkY_L72wUg.png" /><figcaption><em>The Detailed View of the Registered Model.</em></figcaption></figure><p>Here you can see the latest version of the registered model, and all previous versions as well. Registered models contain the following properties, which can all be edited here:</p><ul><li>Registered name</li><li>Description</li><li>Visibility setting (public vs. private)</li><li>Notes</li></ul><p><strong>4. Deploy Models</strong></p><p>To download a registered model as a zip file, click on the “Get Model” button. The zip file will contain all of the files that were logged with the Experiment model via the Python SDK.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/873/1*RlEWhiq-9bCXWPeH1I3A4A.png" /><figcaption><em>The Versions of the Registered Model.</em></figcaption></figure><p>You can download the latest versioned registered model, or any of the versions. Simply click on their download icon.</p><p>That’s it! I hope you enjoyed our quick snack overview of Comet’s Model Registry!</p><p>For more information, please see: <a href="https://www.comet.ml/docs/user-interface/models/">comet.ml/docs/user-interface/models/</a></p><p>Bon appétit!</p><p><em>Originally published at </em><a href="https://www.comet.ml/site/using-comet-model-registry/"><em>https://www.comet.ml</em></a><em> on September 9, 2020.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=8d60eda2b25" width="1" height="1" alt=""><hr><p><a href="https://medium.com/comet-ml/using-comets-model-registry-8d60eda2b25">Using Comet’s Model Registry</a> was originally published in <a href="https://medium.com/comet-ml">Comet</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Introducing Panels: Custom Visualizations for Machine Learning]]></title>
            <link>https://medium.com/comet-ml/introducing-panels-custom-visualizations-for-machine-learning-92aa50ca40d?source=rss----aeed698699d2---4</link>
            <guid isPermaLink="false">https://medium.com/p/92aa50ca40d</guid>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[visualization]]></category>
            <dc:creator><![CDATA[Gideon Mendels]]></dc:creator>
            <pubDate>Wed, 05 Aug 2020 18:54:30 GMT</pubDate>
            <atom:updated>2020-08-05T18:54:30.089Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*uY_7yNIhbtZmzWQeafYlKQ.png" /></figure><p>In the last three years since Comet was founded, our users and customers trained millions of models on anything from self-driving cars to speech recognition, and from Covid-19 protein prediction to satellite image object detection. Based on your requests we added more and more visualization capabilities including <a href="https://www.comet.ml/docs/user-interface/#project-visualizations">chart builders</a>, <a href="https://www.comet.ml/docs/python-sdk/Comet-Confusion-Matrix/">confusion matrices</a>, <a href="https://www.comet.ml/docs/user-interface/#audio-tab">audio players</a> and many more. But as the complexity of the use cases, requirements and customization grew, we realized that we needed a more scalable way to grow Comet’s functionality and provide users the ability to <strong>build anything they want!</strong></p><p>Today, we are excited to announce The key principles in designing Comet Panels were the following: they want without the limitations of a GUI or a specific dependency <em>Comet Panels, </em>which has been under development and testing for the past year. Starting today, you can tap into the ecosystems of JS/HTML/CSS and create new widgets with custom styles and behaviors, or add new visualizations and charting types. <strong>Unlimited possibilities!</strong></p><ol><li><strong>Dynamic — </strong>Panels should be dynamic and update on new experiments and results when they arrive. <em>There’s nothing worse than a stale and misleading visualization.</em></li><li><strong>Flexible — </strong>Users should be able to build and customize</li><li><strong>Reusable </strong>— teammates and community members should be able to share and reuse each other’s panels.</li></ol><h3>The Comet Panel Gallery</h3><p>The heart of Panels lies in the <a href="https://www.comet.ml/demo/gallery/view/new#select-panel?gallery-tab=Public">Comet Panel Gallery</a>. Check it out to see what others have built and shared with the community.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*MWW-ZtFWJl_wmHLcpRaYoA.png" /></figure><p>Comet experiments already store your hyper-parameters, metrics, model definition, trained models, dataset samples and much more. Panels build on top of that data to visualize and process anything you’d like.</p><p>You can create a new panel by going to the <a href="https://www.comet.ml/demo/gallery/view/new#select-panel?gallery-tab=Public">Panels Gallery</a> and clicking on “Create New” on the top right corner. You should see a similar code editor:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*bSoV0sv3prSFeWz9ReHyUA.png" /></figure><p>The code editor is divided into three main panes. On the left we have a full code editor with code completion, syntax highlighting etc. On the right we have a live preview of our panel. On the bottom right we see our Console pane which shows errors and exceptions. You’ll also notice the tabs on the top that allow you to switch from code to description, HTML, CSS, resources and query.</p><p>To learn how to customize your machine learning visualizations, read the rest of the article on <a href="https://www.comet.ml/site/introducing-panels-custom-visualizations-for-machine-learning/">Comet.ml</a>.</p><p><em>Originally published at </em><a href="https://www.comet.ml/site/introducing-panels-custom-visualizations-for-machine-learning/"><em>https://www.comet.ml</em></a><em> on August 5, 2020.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=92aa50ca40d" width="1" height="1" alt=""><hr><p><a href="https://medium.com/comet-ml/introducing-panels-custom-visualizations-for-machine-learning-92aa50ca40d">Introducing Panels: Custom Visualizations for Machine Learning</a> was originally published in <a href="https://medium.com/comet-ml">Comet</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Customer Case Study: Building an end-to-end Speech Recognition model in PyTorch with AssemblyAI]]></title>
            <link>https://medium.com/comet-ml/customer-case-study-building-an-end-to-end-speech-recognition-model-in-pytorch-with-assemblyai-cea744401fe8?source=rss----aeed698699d2---4</link>
            <guid isPermaLink="false">https://medium.com/p/cea744401fe8</guid>
            <category><![CDATA[assemblyai]]></category>
            <category><![CDATA[pytorch]]></category>
            <category><![CDATA[artificial-intelligence]]></category>
            <category><![CDATA[machine-learning]]></category>
            <dc:creator><![CDATA[Ashley Binford]]></dc:creator>
            <pubDate>Tue, 19 May 2020 13:02:17 GMT</pubDate>
            <atom:updated>2020-05-19T13:02:17.798Z</atom:updated>
            <content:encoded><![CDATA[<p><em>This post was written by Michael Nguyen, Machine Learning Research Engineer at </em><a href="https://www.assemblyai.com/"><em>AssemblyAI</em></a><em>. AssemblyAI uses Comet to log, visualize, and understand their model development pipeline.</em></p><p>Deep Learning has changed the game in speech recognition with the introduction of end-to-end models. These models take in audio, and directly output transcriptions. Two of the most popular end-to-end models today are Deep Speech by Baidu, and Listen Attend Spell (LAS) by Google. Both Deep Speech and LAS, are recurrent neural network (RNN) based architectures with different approaches to modeling speech recognition. Deep Speech uses the Connectionist Temporal Classification (CTC) loss function to predict the speech transcript. LAS uses a sequence to sequence network architecture for its predictions.</p><p>These models simplified speech recognition pipelines by taking advantage of the capacity of deep learning system to learn from large datasets. With enough data, you should, in theory, be able to build a super robust speech recognition model that can account for all the nuance in speech without having to spend a ton of time and effort hand engineering acoustic features or dealing with complex pipelines in more old-school GMM-HMM model architectures, for example.</p><p>Deep learning is a fast-moving field, and Deep Speech and LAS style architectures are already quickly becoming outdated. You can read about where the industry is moving in the Latest Advancement Section below.</p><h3>How to Build Your Own End-to-End Speech Recognition Model in PyTorch</h3><p>Let’s walk through how one would build their own end-to-end speech recognition model in PyTorch. The model we’ll build is inspired by Deep Speech 2 (Baidu’s second revision of their now-famous model) with some personal improvements to the architecture. The output of the model will be a probability matrix of characters, and we’ll use that probability matrix to decode the most likely characters spoken from the audio. You can find the full code and also run the it with GPU support on <a href="https://colab.research.google.com/drive/1IPpwx4rX32rqHKpLz7dc8sOKspUa-YKO">Google Colaboratory</a>.</p><h4>Preparing the data pipeline</h4><p>Data is one of the most important aspects of speech recognition. We’ll take raw audio waves and transform them into Mel Spectrograms.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*xzORF_IT8BLP3zpYoif45A.png" /></figure><p>You can read more on the details about how that transformation looks from this excellent post <a href="https://haythamfayek.com/2016/04/21/speech-processing-for-machine-learning.html">here</a>. For this post, you can just think of a Mel Spectrogram as essentially a picture of sound.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*bRgvqH75Dz78YE3uyKZePQ.jpeg" /></figure><p>For handling the audio data, we are going to use an extremely useful utility called <strong>torchaudio </strong>which is a library built by the PyTorch team specifically for audio data. We’ll be training on a subset of <a href="http://www.openslr.org/12/">LibriSpeech</a>, which is a corpus of read English speech data derived from audiobooks, comprising 100 hours of transcribed audio data. You can easily download this dataset using <strong>torchaudio</strong>:</p><pre>import torchaudio train_dataset = torchaudio.datasets.LIBRISPEECH(&quot;./&quot;, url=&quot;train-clean-100&quot;, download=True) <br>test_dataset = torchaudio.datasets.LIBRISPEECH(&quot;./&quot;, url=&quot;test-clean&quot;, download=True)</pre><p>Each sample of the dataset contains the waveform, sample rate of audio, the utterance/label, and more metadata on the sample. You can view what each sample looks like from the source code <a href="https://github.com/pytorch/audio/blob/master/torchaudio/datasets/librispeech.py#L40">here</a>.</p><h4>Data Augmentation — SpecAugment</h4><p>Data augmentation is a technique used to artificially increase the diversity of your dataset in order to increase your dataset size. This strategy is especially helpful when data is scarce or if your model is overfitting. For speech recognition, you can do the standard augmentation techniques, like changing the pitch, speed, injecting noise, and adding reverb to your audio data.</p><p>We found Spectrogram Augmentation (SpecAugment), to be a much simpler and more effective approach. SpecAugment, was first introduced in the paper <a href="https://arxiv.org/abs/1904.08779">SpecAugment: A Simple Data Augmentation Method for Automatic Speech Recognition</a>, in which the authors found that simply cutting out random blocks of consecutive time and frequency dimensions improved the models generalization abilities significantly!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/619/1*Hjkem8_fvGnPWcB8l3gUtA.png" /></figure><p>In PyTorch, you can use the<strong> torchaudio</strong> function <strong>FrequencyMasking</strong> to mask out the frequency dimension, and <strong>TimeMasking</strong> for the time dimension.</p><pre>torchaudio.transforms.FrequencyMasking()<br>torchaudio.transforms.TimeMasking()</pre><p>Now that we have the data, we’ll need to transform the audio into Mel Spectrograms, and map the character labels for each audio sample into integer labels:</p><pre>class TextTransform:<br>    &quot;&quot;&quot;Maps characters to integers and vice versa&quot;&quot;&quot;<br>    def __init__(self):<br>        char_map_str = &quot;&quot;&quot;<br>        &#39; 0<br>        &lt;SPACE&gt; 1<br>        a 2<br>        b 3<br>        c 4<br>        d 5<br>        e 6<br>        f 7<br>        g 8<br>        h 9<br>        i 10<br>        j 11<br>        k 12<br>        l 13<br>        m 14<br>        n 15<br>        o 16<br>        p 17<br>        q 18<br>        r 19<br>        s 20<br>        t 21<br>        u 22<br>        v 23<br>        w 24<br>        x 25<br>        y 26<br>        z 27<br>        &quot;&quot;&quot;<br>        self.char_map = {}<br>        self.index_map = {}<br>        for line in char_map_str.strip().split(&#39;\n&#39;):<br>            ch, index = line.split()<br>            self.char_map[ch] = int(index)<br>            self.index_map[int(index)] = ch<br>        self.index_map[1] = &#39; &#39;<br><br>    def text_to_int(self, text):<br>        &quot;&quot;&quot; Use a character map and convert text to an integer sequence &quot;&quot;&quot;<br>        int_sequence = []<br>        for c in text:<br>            if c == &#39; &#39;:<br>                ch = self.char_map[&#39;&#39;]<br>            else:<br>                ch = self.char_map[c]<br>            int_sequence.append(ch)<br>        return int_sequence<br><br>    def int_to_text(self, labels):<br>        &quot;&quot;&quot; Use a character map and convert integer labels to an text sequence &quot;&quot;&quot;<br>        string = []<br>        for i in labels:<br>            string.append(self.index_map[i])<br>        return &#39;&#39;.join(string).replace(&#39;&#39;, &#39; &#39;)<br><br><br>train_audio_transforms = nn.Sequential(<br>    torchaudio.transforms.MelSpectrogram(sample_rate=16000, n_mels=128),<br>    torchaudio.transforms.FrequencyMasking(freq_mask_param=15),<br>    torchaudio.transforms.TimeMasking(time_mask_param=35)<br>)<br><br>valid_audio_transforms = torchaudio.transforms.MelSpectrogram()<br><br>text_transform = TextTransform()<br><br><br>def data_processing(data, data_type=&quot;train&quot;):<br>    spectrograms = []<br>    labels = []<br>    input_lengths = []<br>    label_lengths = []<br>    for (waveform, _, utterance, _, _, _) in data:<br>        if data_type == &#39;train&#39;:<br>            spec = train_audio_transforms(waveform).squeeze(0).transpose(0, 1)<br>        else:<br>            spec = valid_audio_transforms(waveform).squeeze(0).transpose(0, 1)<br>        spectrograms.append(spec)<br>        label = torch.Tensor(text_transform.text_to_int(utterance.lower()))<br>        labels.append(label)<br>        input_lengths.append(spec.shape[0]//2)<br>        label_lengths.append(len(label))<br><br>    spectrograms = nn.utils.rnn.pad_sequence(spectrograms, batch_first=True).unsqueeze(1).transpose(2, 3)<br>    labels = nn.utils.rnn.pad_sequence(labels, batch_first=True)<br><br>    return spectrograms, labels, input_lengths, label_lengths</pre><h3>Define the Model — Deep Speech 2 (but better)</h3><p>Our model will be similar to the Deep Speech 2 architecture. The model will have two main neural network modules — N layers of Residual Convolutional Neural Networks (ResCNN) to learn the relevant audio features, and a set of Bidirectional Recurrent Neural Networks (BiRNN) to leverage the learned ResCNN audio features. The model is topped off with a fully connected layer used to classify characters per time step.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*TgSpH6OfrVWQXaF6K0580g.png" /></figure><p>Convolutional Neural Networks (CNN) are great at extracting abstract features, and we’ll apply the same feature extraction power to audio spectrograms. Instead of just vanilla CNN layers, we choose to use Residual CNN layers. Residual connections (AKA skip connections) were first introduced in the paper <a href="https://arxiv.org/abs/1512.03385">Deep Residual Learning for Image Recognition</a>, where the author found that you can build really deep networks with good accuracy gains if you add these connections to your CNN’s. Adding these Residual connections also helps the model learn faster and generalize better. The paper <a href="https://arxiv.org/abs/1712.09913">Visualizing the Loss Landscape of Neural Nets</a> shows that networks with residual connections have a “flatter” loss surface, making it easier for models to navigate the loss landscape and find a lower and more generalizable minima.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*qTVxpLrpnOVzTiDnusJc8g.png" /></figure><p>Recurrent Neural Networks (RNN) are naturally great at sequence modeling problems. RNN’s processes the audio features step by step, making a prediction for each frame while using context from previous frames. We use BiRNN’s because we want the context of not only the frame before each step, but the frames after it as well. This can help the model make better predictions, as each frame in the audio will have more information before making a prediction. We use Gated Recurrent Unit (GRU’s) variant of RNN’s as it needs less computational resources than LSTM’s, and works just as well in some cases.</p><p>The model outputs a probability matrix for characters which we’ll use to feed into our decoder to extract what the model believes are the highest probability characters that were spoken.</p><pre>class CNNLayerNorm(nn.Module):<br>    &quot;&quot;&quot;Layer normalization built for cnns input&quot;&quot;&quot;<br>    def __init__(self, n_feats):<br>        super(CNNLayerNorm, self).__init__()<br>        self.layer_norm = nn.LayerNorm(n_feats)<br><br>    def forward(self, x):<br>        # x (batch, channel, feature, time)<br>        x = x.transpose(2, 3).contiguous() # (batch, channel, time, feature)<br>        x = self.layer_norm(x)<br>        return x.transpose(2, 3).contiguous() # (batch, channel, feature, time) <br><br><br>class ResidualCNN(nn.Module):<br>    &quot;&quot;&quot;Residual CNN inspired by https://arxiv.org/pdf/1603.05027.pdf<br>        except with layer norm instead of batch norm<br>    &quot;&quot;&quot;<br>    def __init__(self, in_channels, out_channels, kernel, stride, dropout, n_feats):<br>        super(ResidualCNN, self).__init__()<br><br>        self.cnn1 = nn.Conv2d(in_channels, out_channels, kernel, stride, padding=kernel//2)<br>        self.cnn2 = nn.Conv2d(out_channels, out_channels, kernel, stride, padding=kernel//2)<br>        self.dropout1 = nn.Dropout(dropout)<br>        self.dropout2 = nn.Dropout(dropout)<br>        self.layer_norm1 = CNNLayerNorm(n_feats)<br>        self.layer_norm2 = CNNLayerNorm(n_feats)<br><br>    def forward(self, x):<br>        residual = x  # (batch, channel, feature, time)<br>        x = self.layer_norm1(x)<br>        x = F.gelu(x)<br>        x = self.dropout1(x)<br>        x = self.cnn1(x)<br>        x = self.layer_norm2(x)<br>        x = F.gelu(x)<br>        x = self.dropout2(x)<br>        x = self.cnn2(x)<br>        x += residual<br>        return x # (batch, channel, feature, time)<br><br><br>class BidirectionalGRU(nn.Module):<br><br>    def __init__(self, rnn_dim, hidden_size, dropout, batch_first):<br>        super(BidirectionalGRU, self).__init__()<br><br>        self.BiGRU = nn.GRU(<br>            input_size=rnn_dim, hidden_size=hidden_size,<br>            num_layers=1, batch_first=batch_first, bidirectional=True)<br>        self.layer_norm = nn.LayerNorm(rnn_dim)<br>        self.dropout = nn.Dropout(dropout)<br><br>    def forward(self, x):<br>        x = self.layer_norm(x)<br>        x = F.gelu(x)<br>        x, _ = self.BiGRU(x)<br>        x = self.dropout(x)<br>        return x<br><br><br>class SpeechRecognitionModel(nn.Module):<br>    &quot;&quot;&quot;Speech Recognition Model Inspired by DeepSpeech 2&quot;&quot;&quot;<br><br>    def __init__(self, n_cnn_layers, n_rnn_layers, rnn_dim, n_class, n_feats, stride=2, dropout=0.1):<br>        super(SpeechRecognitionModel, self).__init__()<br>        n_feats = n_feats//2<br>        self.cnn = nn.Conv2d(1, 32, 3, stride=stride, padding=3//2)  # cnn for extracting heirachal features<br><br>        # n residual cnn layers with filter size of 32<br>        self.rescnn_layers = nn.Sequential(*[<br>            ResidualCNN(32, 32, kernel=3, stride=1, dropout=dropout, n_feats=n_feats) <br>            for _ in range(n_cnn_layers)<br>        ])<br>        self.fully_connected = nn.Linear(n_feats*32, rnn_dim)<br>        self.birnn_layers = nn.Sequential(*[<br>            BidirectionalGRU(rnn_dim=rnn_dim if i==0 else rnn_dim*2,<br>                             hidden_size=rnn_dim, dropout=dropout, batch_first=i==0)<br>            for i in range(n_rnn_layers)<br>        ])<br>        self.classifier = nn.Sequential(<br>            nn.Linear(rnn_dim*2, rnn_dim),  # birnn returns rnn_dim*2<br>            nn.GELU(),<br>            nn.Dropout(dropout),<br>            nn.Linear(rnn_dim, n_class)<br>        )<br><br>    def forward(self, x):<br>        x = self.cnn(x)<br>        x = self.rescnn_layers(x)<br>        sizes = x.size()<br>        x = x.view(sizes[0], sizes[1] * sizes[2], sizes[3])  # (batch, feature, time)<br>        x = x.transpose(1, 2) # (batch, time, feature)<br>        x = self.fully_connected(x)<br>        x = self.birnn_layers(x)<br>        x = self.classifier(x)<br>        return x</pre><h3>Picking the Right Optimizer and Scheduler — AdamW with Super Convergence</h3><p>The optimizer and learning rate schedule plays a very important role in getting our model to converge to the best point. Picking the right optimizer and scheduler can also save you compute time, and help your model generalize better to real-world use cases. For our model, we’ll be using <strong>AdamW</strong> with the <strong>One Cycle Learning Rate Scheduler</strong>. <strong>Adam</strong> is a widely used optimizer that helps your model converge more quickly, therefore, saving compute time, but has been notorious for not generalizing as well as <strong>Stochastic Gradient Descent</strong> AKA <strong>SGD</strong>.</p><p><strong>AdamW</strong> was first introduced in <a href="https://arxiv.org/abs/1711.05101">Decoupled Weight Decay Regularization</a>, and is considered a “fix” to <strong>Adam</strong>. The paper pointed out that the original <strong>Adam</strong> algorithm has a wrong implementation of weight decay, which <strong>AdamW</strong> attempts to fix. This fix helps with <strong>Adam</strong> ‘s generalization problem.</p><p>The <strong>One Cycle Learning Rate Scheduler</strong> was first introduced in the paper <a href="https://arxiv.org/abs/1708.07120">Super-Convergence: Very Fast Training of Neural Networks Using Large Learning Rates</a>. This paper shows that you can train neural networks an order of magnitude faster, while keeping their generalizable abilities, using a simple trick. You start with a low learning rate, which warms up to a large maximum learning rate, then decays linearly to the same point of where you originally started.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/800/1*anuZx5bSyspmGWGlp9ietw.jpeg" /></figure><p>Because the maximum learning rate is magnitudes higher than the lowest, you also gain some regularization benefits which helps your model generalize better if you have a smaller set of data.</p><p>With PyTorch, these two methods are already part of the package.</p><pre>optimizer = optim.AdamW(model.parameters(), hparams[&#39;learning_rate&#39;])<br>scheduler = optim.lr_scheduler.OneCycleLR(optimizer,<br>	max_lr=hparams[&#39;learning_rate&#39;],<br>	steps_per_epoch=int(len(train_loader)),<br>	epochs=hparams[&#39;epochs&#39;],<br>	anneal_strategy=&#39;linear&#39;)</pre><h3>The CTC Loss Function — Aligning Audio to Transcript</h3><p>Our model will be trained to predict the probability distribution of all characters in the alphabet for each frame (ie, timestep) in the spectrogram we feed into the model.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/803/1*GM8mOnGV8zz5OVt4QL9PjQ.png" /><figcaption>Image taken from distill.pub</figcaption></figure><p>Traditional speech recognition models would require you to align the transcript text to the audio before training, and the model would be trained to predict specific labels at specific frames.</p><p>The innovation of the CTC loss function is that it allows us to skip this step. Our model will learn to align the transcript itself during training. The key to this is the “blank” label introduced by CTC, which gives the model the ability to say that a certain audio frame did not produce a character. You can see a more detailed explanation of CTC and how it works from <a href="https://distill.pub/2017/ctc/">this excellent post</a>.</p><p>The CTC loss function is also built into PyTorch.</p><pre>criterion = nn.CTCLoss(blank=28).to(device)</pre><h3>Evaluating Your Speech Model</h3><p>When Evaluating your speech recognition model, the industry standard is using the Word Error Rate (WER) as the metric. The Word Error Rate does exactly what it says — it takes the transcription your model outputs, and the true transcription, and measures the error between them. You can see how that’s implemented <a href="https://colab.research.google.com/drive/1IPpwx4rX32rqHKpLz7dc8sOKspUa-YKO">here</a>. Another useful metric is called the Character Error Rate (CER). The CER measures the error of the characters between the model’s output and the true labels. These metrics are helpful to measure how well your model performs.</p><p>For this tutorial, we’ll use a “greedy” decoding method to process our model’s output into characters that can be combined to create the transcript. A “greedy” decoder takes in the model output, which is a softmax probability matrix of characters, and for each time step (spectrogram frame), it chooses the label with the highest probability. If the label is a blank label, we remove it from the final transcript.</p><pre>def GreedyDecoder(output, labels, label_lengths, blank_label=28, collapse_repeated=True):<br>    arg_maxes = torch.argmax(output, dim=2)<br>    decodes = []<br>    targets = []<br>    for i, args in enumerate(arg_maxes):<br>        decode = []<br>        targets.append(text_transform.int_to_text(labels[i][:label_lengths[i]].tolist()))<br>        for j, index in enumerate(args):<br>            if index != blank_label:<br>                if collapse_repeated and j != 0 and index == args[j -1]:<br>                    continue<br>                decode.append(index.item())<br>        decodes.append(text_transform.int_to_text(decode))<br>    return decodes, targets</pre><h3>Training and Monitoring Your Experiments Using Comet.ml</h3><p><a href="https://www.comet.ml/site/">Comet.ml</a> provides a platform that allows deep learning researchers to track, compare, explain, and optimize their experiments and models. Comet.ml has improved our productivity at AssemblyAI and we highly recommend using this platform for teams doing any sort of data science experiments. Comet.ml is super easy to set up. And works with just a few lines of code.</p><pre># initialize experiment object<br>experiment = Experiment(api_key=comet_api_key, project_name=project_name)<br>experiment.set_name(exp_name)<br><br># track metrics<br>experiment.log_metric(&#39;loss&#39;, loss.item())</pre><p><a href="https://www.comet.ml/site/">Comet.ml</a> provides you with a very productive dashboard where you can view and track your model’s progress.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*47U-COfhiP6wvEkr5Rzepg.png" /></figure><p>You can use Comet to track metrics, code, hyper parameters, your model’s graphs, among many other things! A really handy feature that Comet provides is the ability to compare your experiment among many other experiments.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*j926ql-Xkscq6BRmGH19eQ.png" /></figure><p>Comet has a rich feature set that we won’t cover all here, but we highly recommended using it for a productivity and sanity boost.</p><p>Here is the rest of our training script.</p><pre>class IterMeter(object):<br>    &quot;&quot;&quot;keeps track of total iterations&quot;&quot;&quot;<br>    def __init__(self):<br>        self.val = 0<br><br>    def step(self):<br>        self.val += 1<br><br>    def get(self):<br>        return self.val<br><br><br>def train(model, device, train_loader, criterion, optimizer, scheduler, epoch, iter_meter, experiment):<br>    model.train()<br>    data_len = len(train_loader.dataset)<br>    with experiment.train():<br>        for batch_idx, _data in enumerate(train_loader):<br>            spectrograms, labels, input_lengths, label_lengths = _data <br>            spectrograms, labels = spectrograms.to(device), labels.to(device)<br><br>            optimizer.zero_grad()<br><br>            output = model(spectrograms)  # (batch, time, n_class)<br>            output = F.log_softmax(output, dim=2)<br>            output = output.transpose(0, 1) # (time, batch, n_class)<br><br>            loss = criterion(output, labels, input_lengths, label_lengths)<br>            loss.backward()<br><br>            experiment.log_metric(&#39;loss&#39;, loss.item(), step=iter_meter.get())<br>            experiment.log_metric(&#39;learning_rate&#39;, scheduler.get_lr(), step=iter_meter.get())<br><br>            optimizer.step()<br>            scheduler.step()<br>            iter_meter.step()<br>            if batch_idx % 100 == 0 or batch_idx == data_len:<br>                print(&#39;Train Epoch: {} [{}/{} ({:.0f}%)]\tLoss: {:.6f}&#39;.format(<br>                    epoch, batch_idx * len(spectrograms), data_len,<br>                    100. * batch_idx / len(train_loader), loss.item()))<br><br><br>def test(model, device, test_loader, criterion, epoch, iter_meter, experiment):<br>    print(&#39;\nevaluating…&#39;)<br>    model.eval()<br>    test_loss = 0<br>    test_cer, test_wer = [], []<br>    with experiment.test():<br>        with torch.no_grad():<br>            for I, _data in enumerate(test_loader):<br>                spectrograms, labels, input_lengths, label_lengths = _data <br>                spectrograms, labels = spectrograms.to(device), labels.to(device)<br><br>                output = model(spectrograms)  # (batch, time, n_class)<br>                output = F.log_softmax(output, dim=2)<br>                output = output.transpose(0, 1) # (time, batch, n_class)<br><br>                loss = criterion(output, labels, input_lengths, label_lengths)<br>                test_loss += loss.item() / len(test_loader)<br><br>                decoded_preds, decoded_targets = GreedyDecoder(output.transpose(0, 1), labels, label_lengths)<br>                for j in range(len(decoded_preds)):<br>                    test_cer.append(cer(decoded_targets[j], decoded_preds[j]))<br>                    test_wer.append(wer(decoded_targets[j], decoded_preds[j]))<br><br><br>    avg_cer = sum(test_cer)/len(test_cer)<br>    avg_wer = sum(test_wer)/len(test_wer)<br>    experiment.log_metric(&#39;test_loss&#39;, test_loss, step=iter_meter.get())<br>    experiment.log_metric(&#39;cer&#39;, avg_cer, step=iter_meter.get())<br>    experiment.log_metric(&#39;wer&#39;, avg_wer, step=iter_meter.get())<br><br>    print(&#39;Test set: Average loss: {:.4f}, Average CER: {:4f} Average WER: {:.4f}\n&#39;.format(test_loss, avg_cer, avg_wer))<br><br><br>def main(learning_rate=5e-4, batch_size=20, epochs=10,<br>        train_url=&quot;train-clean-100&quot;, test_url=&quot;test-clean&quot;,<br>        experiment=Experiment(api_key=&#39;dummy_key&#39;, disabled=True)):<br><br>    hparams = {<br>        &quot;n_cnn_layers&quot;: 3,<br>        &quot;n_rnn_layers&quot;: 5,<br>        &quot;rnn_dim&quot;: 512,<br>        &quot;n_class&quot;: 29,<br>        &quot;n_feats&quot;: 128,<br>        &quot;stride&quot;: 2,<br>        &quot;dropout&quot;: 0.1,<br>        &quot;learning_rate&quot;: learning_rate,<br>        &quot;batch_size&quot;: batch_size,<br>        &quot;epochs&quot;: epochs<br>    }<br><br>    experiment.log_parameters(hparams)<br><br>    use_cuda = torch.cuda.is_available()<br>    torch.manual_seed(7)<br>    device = torch.device(&quot;cuda&quot; if use_cuda else &quot;cpu&quot;)<br><br>    if not os.path.isdir(&quot;./data&quot;):<br>        os.makedirs(&quot;./data&quot;)<br><br>    train_dataset = torchaudio.datasets.LIBRISPEECH(&quot;./data&quot;, url=train_url, download=True)<br>    test_dataset = torchaudio.datasets.LIBRISPEECH(&quot;./data&quot;, url=test_url, download=True)<br><br>    kwargs = {&#39;num_workers&#39;: 1, &#39;pin_memory&#39;: True} if use_cuda else {}<br>    train_loader = data.DataLoader(dataset=train_dataset,<br>                                batch_size=hparams[&#39;batch_size&#39;],<br>                                shuffle=True,<br>                                collate_fn=lambda x: data_processing(x, &#39;train&#39;),<br>                                **kwargs)<br>    test_loader = data.DataLoader(dataset=test_dataset,<br>                                batch_size=hparams[&#39;batch_size&#39;],<br>                                shuffle=False,<br>                                collate_fn=lambda x: data_processing(x, &#39;valid&#39;),<br>                                **kwargs)<br><br>    model = SpeechRecognitionModel(<br>        hparams[&#39;n_cnn_layers&#39;], hparams[&#39;n_rnn_layers&#39;], hparams[&#39;rnn_dim&#39;],<br>        hparams[&#39;n_class&#39;], hparams[&#39;n_feats&#39;], hparams[&#39;stride&#39;], hparams[&#39;dropout&#39;]<br>        ).to(device)<br><br>    print(model)<br>    print(&#39;Num Model Parameters&#39;, sum([param.nelement() for param in model.parameters()]))<br><br>    optimizer = optim.AdamW(model.parameters(), hparams[&#39;learning_rate&#39;])<br>    criterion = nn.CTCLoss(blank=28).to(device)<br>    scheduler = optim.lr_scheduler.OneCycleLR(optimizer, max_lr=hparams[&#39;learning_rate&#39;], <br>                                            steps_per_epoch=int(len(train_loader)),<br>                                            epochs=hparams[&#39;epochs&#39;],<br>                                            anneal_strategy=&#39;linear&#39;)<br><br>    iter_meter = IterMeter()<br>    for epoch in range(1, epochs + 1):<br>        train(model, device, train_loader, criterion, optimizer, scheduler, epoch, iter_meter, experiment)<br>        test(model, device, test_loader, criterion, epoch, iter_meter, experiment)</pre><p>The<strong> train</strong> function trains the model on a full epoch of data. The <strong>test</strong> function evaluates the model on test data after every epoch. It gets the<strong> test_loss</strong> as well as the <strong>cer</strong> and <strong>wer</strong> of the model. You can start running the training script right now with GPU support in the <a href="https://colab.research.google.com/drive/1IPpwx4rX32rqHKpLz7dc8sOKspUa-YKO">Google Colaboratory</a>.</p><h3>How to Improve Accuracy</h3><p>Speech Recognition Requires a ton of data and a ton of compute resources. The example laid out is trained on a subset of LibriSpeech (100 hours of audio) and a single GPU. To get state of the art results you’ll need to do distributed training on thousands of hours of data, on tens of GPU’s spread out across many machines.</p><p>Another way to get a big accuracy improvement is to decode the CTC probability matrix using a Language Model and the CTC beam search algorithm. CTC type models are very dependent on this decoding process to get good results. Luckily there is a handy <a href="https://github.com/parlance/ctcdecode">open source library</a> that allows you to do that.</p><p>This tutorial was made to be more accessible so it’s a relatively small model (23 million Parameters) compared to something like BERT (340 million Parameters). It seems to be the larger you can get your network, the better it performs, although there are diminishing returns. A larger model equating to better performance is not always the case though, as proven by OpenAI’s research <a href="https://openai.com/assets/deep-double-descent/">Deep Double Descent</a>.</p><p>This model has 3 residual CNN layers and 5 Bidirectional GRU layers which should allow you to train a reasonable batch size on a single GPU with at least 11GB of memory. You can tweak some of the hyper parameters in the main function to reduce or increase the model size for your use case and compute availability.</p><h3>Latest Advancements In Speech Recognition with Deep Learning</h3><p>Deep learning is a fast-moving field. It seems like you can’t go a week without some new technique getting state of the art results. Here are a few of things worth exploring int the world of speech recognition.</p><h4>Transformers</h4><p>Transformers have taken the Natural Language Processing world by storm! First Introduced in the paper <a href="https://arxiv.org/abs/1706.03762">Attention Is All You Need</a>, transformers have been taking and modified to beat pretty much all existing NLP task dethroning RNN’s type architectures. The Transformer’s ability to see the full context of sequence data is transferable to speech as well.</p><h4>Unsupervised Pre-training</h4><p>If you follow deep learning closely you’ve probably heard of BERT, GPT, and GPT2. These Transformer models have first pertained on a language modeling task with unlabeled text data, and fine-tuned on a wide array of NLP task and get state of the art results! During pre-training, the model learns something fundamental on the statistics of language and uses that power to excel at other tasks. We believe this technique has great promises on speech data as well.</p><h4>Word Piece Models</h4><p>Our model defined above output characters. Some benefits to that are the model doesn’t have to worry about out of vocabulary words when running inference on speech. So for the word <strong>c h a t</strong> each character has is its own label. The downside to using characters are inefficiency and the model being prone to more errors because you’re predicting one character at a time. Using the whole word as labels have been explored, to some degree of success. Using this method, the entire word <strong>chat</strong> would be the label. But using whole words, you would have to keep an index of all possible vocabularies to make a prediction, which is memory inefficient with the possibility of running into out of vocabulary words during prediction. The sweet spot would be using word piece or sub-word units as labels. Instead of characters for the individual label, you can chop up the words into sub-word units, and use those as labels, i.e. <strong>ch at</strong>. This solves the out of vocabulary issue, and is much more efficient, as it needs fewer steps to decode then using characters, and without the need to have an index of all possible words. Word pieces have been used successfully with many NLP models, like BERT and would work natural with speech recognition problems as well.</p><p><em>Originally published at </em><a href="https://www.comet.ml/site/customer-case-study-building-an-end-to-end-speech-recognition-model-in-pytorch-with-assemblyai/"><em>https://www.comet.ml</em></a><em> on May 18, 2020.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=cea744401fe8" width="1" height="1" alt=""><hr><p><a href="https://medium.com/comet-ml/customer-case-study-building-an-end-to-end-speech-recognition-model-in-pytorch-with-assemblyai-cea744401fe8">Customer Case Study: Building an end-to-end Speech Recognition model in PyTorch with AssemblyAI</a> was originally published in <a href="https://medium.com/comet-ml">Comet</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Predictive Early Stopping — A Meta Learning Approach]]></title>
            <link>https://medium.com/comet-ml/predictive-early-stopping-a-meta-learning-approach-99bf4bc6921d?source=rss----aeed698699d2---4</link>
            <guid isPermaLink="false">https://medium.com/p/99bf4bc6921d</guid>
            <category><![CDATA[meta]]></category>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[machine-learning]]></category>
            <dc:creator><![CDATA[Ashley Binford]]></dc:creator>
            <pubDate>Wed, 22 Apr 2020 13:36:55 GMT</pubDate>
            <atom:updated>2020-04-22T13:37:25.337Z</atom:updated>
            <content:encoded><![CDATA[<h3>Predictive Early Stopping — A Meta Learning Approach</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*fQFvzNy0v7QFe7SuYAIh2g.png" /></figure><p>Author: Dhruv Nair, Data Scientist, Comet.ml</p><h3>Introduction</h3><p>Predictive Early Stopping is a state-of-the-art approach for speeding up model training and hyperparameter optimization. Our benchmarking studies have shown that Predictive Early Stopping can speed up model training <em>by up to 30% independent</em> of the underlying infrastructure.</p><p>We build on insights gathered from projects such as Learning Curve Extrapolation, Hyperband, and Median Stopping, in order to create a predictive model that can estimate the convergence value of a loss curve.</p><p>Comet is able to leverage model data, such as hyperparameters and loss curves, from <em>over </em>two million models in the <em>public</em> section of its platform to create a model whose predictions generalize across hyperparameters and model architectures.</p><p>In some cases we are able to provide an estimate of convergence, hundreds of epochs before it actually occurs. In addition to predicting the convergence value, our Predictive Early Stopping product provides an estimate of the probability that the current model will outperform the best model result seen in the current training sweep.</p><p><em>In some cases we are able to provide an estimate of convergence, hundreds of epochs before it actually occurs.</em></p><p>These predictions allow us to terminate the training of underperforming models, so that the search process is spent evaluating only the most promising candidates.</p><h3>Benchmarking:</h3><p>We tested our Predictive Early Stopping method in three different settings:</p><ol><li>A hyperparameter search that optimizes the parameters of a function that acts as a surrogate for a neural network</li><li>A hyperparameter search to optimize a 6 layer CNN on CIFAR10 using the SMAC optimizer, with and without predictive early stopping.</li><li>A hyperparameter search to optimize the same 6 layer CNN using Random Search with Hyperband vs Random Search with Predictive Early Stopping.</li></ol><h3>Results for the Surrogate Function:</h3><p>In our first test, we setup an exponentially decaying function as our surrogate for a Neural Network. We ran this surrogate model for 20 steps and determined the optimal values for the parameters of this function using Comet’s Bayesian Optimizer and Predictive Early Stopping.During the hyperparameter search we observed that suboptimal models were not allowed to train the full 20 steps. Figure 1, illustrates our stopping mechanism.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/800/1*p8ipe27ujbKoVwMWJ0EGrQ.jpeg" /><figcaption>Figure 1. Surrogate Model Loss Curves</figcaption></figure><h3>Results for the CNN model with SMAC:</h3><p>Our benchmarking test for the CNN model was setup in the following way:</p><p>We used the SMAC optimizer to estimate the following hyperparameters in a 6-Layer CNN model. The model hyperparameters, and architecture were based on AlexNet.</p><pre>{<br>    &quot;learning_rate&quot;:{<br>        &quot;type&quot;:&quot;loguniform&quot;,<br>        &quot;value&quot;:[0.0000001, 0.01]<br>    },<br>    &quot;learning_rate_decay&quot;:{<br>        &quot;type&quot;: &quot;uniform&quot;,<br>        &quot;value&quot;:[0.000001, 0.001]<br>    },<br>    &quot;weight_decay&quot;: {<br>        &quot;type&quot;: &quot;loguniform&quot;,<br>        &quot;value&quot;: [0.0000005, 0.005]<br>    }<br>}</pre><p>We ran 8 trials of the optimizer, with and without Predictive Early Stopping. Each optimizer trial is given a 6 hour budget to evaluate as many configurations as possible. Each hyperparameter configuration was allowed to train for a maximum of 100 epochs, and the validation set was evaluated at the end of every epoch. The validation loss was used by our Predictive Early Stopping model to determine whether or not to terminate a hyperparameter configuration.</p><p>At the end of all the trials, we determined the mean value of the test loss across all trials as a function of the total number of epochs in the hyperparameter sweep that are required to achieve that loss value.</p><p>We can see in <strong>Figure 2</strong>, that using Predictive Early Stopping allows SMAC to get to a comparable loss value, almost 300 epochs faster. This is a 25% decrease in the amount of time spent doing hyperparameter optimization.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ByDaVQ4lCZXIoFF8oMYFyA.png" /><figcaption>Figure 2. Mean Test Loss across trials vs Total Number of Epochs</figcaption></figure><p>We also divided the hyperparameter configurations into quantiles, based on the final validation loss. We then calculated the average amount of epochs that the Optimizer spent in each quantile across all trials.</p><p>In <strong>Figure 3</strong>, we see that both SMAC and Predictive-Early-Stopping-SMAC spend roughly the same amount of time evaluating the top 25% and top 50% of configurations. However, Predictive Early Stopping spends 30 fewer epochs training models in the bottom 50% of results, and 20 fewer epochs in bottom 25% .</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*PjGNOcpGgGwp6jutjS3N_A.png" /></figure><p>In <strong>Figure 4</strong>, we see sample loss curves from a hyperparameter sweep with Predictive Early Stopping. Suboptimal configurations are stopped well before the total number of allowed training steps.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/800/1*hEo1RtcwZ9yrFmJ5-jZ-Lg.jpeg" /><figcaption>Figure 4. Sample validation loss curves from a hyperparameter sweep.</figcaption></figure><h3>Results for the CNN model with Hyperband:</h3><p>We setup the test for Hyperband in a similar manner to SMAC. We specifically used the <a href="https://optuna.readthedocs.io/en/latest/_modules/optuna/pruners/successive_halving.html#SuccessiveHalvingPruner">Asynchronous Successive Halving Pruner</a> implemented in <a href="https://optuna.org/">Optuna</a>. We can think of this as Hyperband with a single bracket. We selected 120 hyperparameter configurations at random. Each configuration was allotted a minimum resource of <strong>10 epochs, </strong>and allowed to train for a maximum of <strong>100 epochs. </strong>This leads to a maximum training budget of <strong>12000 epochs.</strong></p><p>At every evaluation point, the number of configurations are reduced by a factor of <strong>N </strong>based on the worst performing validation losses <strong>. </strong>In our experiments we evaluated Hyperband with <strong>N values of 2, 4 and 8.</strong></p><p>For the Predictive Early Stopping, we tested each configuration with different values of an <strong>interval</strong> parameter. Configurations were evaluated every 10, 15, and 20 epochs. At every evaluation we estimated the probability that the current configuration will be better than the best configuration seen so far. If this probability is less than a <strong>threshold, in our case 90%, </strong>we terminate the current configuration. <strong>Threshold</strong>, and <strong>Interval</strong> are both configurable hyperparameters for Predictive Early Stopping.</p><p>We then determine the best validation loss achieved in the hyperparameter sweep, and the number of epochs remaining in the budget after the sweep.</p><p>In <strong>Figure 5a, we see that all approaches find the same best value for the validation loss, </strong>however, Predictive Early Stopping is able to evaluate the configurations using just <strong>15% </strong>of the total budget, compared to Hyperband which uses <strong>25%. This is a 10%</strong> <strong>improvement in speed.</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*tIseFmsu7aH49C2M_yyG4A.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*_zHrp06YmcnpS0IeKZR9uA.jpeg" /><figcaption>Figure 5. Predictive Early Stopping vs Hyperband a) Best Value of Validation Loss b) Number of Epochs left in the Training Budget</figcaption></figure><h3>Conclusion</h3><p>Predictive Early Stopping has very obvious time, energy, and cost saving benefits. Wasted compute cycles aren’t good for the environment, or a researcher’s budget.</p><p>The <a href="https://allenai.org/">Allen Institute for AI</a> recently published a <a href="https://arxiv.org/pdf/1907.10597.pdf">report</a> on the rising computational costs of training machine learning models, and how these increasingly large energy requirements adversely affect the environment. The paper states that current advancements in state of the art AI research have largely focussed on metrics such as accuracy, or error, at the cost of being environmentally unfriendly. They call this paradigm, Red AI. To counter the prevalence of Red AI research, they propose a shift towards AI research that places an emphasis on computational efficiency: Green AI.</p><p>The paper recommends tracking the efficiency of an AI algorithm based on the total number of floating point operations (FPO’s) required to generate a result. The total number of FPO’s directly correlates with the number of hyperparameter configurations that are evaluated during tuning, as well as the number of training iterations spent on each configuration.</p><p>We hope our efforts with Predictive Early Stopping contribute towards increasing the computational efficiency of the hyperparameter search process. We see the this tool as a way to lower some of the monetary barriers associated with AI research, and as a step towards adopting Green AI practices.</p><p>In our next post we will describe applying predictive early stopping in individual runs that do not belong to a larger parameter search.</p><p><em>*Predictive Early Stopping is available as an add-on with the purchase of Comet Teams or Comet Enterprise. Patent protection is being sought on Predictive Early Stopping via one or more pending patent applications.</em><strong>Learn more and </strong><a href="https://www.comet.ml/site/what-is-meta-ml/"><strong>sign-up here</strong></a><strong>.</strong></p><p><em>Originally published at </em><a href="https://www.comet.ml/site/predictive-early-stopping/"><em>https://www.comet.ml</em></a><em> on April 20, 2020.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=99bf4bc6921d" width="1" height="1" alt=""><hr><p><a href="https://medium.com/comet-ml/predictive-early-stopping-a-meta-learning-approach-99bf4bc6921d">Predictive Early Stopping — A Meta Learning Approach</a> was originally published in <a href="https://medium.com/comet-ml">Comet</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Press Release: Dell EMC and Comet announce machine learning platform collaboration]]></title>
            <link>https://medium.com/comet-ml/press-release-dell-emc-and-comet-announce-machine-learning-platform-collaboration-8ba3207fd36d?source=rss----aeed698699d2---4</link>
            <guid isPermaLink="false">https://medium.com/p/8ba3207fd36d</guid>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[kubernetes]]></category>
            <category><![CDATA[dell]]></category>
            <category><![CDATA[data-science]]></category>
            <dc:creator><![CDATA[Ashley Binford]]></dc:creator>
            <pubDate>Mon, 30 Mar 2020 17:30:01 GMT</pubDate>
            <atom:updated>2020-03-30T17:30:01.526Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*f7rWvNyDZH14-5zti3uGVg.png" /></figure><p><strong>NEW YORK, NY -- </strong>, a leading provider of full-stack solutions for data science teams, and , the industry-leading meta machine learning experimentation platform, announced a collaboration with a reference architecture for data science teams looking to harness the power of the Dell EMC infrastructure in tandem with Comet’s meta machine learning platform. <a href="https://www.dellemc.com/resources/en-us/asset/white-papers/products/ready-solutions/dell-comet-machine-learning-wp.pdf">Read a whitepaper </a>, authored by Comet and Dell, on using Comet with Dell EMC AI-enabled infrastructure.</p><p>With Dell EMC PowerEdge reference architectures, organizations can deploy artificial intelligence workload-optimized rack systems approximately 6–12 months faster than it would have taken to design the correct configurations and deploy the solution. Organizations can now rely on architectures that are tested and validated by our Dell engineers and know that services are available when and where you need them.</p><p>“Orchestrating and managing the stack for enterprise data science teams is a huge pain point for many of our customers,” said Gideon Mendels, Co-founder/CEO, Comet. “Dell EMC’s Kubeflow and Kubernetes solutions are best-in-class and an excellent choice for any data science team looking to build a robust and scalable ML platform.”</p><p>Comet is a meta machine learning experimentation platform allowing users to automatically track their metrics, hyperparameters, dependencies, GPU utilization, datasets, models, debugging samples, and more. By leveraging Comet, data science teams produce faster research cycles, and more transparent and collaborative data science. Comet also provides a built-in hyperparameter optimization service, interactive confusion matrices, full code tracking and reproducibility features. Comet on-premise installations can support teams of any size, from a single machine to distributed microservices.</p><p>“This is one of those products that makes you question how you functioned without it. Comet gives data science teams all the automation and productivity features they need, but that they never get around to developing themselves,” says Phil Hummel, Senior Principal Engineer and Distinguished Member of Technical Staff, Dell EMC.</p><p>The Reference architecture utilizes Dell EMC AI-Enabled Kubernetes solution backed by Canonical’s <a href="https://ubuntu.com/kubernetes/docs/overview">Charmed Kubernetes </a>and Kubeflow that complies with all requirements of the AI workload. The solution includes 100% upstream Kubernetes latest code wrapped into easily consumable packages and supported by Canonical.</p><p>Dell EMC and Comet’s reference architecture and data science team user story illustrates how our joint solution can provide teams the tools and infrastructure they need to manage their machine learning workflows-data storage, experimentation and model building, and deployment-while providing flexible and robust deployment options as teams scale. To learn more about Dell EMC’s AI-Enabled Kubernetes Cluster options, read more or reach out to Dell EMC directly to <a href="https://www.delltechnologies.com/en-us/servers/reference-architectures.htm#accordion0&amp;accordion1&amp;accordion2">schedule a call </a>. To learn more about Comet’s meta-machine learning platform, read more about Comet or contact Comet’s <a href="https://www.comet.ml/site/contact-sales/">customer solutions team </a>for more information or to schedule a demo.</p><p>Read the <a href="https://www.dellemc.com/resources/en-us/asset/white-papers/products/ready-solutions/dell-comet-machine-learning-wp.pdf">full whitepaper here </a>that covers (a) using Comet with Dell EMC AI-enabled infrastructure and (b) technical installation instructions.</p><p><em>Originally published at </em><a href="https://www.comet.ml/site/dell-emc-and-comet-release-kubernetes-reference-architecture/"><em>https://www.comet.ml</em></a><em> on March 30, 2020.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=8ba3207fd36d" width="1" height="1" alt=""><hr><p><a href="https://medium.com/comet-ml/press-release-dell-emc-and-comet-announce-machine-learning-platform-collaboration-8ba3207fd36d">Press Release: Dell EMC and Comet announce machine learning platform collaboration</a> was originally published in <a href="https://medium.com/comet-ml">Comet</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How to Make Remote Work Effective for Data Science Teams]]></title>
            <link>https://medium.com/comet-ml/how-to-make-remote-work-effective-for-data-science-teams-4d12bf2c6c08?source=rss----aeed698699d2---4</link>
            <guid isPermaLink="false">https://medium.com/p/4d12bf2c6c08</guid>
            <category><![CDATA[data-science]]></category>
            <category><![CDATA[remote-work]]></category>
            <category><![CDATA[ai]]></category>
            <dc:creator><![CDATA[Ashley Binford]]></dc:creator>
            <pubDate>Mon, 30 Mar 2020 13:47:41 GMT</pubDate>
            <atom:updated>2020-03-30T13:47:41.358Z</atom:updated>
            <content:encoded><![CDATA[<p><em>This article was written in collaboration with </em><a href="https://medium.com/@tylerfolkman/e784dee2f208"><em>Tyler Folkman</em></a><em>, Head of AI at Branded Entertainment Network. To read more of Tyler’s writing, check out his </em><a href="https://medium.com/@tylerfolkman"><em>Medium Blog</em></a><em>.</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/904/1*LdOx3v3zn8PCIB-x5PurSg.png" /></figure><p>In 1973, at the height of the OPEC oil crisis and skyrocketing fuel prices, NASA scientist and USC professor Jack Nilles began thinking about ways work could be done without the need for commuting. Nilles’ thought experiments evolved into case studies, numerous books, including <a href="https://www.amazon.com/Telecommunications-Transportation-Tradeoff-Options-Tomorrow/dp/1419667297"><em>The Telecommunications-Transportation Tradeoff </em></a>the original book on telecommuting, as well as dozens of papers, articles and keynote speeches. To this day, Nilles remains one of the principal evangelists for remote work as a viable alternative to a traditional office.</p><p>Today, it would not be entirely hyperbolic to consider Nilles’ early work clairvoyant. The last decade has seen a dramatic rise in companies adopting a remote workforce. A <a href="https://www.flexjobs.com/blog/post/flexjobs-gwa-report-remote-growth/">2019 report </a>compiled by Flexjobs and Global Workplace Analytics found that the number of people telecommuting in the United States increased by 159% from 2005 to 2017. With the rapidly evolving global crisis surrounding COVID-19, forcing more and more companies to adopt strict work-from-home policies, remote work is further cementing itself as a workplace paradigm to be taken seriously.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/768/1*DI_CXtM5aHzPPnjJ6OMW7A.png" /></figure><p>The data science industry is no exception. Large computer, IT and software development industries are among the <a href="https://www.flexjobs.com/blog/post/100-top-companies-with-remote-jobs-2020/">fastest-growing </a>with respect to the share of employees working on a full or partially-remote basis. At , we see many data science teams going remote in some capacity (we, too, have several team members working on a fully remote basis). The perks of remote work are well-documented: a <a href="https://lp.buffer.com/state-of-remote-work-2020">joint report </a>published by Buffer and Angellist-a survey of more than 3,500 remote tech workers-found that a flexible schedule, the ability to work from anywhere, and not having a commute were among the most attractive benefits of remote work.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/768/1*gUtEUSAIyAjsoENs7tCFjQ.png" /></figure><p>Despite these benefits, putting the systems in place to make remote teams effective and productive is not trivial. Simple things like collaboration and communication become challenging. Employees are more prone to feel lonely, distracted, or to feel like the workday never ends. In data science teams, where industry best practices are <a href="https://www.comet.ml/site/why-software-engineering-processes-and-tools-dont-work-for-machine-learning/">still very much taking shape </a>, these issues can be even more pronounced.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/768/1*WgB5V0SER8ORmupI_Ldbug.png" /></figure><p>This post aims to highlight some work from home best practices, both general and data science-specific, in order to help data scientists and teams remain productive, connected and happy while working remotely.</p><h3>Best Practices for Members of Data Science Teams</h3><h3>Create a Productive Workspace</h3><p>Have a dedicated workspace (read: not your bed). Keep your phone away from your workspace and only check it during breaks. Be sure to keep your workspace clean-working in a messy environment can be incredibly distracting.</p><h3>Make sure to chat with your colleagues — even when you don’t have to</h3><p>Schedule a couple of video calls a day to stay sane, even if they’re not strictly necessary. Have at least one of these be a non-work related ‘remote coffee’ with a colleague/friend. Always put the camera on and try to enlarge the video call window so it really feels like you’re having a real conversation.</p><h3>Working habits</h3><p>Block time in your calendar for undistracted work time, a workout, lunch, etc. Encourage your colleagues to do the same. Over-communicate and assume good intent. A quick update message can go a long way in ensuring your manager is reassured with the work’s progress. Relatedly, agree a daily cadence to stay in touch with your teammates — e.g. a daily standup meeting each morning.</p><p>Have a clear ‘turn-off time’ (agreed with your team) — one of the biggest risks of remote is that you never switch off and stop working so better to be proactive on this one</p><h3>Tips for Managing Data Science Teams Remotely</h3><p>When thinking about how to manage a remote team it’s important to start by highlighting the key benefits and downsides of remote work.</p><p>At a high-level, the benefit to you as a manager is the potential of increased productivity for your team due to no commute, fewer distractions (hopefully), and more time to focus.</p><p>The downsides generally are less effective communication and fewer opportunities for collaboration. Some may argue you can be just as collaborative and communicative remotely, but as any economist would tell you: there is no free lunch. While remote teams do come with downsides, there are some very good strategies by which you can minimize them.</p><h3>Take Advantage of the Pros of Remote Work</h3><p>First, focus on and enable the strengths of remote work. You have just been given a team with the capacity to focus even more than before. Use that! In order to do so, you will need to do the following:</p><ol><li><strong>Trust your team. I</strong>f you take one thing away from how to manage a remote team well, let it be this: trust your team to work effectively and manage their time well. If you spend a lot of time doing more micromanaging you will give up almost all the benefits of remote work.</li><li><strong>Set clear expectations.</strong> If you can set clear work priorities with measurable milestones, you can let your team go to work and focus. At this point, working from home can be a huge advantage because of hopefully fewer distractions and more time to get work done.</li></ol><p>If you can set clear expectations and trust your team to get the work done, working remotely can be an advantage. For example, you could check-in at the beginning of the day with the team, set expectations, and then let everyone go to work.</p><h3>Build Systems and Processes to Counterbalance the Downsides</h3><p>Now — let’s discuss the downsides. Communication and collaboration. Focused work is great when you know what needs to be done and can accomplish it mostly on your own. But what about those serendipitous moments of in-person collaboration? How do you replicate that? I would argue that you can’t completely. Communication and collaboration are probably always going to be better in person (thus, no free lunch), but that doesn’t mean you can’t minimize the downsides of remote work. To do so, I would recommend the following:</p><ol><li><strong>Communicate over video. </strong>A lot of how we communicate is non-verbal and not turning on your video during a call hurts your ability to communicate.</li><li><strong>Don’t always go straight to business in your meetings.</strong> With a remote team, you don’t get time to have “water cooler” discussions. Spend some time in meetings, when appropriate, just talking to stay connected.</li><li><strong>Have scheduled, remote-friendly team building activities.</strong> The “water cooler” discussions should happen every day, but I would also suggest a monthly activity with concentrated time to relax and get to know each other. One of our team’s favorites is .</li><li><strong>When the next steps are not clear and you need creative collaboration, do remote brainstorming using the whiteboard feature on video conferencing platforms.</strong> Don’t just get in a virtual meeting and start discussing ideas. Send out the goal in writing beforehand, have people brainstorm individually and bring ideas to the meeting, and allow everyone to share his or her ideas, then discuss and prioritize. This is sometimes called Silent Brainstorming and is very remote-friendly and tends to be more effective.</li><li><strong>Develop a culture of radical candor and psychological safety.</strong> One of your weaknesses is now communication because you are remote. Make sure your culture is especially strong in being open and honest with feedback. Both positive and negative! As a leader, be an example in asking for, giving, and receiving feedback. And make sure everyone feels safe in expressing ideas and giving opinions.</li></ol><p>These steps should help build camaraderie and trust within your remote team, both of which are necessary for strong communication and collaboration. You don’t have the luxury of falling back on serendipitous moments of in-person collaboration or the post-meeting discussions that happen when people are in the same room.</p><h3>Invest in Tools to Encourage Collaboration</h3><p>There are amazing tools that you can leverage to make you even more effective with your communication and collaboration.</p><h4>Zoom</h4><p>A good video conferencing tool is indispensable for all teams, including and especially teams who work remote. We use zoom every day for meetings with remote team members. Whatever video conferencing tool you choose, be sure it’s easily accessible so your team can have as little friction as possible getting on the phone with colleagues.</p><h4>Slack</h4><p>Real-time messaging allows the flow of information across a team to be ad-hoc, conversational and informal. These are crucial values to ensure you maintain the ability for your team to develop ideas easily , organically, and collaboratively. Slack is a popular and excellent tool that allows teams to do just this.</p><h4>Comet</h4><p>Data Science teams are prone to becoming packs of lone-wolf modelers even when working in the same place. With the switch to remote, it’s even easier to fall into this trap. Fortunately tools exist that make it far easier for data scientists, machine learning engineers, or anyone working on models to log, visualize, share and reproduce their work across distributed teams in real time. We at Comet provide a meta-machine learning platform, runnable in the cloud or on-premise/VPC, that allows data science teams to do just this: reproduce full experiments (and not just code), manage users across large distributed data science teams, and provide managers insight into team contributions and performance.</p><p>Comet allows data science teams to easily manage distributed teams by creating collaborative projects with many users:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/768/1*89toymJvceDfB_mZ3llKTw.png" /></figure><p>If your team is part of a collaborative project, every data scientist can publish their experiments in one central location, where visualizing, comparing, analyzing and debugging team-wide work becomes easy to do-even when working remotely:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/768/1*1WuJAgkszXuTkwRjkls2Fw.png" /></figure><h3>Conclusion</h3><p>With COVID-19 forcing many teams into remote work, members and managers of newly-remote teams will be well-served taking stock of how to make the most of their new telecommute. Teams that take advantage of remote work’s benefits will remain productive, communicative and happy. What’s more, safeguards and processes can be put in place to effectively counterbalance many of the common challenges remote teams face. Do yourself a favor and schedule a 15-minute video call with one of your coworkers later today. It will be time well-spent.</p><p><em>Originally published at </em><a href="https://www.comet.ml/site/how-to-make-remote-work-effective-for-data-science-teams/"><em>https://www.comet.ml</em></a><em> on March 20, 2020.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=4d12bf2c6c08" width="1" height="1" alt=""><hr><p><a href="https://medium.com/comet-ml/how-to-make-remote-work-effective-for-data-science-teams-4d12bf2c6c08">How to Make Remote Work Effective for Data Science Teams</a> was originally published in <a href="https://medium.com/comet-ml">Comet</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Why software engineering processes and tools don’t work for machine learning]]></title>
            <link>https://medium.com/comet-ml/why-software-engineering-processes-and-tools-dont-work-for-machine-learning-20698ac935f2?source=rss----aeed698699d2---4</link>
            <guid isPermaLink="false">https://medium.com/p/20698ac935f2</guid>
            <category><![CDATA[artificial-intelligence]]></category>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[software-engineering]]></category>
            <category><![CDATA[data-science]]></category>
            <dc:creator><![CDATA[Gideon Mendels]]></dc:creator>
            <pubDate>Thu, 05 Dec 2019 14:16:15 GMT</pubDate>
            <atom:updated>2019-12-05T14:16:15.557Z</atom:updated>
            <content:encoded><![CDATA[<p>Author: Niko Laskaris, Data Scientist, Comet.ml</p><p>“AI is the new electricity.” At least, that’s what <a href="https://www.coursera.org/instructor/andrewng">Andrew Ng</a> suggested at this year’s <a href="https://remars.amazon.com/">Amazon re:MARS</a> conference. In his <a href="https://www.youtube.com/watch?v=j2nGxw8sKYU">keynote address</a>, Ng discussed the rapid growth of artificial intelligence (AI) — its steady march into industry after industry; the unrelenting presence of AI breakthroughs, technologies, or fears in the headlines each day; the tremendous amount of investment, both from established enterprises seeking to modernize (see: <a href="https://www.engadget.com/2019/11/19/sony-ai/">Sony</a>, a couple of weeks ago) as well as from venture investors parachuting into the market riding a wave of AI-focused founders.</p><p>“AI is the next big transformation,” Ng insists, and we’re watching the transformation unfold.</p><p>While AI may be the new electricity (and as a Data Scientist at <a href="http://comet.ml/">Comet</a>, I don’t need much convincing), significant challenges remain for the field to realize this potential.<strong> In this blog post, I’m going to talk about why data scientists and teams can’t rely on the tools and processes that software engineering teams have been using for the last 20 years for machine learning</strong> <strong>(ML).</strong></p><p>The reliance on the tools and processes of software engineering makes sense — data science and software engineering are both disciplines whose principal tool is<em> code</em>. Yet <em>what is being done</em> in data science teams is radically different from what is being done in software engineering teams. An inspection of the core differences between the two disciplines is a helpful exercise in clarifying how we should think about structuring our tools and processes for doing AI.</p><p>At Comet, we believe the adoption of tools and processes designed specifically for AI will help practitioners unlock and enable the type of revolutionary transformation Ng is speaking about.</p><h3>Different Disciplines, Different Processes</h3><p>Software engineering is a discipline whose aim is, considered broadly, the design and implementation of programs that a computer can execute to perform a defined function. Assuming the input to a software program is within the expected (or constrained) range of inputs, its behavior is knowable. In a <a href="https://leon.bottou.org/talks/2challenges">talk</a> at ICML in 2015, Leon Bottou formulated this well: in software engineering an algorithm or program can be proven <em>correct</em>, in the sense that given particular assumptions about the input, certain properties will be true when the algorithm or program terminates.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/600/0*ho2psbJmCXEWFV7F" /></figure><p>The provable correctness of software programs has shaped the tools and processes we have built for doing software engineering. Consider one corollary characteristic of software programming that follows from provable correctness: if a program is provably correct for some input values, then the program contains sub-programs that are also provably correct for those input values. This is why engineering processes like <a href="https://en.wikipedia.org/wiki/Scaled_agile_framework">Agile</a> are, broadly speaking, successful and productive for software teams. Breaking apart these projects into sub-tasks works. Most <a href="https://en.wikipedia.org/wiki/Waterfall_model">waterfall</a> and <a href="https://en.wikipedia.org/wiki/Scrum_(software_development)">scrum</a> implementations also include sub-tasking as well.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/597/0*ILn_XkvoYVWI0Vjb.png" /></figure><p>We see a lot of data science teams using workflow processes that are identical or broadly similar to these software methodologies. Unfortunately, they don’t work very well. The reason? The provable correctness of software engineering does not extend to AI and machine learning. In (supervised) machine learning, the only guarantee we have about a model we’ve built is that if the training set is an <a href="https://en.wikipedia.org/wiki/Independent_and_identically_distributed_random_variables">iid</a> (independent and identically distributed) sample from some distribution, then performance on another iid sample from the same distribution will be <em>close</em> to the performance on the training set. Because uncertainty is an intrinsic property of machine learning, sub-tasking can lead to unforeseeable downstream effects.</p><h3>Why is uncertainty intrinsic to machine learning?</h3><p>Part of the answer lies in the fact that the problems that are both (a) interesting to us and (b) amenable to machine learning solutions (self-driving cars, object recognition, labeling images, and generative language models, to name a few) do not have a clear reproducible mathematical or programmatic specification. In place of specifications, machine learning systems feed in lots of data in order to detect patterns and generate predictions. Put another way, the <em>purpose of machine learning is to create a statistical proxy that can serve as a specification for one of these tasks</em>. We hope our collected data is a representative subsample of the real-world distribution, but in practice we cannot know exactly how well this condition is met. Finally, the algorithms and model architectures we use are complex, sufficiently complex that we cannot always break them apart into sub-models to understand precisely what is happening.</p><p>From this description, obstacles to the <em>knowability</em> of machine learning systems should be somewhat obvious. Inherent to the types of problems amenable to machine learning is a lack of a clear mathematical specification. The statistical proxy we use in the absence of a specification is accumulating lots of environmental data we <em>hope</em> is iid and representative. And the models we use to extract patterns from this collected data are sufficiently complex that we cannot reliably break them apart and understand precisely how they work. My colleague at Comet, Dhruv Nair, has written a three-part series on uncertainty in machine learning (here’s a link to <a href="https://www.comet.ml/blog/?p=662">Part I</a>) if you’d like to dig deeper into this topic.</p><p>Consider, then, the implications for something like the Agile methodology used on a machine learning project. We cannot possibly hope to break machine learning tasks into <em>sub-tasks</em>, tackled as part of some larger sprint and then pieced together like legos into a whole product, platform, or feature, because we cannot reliably predict how the sub-models, or the model itself, will function.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/887/0*WQzEUqac33MjiFPU" /></figure><p>Ng discussed this topic at re:MARS as well. He revealed how his team adopted a workflow system designed specifically for ML: <strong>1 day sprints</strong>, structured as follows:</p><ol><li>Build models and write code each day</li><li>Set up training and run experiments overnight</li><li>Analyze results in the morning and…</li><li>Repeat</li></ol><p>Ng’s 1 day sprints methodology reflects something crucial to understanding and designing teams that practice machine learning: it is an inherently <strong>experimental science</strong>. Because the systems being built lack a clear specification, because data collection is an imperfect science, and because machine learning models are incredibly complex, <em>experimentation is necessary</em>. Rather than structuring team processes around a multi-week sprint, it is usually more fruitful to test out many different architectures, feature engineering choices, and optimization methods rapidly until a rough image of what is working and what isn’t starts to emerge. 1 day sprints allow teams to move quickly, test many hypotheses in a short amount of time, and begin building intuition and knowledge around a modeling task.</p><h3>Tools for ML: Experiment Management</h3><p>Let’s say you adopt Andrew Ng’s 1 day sprints methodology or something similar ( <em>and you should</em>). You’re setting new hyperparameters, tweaking your feature selections, and running experiments each night. What tool are you using to keep track of these decisions for each model training? How are you comparing experiments to see how different configurations are working? How are you sharing experiments with co-workers? Can your manager or co-worker reliably reproduce an experiment you ran yesterday?</p><p>In addition to processes, the tools you use to do machine learning matter as well. At Comet, our mission is to help companies extract business value from machine learning by providing a tool that does this for you. Most of the data science teams we speak to are stuck using a combination of git, emails, and (believe it or not) spreadsheets to record all of the artifacts around each experiment.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*tbxxxc1Gyk9Gv-YJ" /></figure><p>Consider a modeling task where you’re keeping track of 20 hyperparameters, 10 metrics, dozens of architectures and feature engineering techniques, all while iterating quickly and running dozens of models a day. It can become incredibly tedious to manually track all of these artifacts. Building a good ML model can oftentimes resemble tuning a radio with 50 knobs. If you don’t keep track of all of the configurations you’ve tried, the combinatorial complexity of finding the signal in your modeling space can become cumbersome.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*98h-NJhrcLFEdub_" /></figure><p>We’ve built Comet based on these needs (and what we wanted when we were working on data science and machine learning ourselves, at Google, IBM, and as part of research groups at Columbia University and Yale University). Every time you train a model, there should be <em>something</em> to capture all of the artifacts of your experiment and save them in some central ledger where you can look up, compare, and filter through all of your (or your team’s) work. Comet was built to provide this function to practitioners of machine learning.</p><p>Measuring workflow efficiency is a <a href="https://gravityflow.io/articles/measure-workflow-automations-roi/">notoriously difficult</a> thing to do, but on average our users report <em>20–30% time savings by using Comet</em> (note: Comet is free for individuals and researchers — <a href="https://www.comet.ml/pricing?opensignup=true&amp;utm_source=Software%20Eng%20vs%20ML&amp;utm_medium=Blog&amp;utm_campaign=Software%20Eng%20vs%20ML%20Blog%20Post">you can sign-up here</a>). This doesn’t take into account unique insights and knowledge that arise from having insights to things like a visual understanding of your hyperparameter space, real-time metric tracking, team-wide collaboration and experiment comparison. Access to this knowledge enables time savings as well as, and perhaps more importantly, the ability to <em>build better models</em>.</p><h3>Looking Ahead</h3><p>It is tempting to ignore questions about ML tools and processes altogether. In a field responsible for self-driving cars, voice assistants, facial recognition, and many more groundbreaking technologies, one may be forgiven for leaping into the fray of building these tools themselves and not considering how best to build them.</p><p>If you are convinced that the software engineering stack works <em>well enough</em> for doing AI, you will not be proven definitively right or wrong. After all, this is a field defined by uncertainty. But perhaps it is best to consider this in the way a data scientist may consider a modeling task: what is the probability distribution of possible futures? What is more or less likely? <strong>That a field as powerful and promising as AI will continue to rely on the tools and processes built for a different discipline, or that new ones will emerge to empower practitioners to the fullest?</strong></p><p><em>If you are curious about these ML tools or have any questions, feel free to reach out to me at </em><a href="/service/mailto:niko@comet.ml"><em>niko@comet.ml</em></a><em>.</em></p><p><strong>Additional Reading</strong><br>Blogs on the differences between Machine Learning and Software Engineering:</p><ol><li><a href="https://www.futurice.com/blog/differences-between-machine-learning-and-software-engineering/">Futurice Blog on ML vs Software Engineering</a></li><li><a href="https://www.kdnuggets.com/2017/03/software-engineering-vs-machine-learning-concepts.html">KD Nuggets Blog on ML vs Software Engineering</a></li><li><a href="https://blog.concurlabs.com/10-differences-between-ml-and-software-development-part-1-3e21a83094d1">Concur Labs Blog on ML vs Software Engineering</a></li><li><a href="https://www.microsoft.com/en-us/research/uploads/prod/2019/03/amershi-icse-2019_Software_Engineering_for_Machine_Learning.pdf">Microsoft Case Study on Building ML Team Processes</a></li><li><a href="https://icml.cc/2015/invited/LeonBottouICML2015.pdf">Leon Bottou Slides from 2015 ICML Talk</a></li></ol><p><em>Originally published at </em><a href="https://www.comet.ml/blog/?p=1183"><em>https://www.comet.ml</em></a><em> on December 4, 2019.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=20698ac935f2" width="1" height="1" alt=""><hr><p><a href="https://medium.com/comet-ml/why-software-engineering-processes-and-tools-dont-work-for-machine-learning-20698ac935f2">Why software engineering processes and tools don’t work for machine learning</a> was originally published in <a href="https://medium.com/comet-ml">Comet</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>