<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Guillaume Chevalier</title>
    <description>The latest articles on DEV Community by Guillaume Chevalier (@guillaumechevalier).</description>
    <link>https://dev.to/guillaumechevalier</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F298269%2Fd8df91bb-53e5-4c14-8b82-88341b166de8.jpeg</url>
      <title>DEV Community: Guillaume Chevalier</title>
      <link>https://dev.to/guillaumechevalier</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/guillaumechevalier"/>
    <language>en</language>
    <item>
      <title>How to unit test machine learning code?</title>
      <dc:creator>Guillaume Chevalier</dc:creator>
      <pubDate>Wed, 25 Aug 2021 20:12:56 +0000</pubDate>
      <link>https://dev.to/neuraxio/how-to-unit-test-machine-learning-code-48a1</link>
      <guid>https://dev.to/neuraxio/how-to-unit-test-machine-learning-code-48a1</guid>
      <description>&lt;p&gt;Why are unit tests important? Why is testing important? How to do it for machine learning code? Those are questions I will answer. &lt;/p&gt;

&lt;p&gt;I suggest that you grab a good coffee while you read what follows. If you write AI code at Neuraxio, or if you write AI code using software that Neuraxio distributed, this article is especially important for you to grasp what's going on with the testing and how it works.&lt;/p&gt;

&lt;h2&gt;
  
  
  The testing pyramid
&lt;/h2&gt;

&lt;p&gt;Have you ever heard fo the testing pyramid? Martin Fowler has a nice article on this topic &lt;a href="https://martinfowler.com/articles/practical-test-pyramid.html"&gt;here&lt;/a&gt;. To summarize what it is: you should have LOTS OF small "unit" tests that are testing small components of your software, and then a FEW "integration" tests that are medium-sized (and will probably test your service application layer), and then VERY FEW "end-to-end" (E2E) tests that will test the whole thing at once (probably using your AI backend's REST API) with a real and complete use-case that does everything to see if everything works together. It makes a pyramid: unit tests at the bottom,  &lt;/p&gt;

&lt;p&gt;Why this different quantity of tests with these granularitues? So we have a pyramid of tests like this:&lt;/p&gt;

&lt;p&gt;/__ VERY FEW end-to-end (large) tests; __\&lt;/p&gt;

&lt;p&gt;/______ FEW integration (medium) tests; ______\&lt;/p&gt;

&lt;p&gt;*&lt;em&gt;/___________ LOTS OF unit (small) tests. ___________*&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Note that the integration tests are sometimes also called acceptance tests. They may differ depending on where you work at, as different terminology is used. I personnaly prefer acceptation tests, so as to reffer to the business acceptation of a test case. Like if an acceptation test case is a business requirement written into code.  &lt;/p&gt;

&lt;p&gt;Suppose that in your daily work routine, you edit some code to either fix a bug, measure something in your code, or introduce new features. You will change something thinking that it helps. The following will eventually happen as you are not perfect and probably do errors and mistakes from time to time. How often have your code worked on the 1st try?&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Without tests at all: you will catch the bug 2 weeks later and probably have no clue where it is and how to fix it. The cost to fix this test will be 10x than if you knew it at the start when you coded it.&lt;/li&gt;
&lt;li&gt;With large &amp;amp; medium tests but no unit tests: you will know instantly upon doing the change that something is wrong. But you don't know for sure exactly where it is in your code. The cost to fix this test will be 3x what it'd be compared to if you knew where it was with unit tests.&lt;/li&gt;
&lt;li&gt;With small unit tests: not only you'll instantly that you have a bug upon doing the change and running the test, but chances are, if you have a good code coverage with your unit tests (say 80%), that you have a unit test testing the piece of software that you've just modified and you'll know instantly and exactly where you have a bug and why.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;To sum up: unit testing gives you, and especially your team, some considerable speed. Rare are the programmers who like to be stuck just debugging software. Cut the debugging times by using unit tests, and not only will everyone be happy, but also everyone will code faster.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;"Understanding code is by far the activity at which professional developers spend most of their time."  &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Source: &lt;a href="https://blog.codinghorror.com/when-understanding-means-rewriting/"&gt;https://blog.codinghorror.com/when-understanding-means-rewriting/&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  Unit tests
&lt;/h2&gt;

&lt;p&gt;A unit test has 3 parts, they are called the &lt;a href="https://medium.com/@pjbgf/title-testing-code-ocd-and-the-aaa-pattern-df453975ab80"&gt;AAA steps of a unit test&lt;/a&gt;:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Arrange: create variables or constants that will be used in the next Act phase. If the variables are created in many tests, they can be extracted at the top of the test file or elsewhere to limit code duplication (or the test can even be parametrized as in the second image example later on). &lt;/li&gt;
&lt;li&gt;Act: call your code to test using the variables or constants set up just above in the Arrange, and receive a result. &lt;/li&gt;
&lt;li&gt;Assert: verify that the result you obtained in the Act phase matches what you'd expect. &lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Example #1 of the AAA in a ML unit test:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--jKdTMVuU--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn.shopify.com/s/files/1/0277/9958/4838/files/AAA-unit-test.jpg%3Fv%3D1629920287" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--jKdTMVuU--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn.shopify.com/s/files/1/0277/9958/4838/files/AAA-unit-test.jpg%3Fv%3D1629920287" alt="Unit Testing in Python with PyTest. AAA: Arrange, Act, Assert steps for Machine Learning."&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;[&lt;a href="https://github.com/Neuraxio/Neuraxle/blob/796f6243e9fd3ab8ba674d44ef655240f48f1edd/testing/steps/test_choose_one_or_many_steps_of.py#L419"&gt;Click here to read whole original code file for the code above&lt;/a&gt;]  &lt;/p&gt;

&lt;p&gt;See how the test is first set-upped (arranged) at the beginning? The test above is even further setupped using an argument in the test function, meaning that this test can be ran again and again with different arguments to test using PyTest's parametrize. &lt;a href="https://github.com/Neuraxio/Neuraxle/blob/3091bbc175be33b3b415386cf8a4dc79ce48d368/testing/steps/test_features.py#L81"&gt;Here is a good example of a well-parametrized unit test that also makes use of the AAA&lt;/a&gt;.  &lt;/p&gt;

&lt;p&gt;Example #2 of the AAA in a ML unit test:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--SAeL1_cA--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn.shopify.com/s/files/1/0277/9958/4838/files/AAA-unit-test-2.jpg%3Fv%3D1629920345" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--SAeL1_cA--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn.shopify.com/s/files/1/0277/9958/4838/files/AAA-unit-test-2.jpg%3Fv%3D1629920345" alt="PyTest fixture @pytest.mark.parametrize(...) Unit Test in Python"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;[&lt;a href="https://github.com/Neuraxio/Neuraxle/blob/167d2e741a233a6019f6f89767d0cfd08cd0ff72/testing/test_pipeline.py#L45"&gt;click here to read whole original code file for the code above&lt;/a&gt;]  &lt;/p&gt;

&lt;p&gt;In the test above, written by Alexandre Brillant, we also see the AAA. At first, we create a ML pipeline, data inputs (X), and expected outputs (y). Then, we act: we call "fit_transform" on the pipeline to get a prediction result (Y). Then, we assert: we check that the prediction result matches what we expected (y==Y). That is a very stupid and simple test, although, it can catch many bugs.  &lt;/p&gt;

&lt;p&gt;Unit tests in ML rarely use lots of data. Most of the time, they use small hand-design data samples just to check if things compile or so.  &lt;/p&gt;

&lt;p&gt;You'd then use medium-sized fake (or sometimes real) datasets in acceptance tests (medium integration tests), and real data in the end-to-end tests.  &lt;/p&gt;

&lt;p&gt;Sometimes, a unit test will test more than one thing. For instance, you'll test two things, because in your "Arrange" part you'll use something else. Hopefully, this something else was already tested individually with another test. And sometimes you could use what is called "mocks" or "stubs" to ensure you don't use two things in the same test, although mocking is a bit more advanced and more used in Java (less in Python), you can read about mocks and stubs &lt;a href="https://en.wikipedia.org/wiki/Mock_object"&gt;here&lt;/a&gt;. Personnally, I often prefer writing stubs rather than writing mocks, as stubs feels more straightforward to use across many different unit tests.&lt;/p&gt;

&lt;h2&gt;
  
  
  The TDD loop
&lt;/h2&gt;

&lt;p&gt;It naturally emerges that someone who do unit tests will do this 3-steps loop:  &lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;RED: write a unit test that fails; &lt;/li&gt;
&lt;li&gt;GREEN: make the test pass by writing proper code; &lt;/li&gt;
&lt;li&gt;BLUE: refactor the code by cleaning a bit what you've just written before moving on.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Therefore, by coding software that you test, you will do cycles of 1, 2, 3, 1, 2, 3, 1, 2, 3... and so forth. It is strongly recommended to start with writing the test that fails (red). Why? It is because it will put you in the shoes of someone using the code that you are about to write. It will start by making you think about your code's API or public function design. Plus, as per the &lt;a href="https://www.umaneo.com/post/the-solid-principles-applied-to-machine-learning"&gt;SOLID principles (applied to Machine Learning)&lt;/a&gt;, it will help you respect the DIP (&lt;a href="https://en.wikipedia.org/wiki/Dependency_inversion_principle"&gt;Dependency Inversion Principle&lt;/a&gt;) by probably setting up something in your test (in the first AAA phase: "Arrange") and then you'll pass it to the class that you are about to test. This will effectively apply dependency inversion (DIP) to your code by passing things around as arguments and creating them outside, instead of creating them inside the classes that you test.  &lt;/p&gt;

&lt;p&gt;Obviously, by doing the TDD loop, you'll often re-run your whole unit test suite to ensure you didn't break things around in the rest of the codebase nearby.  &lt;/p&gt;

&lt;h2&gt;
  
  
  The ATDD loop
&lt;/h2&gt;

&lt;p&gt;The ATDD loop is an improvement to the TDD loop. It is summarized as follow:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;em&gt;ATDD: Write an acceptance test first, and then do many TDD loops to fulfill this acceptance test.&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Why do so? Well, acceptance tests are medium-sized tests, compared to our small-sized unit tests. If you need to do the test beforehand, then you probably want to write an acceptance test that is a medium test case, and then within your acceptance test "medium TDD" loop, you'll encounter lots of smaller parts to solve where you'll do lots of "small TDD" unit test loops.  &lt;/p&gt;

&lt;p&gt;So the ATDD loop looks like this:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Acceptance RED: write an acceptance test that fails; &lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Acceptance GREEN: make the test pass by writing proper code; &lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;1. Unit RED: write a unit test that fails;
&lt;/li&gt;
&lt;/ol&gt;


&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Unit GREEN: make the test pass by writing proper code;  &lt;/p&gt;&lt;/li&gt;
&lt;li&gt;

&lt;p&gt;Unit BLUE: refactor the code by cleaning a bit what you've just written before moving on.  &lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;1. Unit RED: write a unit test that fails;
&lt;/li&gt;
&lt;/ol&gt;


&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Unit GREEN: make the test pass by writing proper code;  &lt;/p&gt;&lt;/li&gt;
&lt;li&gt;

&lt;p&gt;Unit BLUE: refactor the code by cleaning a bit what you've just written before moving on.  &lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;1. Unit RED: write a unit test that fails;
&lt;/li&gt;
&lt;/ol&gt;


&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Unit GREEN: make the test pass by writing proper code;  &lt;/p&gt;&lt;/li&gt;
&lt;li&gt;

&lt;p&gt;Unit BLUE: refactor the code by cleaning a bit what you've just written before moving on.  &lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;[Continue TDD loops as long as required to solve the acceptance test...]&lt;/li&gt;
&lt;/ol&gt;


&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Acceptance BLUE: refactor the code by cleaning a bit what you've just written before moving on.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Other tests
&lt;/h2&gt;

&lt;p&gt;Of course, there are more types of test. Some people do "border" tests, "database" tests, cloud "environment" tests, "uptime" tests (as in SLAs with uptime warranties), and more. But the 3 types of test presented above (E2E, acceptance/integration, unit) are the real deal for coding proper enterprise software.  &lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;"One difference between a smart programmer and a professional programmer is that the professional understands that clarity is king. Professionals use their powers for good and write code that others can understand."&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Source: Robert C. Martin, &lt;a href="https://www.amazon.ca/Clean-Code-Handbook-Software-Craftsmanship/dp/0132350882"&gt;Clean Code: A Handbook of Agile Software Craftsmanship&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  Neuraxio AI Programmer
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Did you like this article? This article is part of our &lt;em&gt;Neuraxio AI Programmer&lt;/em&gt; email series. Register below! Or by clicking &lt;a href="https://www.members.neuraxio.com/ai-programmer-training"&gt;here&lt;/a&gt;.&lt;/strong&gt; &lt;/p&gt;

</description>
    </item>
    <item>
      <title>What's Wrong with Scikit-Learn Pipelines?</title>
      <dc:creator>Guillaume Chevalier</dc:creator>
      <pubDate>Wed, 25 Aug 2021 16:35:00 +0000</pubDate>
      <link>https://dev.to/neuraxio/what-s-wrong-with-scikit-learn-pipelines-5371</link>
      <guid>https://dev.to/neuraxio/what-s-wrong-with-scikit-learn-pipelines-5371</guid>
      <description>&lt;blockquote&gt;
&lt;p&gt;Scikit-Learn’s “pipe and filter” design pattern is simply beautiful. But how to use it for Deep Learning, AutoML, and complex production-level pipelines?&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Scikit-Learn had its first release in 2007, which was a &lt;a href="https://github.com/guillaume-chevalier/Awesome-Deep-Learning-Resources#trends"&gt;pre deep learning era&lt;/a&gt;. It’s one of the most known and adopted machine learning library, and is still growing. On top of all, it uses the Pipe and Filter design pattern as a software architectural style - it’s what makes Scikit-Learn so fabulous, added to the fact it provides algorithms ready for use. However, it has massive issues when it comes to do the following, which we should be able to do in 2021 already:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Automatic Machine Learning (AutoML),&lt;/li&gt;
&lt;li&gt;Deep Learning Pipelines,&lt;/li&gt;
&lt;li&gt;More complex Machine Learning pipelines.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Let’s first clarify what’s missing exactly, and then let’s see how we solved each of those problems with building new design patterns based on the ones Scikit-Learn already uses.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;TL;DR: How could things work to allow us to do what’s in the above list with the Pipe and Filter design pattern / architectural style that is particular of Scikit-Learn? The API must be redesigned to include broader functionalities, such as allowing the definition of hyperparameter spaces, and allowing a more comprehensive object lifecycle &amp;amp; data flow functionalities in the steps of a pipeline. We coded a solution: that is &lt;a href="https://github.com/Neuraxio/Neuraxle"&gt;Neuraxle&lt;/a&gt;.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Don’t get me wrong, I used to love Scikit-Learn, and I still love to use it. It is a nice status quo: it offers useful features such as the ability to define pipelines with a panoply of premade machine learning algorithms. However, there are serious problems that they just couldn’t see in 2007, when deep learning wasn’t a thing.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Problems
&lt;/h2&gt;

&lt;p&gt;Some of the problems are highlighted by the top core developer of Scikit-Learn himself at a Scipy conference. He calls for new libraries to solve those problems instead of doing that within Scikit-Learn:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Source: &lt;strong&gt;the top core developer of Scikit-Learn himself&lt;/strong&gt; - Andreas C. Müller @ SciPy Conference&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h3&gt;
  
  
  Inability to Reasonably do Automatic Machine Learning (AutoML)
&lt;/h3&gt;

&lt;p&gt;In Scikit-Learn, the hyperparameters and the search space of the models are awkwardly defined.&lt;/p&gt;

&lt;p&gt;Think of builtin hyperparameter spaces and AutoML algorithms. With Scikit-Learn, despite a pipeline step can have hyperparameters, they don’t each have an hyperparameter distribution.&lt;/p&gt;

&lt;p&gt;It’d be really good to have &lt;code&gt;get_hyperparams_space&lt;/code&gt; as well as &lt;code&gt;get_params&lt;/code&gt; in Scikit-Learn, for instance.&lt;/p&gt;

&lt;p&gt;This lack of an ability to define distributions for hyperparameters is the root of much of the limitations of Scikit-Learn with regards to doing AutoML, and there are more technical limitations out there regarding constructor arguments of pipeline steps and nested pipelines.&lt;/p&gt;

&lt;h3&gt;
  
  
  Inability to Reasonably do Deep Learning Pipelines
&lt;/h3&gt;

&lt;p&gt;Think about the following features:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;train-only behavior:

&lt;ul&gt;
&lt;li&gt;mini-batching (partial fits),&lt;/li&gt;
&lt;li&gt;repeating epochs during train,&lt;/li&gt;
&lt;li&gt;shuffling the data,&lt;/li&gt;
&lt;li&gt;oversampling / undersampling,&lt;/li&gt;
&lt;li&gt;data augmentation,&lt;/li&gt;
&lt;li&gt;adding noise to data,&lt;/li&gt;
&lt;li&gt;curriculum learning,&lt;/li&gt;
&lt;li&gt;online learning&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;
&lt;li&gt;test-only behavior:

&lt;ul&gt;
&lt;li&gt;disabling regularization techniques,&lt;/li&gt;
&lt;li&gt;freezing parameters&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;
&lt;li&gt;mutating behavior:

&lt;ul&gt;
&lt;li&gt;multiple or changing input placeholders,&lt;/li&gt;
&lt;li&gt;multiple or changing output heads,&lt;/li&gt;
&lt;li&gt;multi-task learning,&lt;/li&gt;
&lt;li&gt;unsupervised pre-training before supervised learning,&lt;/li&gt;
&lt;li&gt;fine-tuning&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;
&lt;li&gt;having evaluation strategies that works with the mini-batching and all of the aforementioned things.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Scikit-Learn does almost none of the above, and hardly allows it as their API is too strict and wasn’t built with those considerations in mind: for instance they are mostly lacking in the original &lt;a href="https://scikit-learn.org/stable/modules/generated/sklearn.pipeline.Pipeline.html"&gt;Scikit-Learn Pipeline&lt;/a&gt;. Yet, all of those things are required for Deep Learning algorithms to be trained (and thereafter deployed).&lt;/p&gt;

&lt;p&gt;Plus, Scikit-Learn lacks some things to do proper serialization, and it also lacks a compatibility with Deep Learning frameworks (i.e.: TensorFlow, Keras, PyTorch, Poutyne). It also lacks to provide &lt;a href="https://programmingwithmosh.com/javascript/react-lifecycle-methods/"&gt;lifecycle methods&lt;/a&gt; to manage resources and GPU memory allocation. Think of lifecycle methods as methods where each objects has: &lt;code&gt;__init__&lt;/code&gt;, &lt;code&gt;fit&lt;/code&gt;, &lt;code&gt;transform&lt;/code&gt;. For instance, picture adding also &lt;code&gt;setup&lt;/code&gt;, &lt;code&gt;teardown&lt;/code&gt;, &lt;code&gt;mutate&lt;/code&gt;, &lt;code&gt;introspect&lt;/code&gt;, &lt;code&gt;save&lt;/code&gt;, &lt;code&gt;load&lt;/code&gt;, and more, to manage the events of the life of each algorithm’s object in a pipeline.&lt;/p&gt;

&lt;p&gt;You’d also want some pipeline steps to be able to manipulate labels, for instance in the case of an autoregressive autoencoder where some “X” data is extracted to “y” data during the fitting phase only, or in the case of applying a one-hot encoder to the labels to feed them as integers.&lt;/p&gt;

&lt;h3&gt;
  
  
  Not ready for Production nor for Complex Pipelines
&lt;/h3&gt;

&lt;p&gt;Parallelism and serialization are convoluted in Scikit-Learn: it’s hard, not to say broken. When some steps of your pipeline imports libraries coded in C++, those objects aren’t always serializable, it doesn’t work with the usual way of saving in Scikit-Learn, which is by using the joblib serialization library.&lt;/p&gt;

&lt;p&gt;Also, when you build pipelines that are meant to run in production, there are more things you’ll want to add on top of the previous ones. Think about:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;nested pipelines,&lt;/li&gt;
&lt;li&gt;funky multimodal data,&lt;/li&gt;
&lt;li&gt;parallelism and scaling on multiple cores,&lt;/li&gt;
&lt;li&gt;parallelism and scaling on multiple machines,&lt;/li&gt;
&lt;li&gt;cloud computing.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Shortly put: it’s hard to code &lt;a href="https://github.com/scikit-learn/scikit-learn/blob/master/sklearn/utils/metaestimators.py"&gt;Metaestimators&lt;/a&gt; using Scikit-Learn’s base classes. Metaestimators are algorithms that wrap other algorithms in a pipeline to change the behavior of the wrapped algorithm (e.x.: &lt;a href="https://en.wikipedia.org/wiki/Decorator_pattern#Python"&gt;decorator design pattern&lt;/a&gt;). Examples of metaestimators:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;a &lt;a href="https://www.neuraxle.org/stable/api/neuraxle.metaopt.random.html#neuraxle.metaopt.random.RandomSearch"&gt;&lt;code&gt;RandomSearch&lt;/code&gt;&lt;/a&gt; holds another step to optimize. A &lt;code&gt;RandomSearch&lt;/code&gt; is itself also a step.&lt;/li&gt;
&lt;li&gt;a &lt;a href="https://www.neuraxle.org/stable/api/neuraxle.pipeline.html#neuraxle.pipeline.Pipeline"&gt;&lt;code&gt;Pipeline&lt;/code&gt;&lt;/a&gt; holds several other steps. A &lt;code&gt;Pipeline&lt;/code&gt; is itself also a step (as it can be used inside other pipelines: nested pipelines).&lt;/li&gt;
&lt;li&gt;a &lt;a href="https://www.neuraxle.org/stable/api/neuraxle.steps.loop.html#neuraxle.steps.loop.ForEachDataInput"&gt;&lt;code&gt;ForEachDataInputs&lt;/code&gt;&lt;/a&gt; holds another step. A &lt;code&gt;ForEachDataInputs&lt;/code&gt; is itself also a step (as it is a replacement of one to just change dimensionality of the data, such as adapting a 2D step to 3D data by wrapping it).&lt;/li&gt;
&lt;li&gt;an &lt;a href="https://www.neuraxle.org/stable/api/neuraxle.steps.flow.html#neuraxle.steps.flow.ExpandDim"&gt;&lt;code&gt;ExpandDim&lt;/code&gt;&lt;/a&gt; holds another step. An &lt;code&gt;ExpandDim&lt;/code&gt; is itself also a step (inversely to the &lt;code&gt;ForEachDataInputs&lt;/code&gt;, it augments the dimensionality instead of lowering it).&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Metaestimators are crucial for advanced features. For instance, a &lt;code&gt;ParallelTransform&lt;/code&gt; step could wrap a step to dispatch computations across different threads. A &lt;code&gt;ClusteringWrapper&lt;/code&gt; could dispatch computations of the step it wraps to different worker computers within a pipeline. Upon receiving a batch of data, a &lt;code&gt;ClusteringWrapper&lt;/code&gt; would work by first sending the step to the workers (if it wasn’t already sent) and then a subset of the data to each worker. A pipeline is itself a metaestimator, as it contains many different steps. There are many metaestimators out there. We also name those “meta steps” as a synonym.&lt;/p&gt;

&lt;h2&gt;
  
  
  Solutions that we’ve Found to Those Scikit-Learn’s Problems
&lt;/h2&gt;

&lt;p&gt;For sure, Scikit-Learn is very convenient and well-built. However, it needs a refresh. Here are our solutions with Neuraxle to make Scikit-Learn fresh and useable within modern computing projects!&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;a href="https://www.neuraxle.org/stable/scikit-learn_problems_solutions.html#inability-to-reasonably-do-automatic-machine-learning-automl"&gt;Inability to Reasonably do Automatic Machine Learning (AutoML)&lt;/a&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://www.neuraxle.org/stable/scikit-learn_problems_solutions.html#problem-defining-the-search-space-hyperparameter-distributions"&gt;Problem: Defining the Search Space (Hyperparameter Distributions)&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.neuraxle.org/stable/scikit-learn_problems_solutions.html#problem-defining-hyperparameters-in-the-constructor-is-limiting"&gt;Problem: Defining Hyperparameters in the Constructor is Limiting&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.neuraxle.org/stable/scikit-learn_problems_solutions.html#problem-different-train-and-test-behavior"&gt;Problem: Different Train and Test Behavior&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.neuraxle.org/stable/scikit-learn_problems_solutions.html#problem-you-trained-a-pipeline-and-you-want-feedback-statistics-on-its-learning"&gt;Problem: You trained a Pipeline and You Want Feedback on its Learning.&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://www.neuraxle.org/stable/scikit-learn_problems_solutions.html#inability-to-reasonably-do-deep-learning-pipelines"&gt;Inability to Reasonably do Deep Learning Pipelines&lt;/a&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://www.neuraxle.org/stable/scikit-learn_problems_solutions.html#problem-scikit-learn-hardly-allows-for-mini-batch-gradient-descent-incremental-fit"&gt;Problem: Scikit-Learn Hardly Allows for Mini-Batch Gradient Descent (Incremental Fit)&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.neuraxle.org/stable/scikit-learn_problems_solutions.html#problem-initializing-the-pipeline-and-deallocating-resources"&gt;Problem: Initializing the Pipeline and Deallocating Resources&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.neuraxle.org/stable/scikit-learn_problems_solutions.html#problem-it-is-difficult-to-use-other-deep-learning-dl-libraries-in-scikit-learn"&gt;Problem: It is Difficult to Use Other Deep Learning (DL) Libraries in Scikit-Learn&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.neuraxle.org/stable/scikit-learn_problems_solutions.html#problem-the-ability-to-transform-output-labels"&gt;Problem: The Ability to Transform Output Labels&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://www.neuraxle.org/stable/scikit-learn_problems_solutions.html#not-ready-for-production-nor-for-complex-pipelines"&gt;Not ready for Production nor for Complex Pipelines&lt;/a&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://www.neuraxle.org/stable/scikit-learn_problems_solutions.html#problem-processing-3d-4d-or-nd-data-in-your-pipeline-with-steps-made-for-lower-dimensionnal-data"&gt;Problem: Processing 3D, 4D, or ND Data in your Pipeline with Steps Made for Lower-Dimensionnal Data&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.neuraxle.org/stable/scikit-learn_problems_solutions.html#problem-modify-a-pipeline-along-the-way-such-as-for-pre-training-or-fine-tuning"&gt;Problem: Modify a Pipeline Along the Way, such as for Pre-Training or Fine-Tuning&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.neuraxle.org/stable/scikit-learn_problems_solutions.html#problem-getting-model-attributes-from-scikit-learn-pipeline"&gt;Problem: Getting Model Attributes from Scikit-Learn Pipeline&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.neuraxle.org/stable/scikit-learn_problems_solutions.html#problem-you-can-t-parallelize-nor-save-pipelines-using-steps-that-can-t-be-serialized-as-is-by-joblib"&gt;Problem: You can’t Parallelize nor Save Pipelines Using Steps that Can’t be Serialized “as-is” by Joblib&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;Unfortunately, most Machine Learning pipelines and frameworks, such as Scikit-Learn, fail at combining Deep Learning algorithms within &lt;a href="https://www.neuraxio.com/en/blog/neuraxle/2019/10/26/neat-machine-learning-pipelines.html"&gt;neat pipeline abstractions&lt;/a&gt; allowing for clean code, automatic machine learning, parallelism &amp;amp; cluster computing, and deployment in production. Scikit-Learn has those nice pipeline abstractions already, but it lacks the features to do AutoML, deep learning pipelines, and more complex pipelines such as for deploying to production.&lt;/p&gt;

&lt;p&gt;Fortunately, we found some design patterns and solutions that allows for all the techniques we named to work together within a pipeline, making it easy for coders, bringing concepts from most recent frontend frameworks (e.g.: component lifecycle) into machine learning pipelines with the right abstractions, allowing for more possibilities such as a better memory management, serialization, and mutating dynamic pipelines. We also break past Scikit-Learn and Python’s parallelism limitations with a neat trick, allowing straightforward parallelization and serialization of pipelines for deployment in production.&lt;/p&gt;

&lt;p&gt;We’re glad we’ve found a clean way to solve the most widespread problems out there related to machine learning pipelines, and we hope that our solutions to those problems will be prolific to many machine learning projects, as well as projects that can actually be deployed to production.&lt;/p&gt;

&lt;p&gt;If you liked this reading, &lt;a href="https://www.neuraxio.com/en/blog/neuraxle/index.html"&gt;subscribe to Neuraxio’s updates&lt;/a&gt; to be kept in the loop! Also thanks to the &lt;a href="https://www.dotlayer.org/"&gt;Dot-Layer (.Layer)&lt;/a&gt; organization’s blog committee and administrators for their generous peer-review of the present article.&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Our top learning resources for AI programmers</title>
      <dc:creator>Guillaume Chevalier</dc:creator>
      <pubDate>Fri, 13 Aug 2021 19:14:54 +0000</pubDate>
      <link>https://dev.to/guillaumechevalier/our-top-learning-resources-for-ai-programmers-4lc7</link>
      <guid>https://dev.to/guillaumechevalier/our-top-learning-resources-for-ai-programmers-4lc7</guid>
      <description>&lt;p&gt;You are an Artificial Intelligence (AI) programmer and you'd like to learn how to program well as we do at Neuraxio? &lt;/p&gt;

&lt;p&gt;Lucky you, we've launched a series of curated resources to help you get better and to work like a pro in Machine Learning (ML) projects. &lt;/p&gt;

&lt;p&gt;You'll learn: &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;How to apply the SOLID principles of Clean Code to your ML code; &lt;/li&gt;
&lt;li&gt;Package design techniques to structure your code; &lt;/li&gt;
&lt;li&gt;How to properly balance the usage of Jupyter Notebooks v.s. using an IDE in an ML project; &lt;/li&gt;
&lt;li&gt;How to structure your backend software architecture code for a viable production-ready project that will live through time; &lt;/li&gt;
&lt;li&gt;The structure of Clean Machine Learning code that yields results with AutoML&lt;/li&gt;
&lt;li&gt;Links to the top online classes that we recommend to our programmers internally to get up to date with Machine Learning; &lt;/li&gt;
&lt;li&gt;Top 5 documentation pages that you should read to grasp how Neuraxle works; &lt;/li&gt;
&lt;li&gt;How to program robust software using unit tests; &lt;/li&gt;
&lt;li&gt;Framework design patterns you can use to design your own frameworks; &lt;/li&gt;
&lt;li&gt;How to do business with Neuraxio by working for us or referring us AI clients; &lt;/li&gt;
&lt;li&gt;And more! 
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If you successfully pass the quizz that will be sent to you at the end of this training, you'll be able to purchase the certificate to showcase your skills for $17 CAD, if you wish to. This certificate can be showcased on LinkedIn as "Neuraxio AI Programmer". &lt;/p&gt;

&lt;p&gt;Remember, you're only one ML project away from achieving success.&lt;br&gt;&lt;br&gt;
And it starts here and now. &lt;/p&gt;

&lt;p&gt;Register &lt;a href="https://www.neuraxio.com/blogs/news/our-top-learning-resources-for-ai-programmers"&gt;here&lt;/a&gt;&lt;/p&gt;

</description>
    </item>
    <item>
      <title>AI technologies for eCommerce - The Commerce Show</title>
      <dc:creator>Guillaume Chevalier</dc:creator>
      <pubDate>Tue, 03 Aug 2021 19:20:45 +0000</pubDate>
      <link>https://dev.to/guillaumechevalier/ai-technologies-for-ecommerce-the-commerce-show-47o2</link>
      <guid>https://dev.to/guillaumechevalier/ai-technologies-for-ecommerce-the-commerce-show-47o2</guid>
      <description>&lt;p&gt;This is a podcast episode from The Commerce Show. &lt;/p&gt;

&lt;p&gt;Original description from The Commerce Show: &lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;In this episode, we are talking about AI technologies for eCommerce. Guillaume Chevalier has been working in artificial intelligence for over 7 years now and has been involved in over 57 machine learning projects.   &lt;/p&gt;

&lt;p&gt;We cover several applications of AI in the eCommerce industry such as Personalized shopping experience, Sales/Inventory forecasting, Automated customer service/chatbots, Visual search and powerful synonyms search, Price optimization, Understanding customers better (persona) and Recommendation algorithms.   &lt;/p&gt;

&lt;p&gt;After the first 30 minutes to talk about eCommerce, we also talk a bit deeper about AI from a developer point of view. Guillaume explains why he decided to develop Neuraxle an AI framework for machine learning projects over the years. Guillaume is also giving tips about « How to start and plan an AI transformation for a non-tech business. »   &lt;/p&gt;

&lt;p&gt;This podcast is amazing and you’ll discover Guillaume's passion for eCommerce, ML (machine learning) and NPL (natural language processing). &lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;*&lt;em&gt;Listen to the full podcast: *&lt;/em&gt;&lt;/p&gt;



&lt;p&gt;&lt;a href="https://thecommerceshow.com/episodes/ep-13-guillaume-chevalier-from-neuraxio-ai-technologies-for-ecommerce-the-commerce-show-tKAR98Gl"&gt;https://thecommerceshow.com/episodes/ep-13-guillaume-chevalier-from-neuraxio-ai-technologies-for-ecommerce-the-commerce-show-tKAR98Gl&lt;/a&gt; &lt;/p&gt;

&lt;p&gt;Follow &lt;a href="https://thecommerceshow.com/episodes/ep-13-guillaume-chevalier-from-neuraxio-ai-technologies-for-ecommerce-the-commerce-show-tKAR98Gl"&gt;The Commerce Show&lt;/a&gt;.&lt;/p&gt;

</description>
    </item>
    <item>
      <title>What's wrong with Scikit-Learn.</title>
      <dc:creator>Guillaume Chevalier</dc:creator>
      <pubDate>Fri, 03 Jan 2020 16:35:31 +0000</pubDate>
      <link>https://dev.to/neuraxio/what-s-wrong-with-scikit-learn-4p3a</link>
      <guid>https://dev.to/neuraxio/what-s-wrong-with-scikit-learn-4p3a</guid>
      <description>&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--ISYmHqTn--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://www.neuraxio.com/en/blog/assets/sklearn-broken.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--ISYmHqTn--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://www.neuraxio.com/en/blog/assets/sklearn-broken.jpg" alt="What's wrong with Scikit-Learn."&gt;&lt;/a&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Scikit-Learn’s “pipe and filter” design pattern is simply beautiful. But how to use it for Deep Learning, AutoML, and complex production-level pipelines?&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Scikit-Learn had its first release in 2007, which was a &lt;a href="https://github.com/guillaume-chevalier/Awesome-Deep-Learning-Resources#trends"&gt;pre deep learning era&lt;/a&gt;. However, it’s one of the most known and adopted machine learning library, and is still growing. On top of all, it uses the Pipe and Filter design pattern as a software architectural style - it’s what makes scikit-learn so fabulous, added to the fact it provides algorithms ready for use. However, it has massive issues when it comes to do the following, which we should be able to do in 2020 already:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Automatic Machine Learning (AutoML),&lt;/li&gt;
&lt;li&gt;Deep Learning Pipelines,&lt;/li&gt;
&lt;li&gt;More complex Machine Learning pipelines.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Let’s first clarify what’s missing exactly, and then let’s see how we solved each of those problems with building new design patterns based on the ones scikit-learn already uses.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;TL;DR: How could things work to allow to do what’s in the above list with the Pipe and Filter design pattern / architectural style that is particular of Scikit-Learn?&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Don’t get me wrong, I used to love Scikit-Learn, and I still love to use it. It is a nice status quo: it offers useful features such as the ability to define pipelines with a panoply of premade machine learning algorithms. However, there are serious problems that they just couldn’t see upfront back in 2007.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Problems
&lt;/h2&gt;

&lt;p&gt;Some of the problems are highlighted by the creator of scikit-learn himself in one of his conference and he suggests himself that new libraries should solve those problems instead of doing that within scikit-learn:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.youtube.com/embed/Wy6EKjJT79M?start=1361&amp;amp;end=1528"&gt;https://www.youtube.com/embed/Wy6EKjJT79M?start=1361&amp;amp;amp;end=1528&lt;/a&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Source: &lt;strong&gt;the creator of scikit-learn himself&lt;/strong&gt; - Andreas Mueller @ SciPy Conference&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h3&gt;
  
  
  Inability to Reasonably do Automatic Machine Learning (AutoML)
&lt;/h3&gt;

&lt;p&gt;In scikit-learn, the hyperparameters and the search space of the models are awkwardly defined.&lt;/p&gt;

&lt;p&gt;Think of builtin hyperparameter spaces and AutoML algorithms. With scikit-learn, a pipeline step can only have some hyperparameters, but they don’t each have an hyperparameter distribution.&lt;/p&gt;

&lt;p&gt;It’d be really good to have &lt;code&gt;get_hyperparams_space&lt;/code&gt; as well as &lt;code&gt;get_params&lt;/code&gt; in scikit-learn, for instance.&lt;/p&gt;

&lt;p&gt;This lack of parameter distributions definition is the root of much of the limitations of scikit-learn, and there are more technical limitations out there regarding constructor arguments of pipeline steps and nested pipelines.&lt;/p&gt;

&lt;h3&gt;
  
  
  Inability to Reasonably do Deep Learning Pipelines
&lt;/h3&gt;

&lt;p&gt;Think about mini-batching, repeating epochs during train, train/test mode of steps, pipelines that mutates in shape to change data sources and data structures amidst the training (e.g.: unsupervised pre-training before supervised learning), and having evaluation strategies that works with the mini-batching and all of the aforementioned things. Mini-batching also involves that the steps of a pipeline should be able to have “fit” called many times in a row on subsets of the data, which isn’t the standard in scikit-learn. None of that is available within a &lt;a href="https://scikit-learn.org/stable/modules/generated/sklearn.pipeline.Pipeline.html"&gt;Scikit-Learn Pipeline&lt;/a&gt;, yet all of those things are required for Deep Learning algorithms to be trained and deployed.&lt;/p&gt;

&lt;p&gt;Plus, Scikit-Learn lacks a compatibility with Deep Learning frameworks (i.e.: TensorFlow, Keras, PyTorch, Poutyne). Scikit-learn lacks to provide lifecycle methods to manage resources and GPU memory allocation, for instance.&lt;/p&gt;

&lt;p&gt;You’d also want some pipelines steps to be able to manipulate labels, for instance in the case of an autoregressive autoencoder where some “X” data is extracted to “y” data during the fitting phase only, or in the case of applying a one-hot encoder to the labels to be able to feed them as integers.&lt;/p&gt;

&lt;h3&gt;
  
  
  Not ready for Production nor for Complex Pipelines
&lt;/h3&gt;

&lt;p&gt;Parallelism and serialization are convoluted in scikit-learn: it’s hard, for not saying broken. When some steps of your pipeline imports libraries coded in C++ which objects aren’t serializable, it doesn’t work with the usual way of saving in Scikit-Learn.&lt;/p&gt;

&lt;p&gt;Also, when you build pipelines meant for being deployed in production, there are more things you’ll want to add on top of the previous ones. Think about nested pipelines, funky multimodal data, parallelism and scaling, cloud computing.&lt;/p&gt;

&lt;p&gt;Shortly put: with Scikit-Learn, it’s hard to code &lt;a href="https://github.com/scikit-learn/scikit-learn/blob/master/sklearn/utils/metaestimators.py"&gt;Metaestimators&lt;/a&gt;. Metaestimators are algorithms that wrap other algorithms in a pipeline so as to change the function of the wrapped algorithm (decorator design pattern).&lt;/p&gt;

&lt;p&gt;Metaestimators are crucial for advanced features. For instance, a ParallelTransform step could wrap a step to dispatch computations across different threads. A ClusteringWrapper could dispatch computations of the step it wraps to different worker computers within a pipeline by first sending the step to the workers and then the data as it comes. A pipeline is itself a metaestimator, as it contains many different steps. There are many metaestimators out there. Here, we name those “meta steps” for simplicity.&lt;/p&gt;

&lt;h2&gt;
  
  
  Solutions that we’ve Found to Those Scikit-Learn’s Problems
&lt;/h2&gt;

&lt;p&gt;For sure, Scikit-Learn is very convenient and well-built. However, it needs a refresh. Here are our solutions to make scikit-learn fresh and useable within modern computing projects!&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;a href="https://www.neuraxle.org/stable/scikit-learn_problems_solutions.html#inability-to-reasonably-do-automatic-machine-learning-automl"&gt;Inability to Reasonably do Automatic Machine Learning (AutoML)&lt;/a&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://www.neuraxle.org/stable/scikit-learn_problems_solutions.html#problem-defining-the-search-space-hyperparameter-distributions"&gt;Problem: Defining the Search Space (Hyperparameter Distributions)&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.neuraxle.org/stable/scikit-learn_problems_solutions.html#problem-defining-hyperparameters-in-the-constructor-is-limiting"&gt;Problem: Defining Hyperparameters in the Constructor is Limiting&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.neuraxle.org/stable/scikit-learn_problems_solutions.html#problem-different-train-and-test-behavior"&gt;Problem: Different Train and Test Behavior&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.neuraxle.org/stable/scikit-learn_problems_solutions.html#problem-you-trained-a-pipeline-and-you-want-feedback-statistics-on-its-learning"&gt;Problem: You trained a Pipeline and You Want Feedback on its Learning.&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://www.neuraxle.org/stable/scikit-learn_problems_solutions.html#inability-to-reasonably-do-deep-learning-pipelines"&gt;Inability to Reasonably do Deep Learning Pipelines&lt;/a&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://www.neuraxle.org/stable/scikit-learn_problems_solutions.html#problem-scikit-learn-hardly-allows-for-mini-batch-gradient-descent-incremental-fit"&gt;Problem: Scikit-Learn Hardly Allows for Mini-Batch Gradient Descent (Incremental Fit)&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.neuraxle.org/stable/scikit-learn_problems_solutions.html#problem-initializing-the-pipeline-and-deallocating-resources"&gt;Problem: Initializing the Pipeline and Deallocating Resources&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.neuraxle.org/stable/scikit-learn_problems_solutions.html#problem-it-is-difficult-to-use-other-deep-learning-dl-libraries-in-scikit-learn"&gt;Problem: It is Difficult to Use Other Deep Learning (DL) Libraries in Scikit-Learn&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.neuraxle.org/stable/scikit-learn_problems_solutions.html#problem-the-ability-to-transform-output-labels"&gt;Problem: The Ability to Transform Output Labels&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://www.neuraxle.org/stable/scikit-learn_problems_solutions.html#not-ready-for-production-nor-for-complex-pipelines"&gt;Not ready for Production nor for Complex Pipelines&lt;/a&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://www.neuraxle.org/stable/scikit-learn_problems_solutions.html#problem-processing-3d-4d-or-nd-data-in-your-pipeline-with-steps-made-for-lower-dimensionnal-data"&gt;Problem: Processing 3D, 4D, or ND Data in your Pipeline with Steps Made for Lower-Dimensionnal Data&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.neuraxle.org/stable/scikit-learn_problems_solutions.html#problem-modify-a-pipeline-along-the-way-such-as-for-pre-training-or-fine-tuning"&gt;Problem: Modify a Pipeline Along the Way, such as for Pre-Training or Fine-Tuning&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.neuraxle.org/stable/scikit-learn_problems_solutions.html#problem-getting-model-attributes-from-scikit-learn-pipeline"&gt;Problem: Getting Model Attributes from Scikit-Learn Pipeline&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.neuraxle.org/stable/scikit-learn_problems_solutions.html#problem-you-can-t-parallelize-nor-save-pipelines-using-steps-that-can-t-be-serialized-as-is-by-joblib"&gt;Problem: You can’t Parallelize nor Save Pipelines Using Steps that Can’t be Serialized “as-is” by Joblib&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;Unfortunately, most Machine Learning pipelines and frameworks, such as for instance scikit-learn, fail at combining Deep Learning algorithms within &lt;a href="https://www.neuraxio.com/en/blog/neuraxle/2019/10/26/neat-machine-learning-pipelines.html"&gt;neat pipeline abstractions&lt;/a&gt; allowing for clean code, automatic machine learning, parallelism &amp;amp; cluster computing, and deployment in production. Scikit-learn has those nice pipeline abstractions already, but they are lacking some necessary stuff to do AutoML, deep learning pipelines, and more complex pipelines such as for deploying to production.&lt;/p&gt;

&lt;p&gt;Fortunately, we found some design patterns and solutions that combines the best of all, making it easy for coders, bringing concepts from most recent frontend frameworks (e.g.: component lifecycle) into machine learning pipelines with the right abstractions, allowing for more possibilities. We also break past scikit-learn and Python’s parallelism limitations with a neat trick, allowing easier parallelization and serialization of pipelines for deployment in production, as well as enabling complex mutating pipelines of unsupervised pre-training and fine-tuning.&lt;/p&gt;

&lt;p&gt;We’re glad we’ve found a clean way to solve the most spread problems out there, and we hope for you that the results of our findings will be prolific to many machine learning projects, as well as projects that can actually be deployed to production.&lt;/p&gt;

&lt;p&gt;If you liked this reading, &lt;a href="https://www.neuraxio.com/en/blog/neuraxle/index.html"&gt;subscribe to Neuraxio’s updates&lt;/a&gt; to be kept in the loop!&lt;/p&gt;

</description>
      <category>neuraxle</category>
      <category>machinelearning</category>
      <category>deeplearning</category>
      <category>cleancode</category>
    </item>
    <item>
      <title>Why Deep Learning has a Bright Future</title>
      <dc:creator>Guillaume Chevalier</dc:creator>
      <pubDate>Sun, 29 Dec 2019 14:37:43 +0000</pubDate>
      <link>https://dev.to/neuraxio/why-deep-learning-has-a-bright-future-3gh</link>
      <guid>https://dev.to/neuraxio/why-deep-learning-has-a-bright-future-3gh</guid>
      <description>&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--7bhV8B2i--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://www.neuraxio.com/en/blog/assets/big-data-in-the-cloud.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--7bhV8B2i--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://www.neuraxio.com/en/blog/assets/big-data-in-the-cloud.jpg" alt="Why Deep Learning has a Bright Future"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Would you like to see the future? This post aims at predicting what will happen to the field of Deep Learning. Scroll on.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  Microprocessor Trends
&lt;/h2&gt;

&lt;p&gt;Who doesn’t like to see the real cause of trends?&lt;/p&gt;

&lt;h3&gt;
  
  
  “Get Twice the Power at a Constant Price Every 18 months”
&lt;/h3&gt;

&lt;p&gt;Some people have said that Moore’s Law was coming to an end. A version of this law is that every 18 months, computers have 2x the computing power than before, at a constant price. However, as seen on the chart, it seems like improvements in computing got to a halt between 2000 and 2010.&lt;/p&gt;

&lt;h3&gt;
  
  
  See the Moore’s Law Graph
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--NrvKNZ0F--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://raw.githubusercontent.com/guillaume-chevalier/microprocessor-trend-data/7bbd582ba1376015f6cf24498f46db62811a2919/42yrs/42-years-processor-trend.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--NrvKNZ0F--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://raw.githubusercontent.com/guillaume-chevalier/microprocessor-trend-data/7bbd582ba1376015f6cf24498f46db62811a2919/42yrs/42-years-processor-trend.png" alt=""&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  But the Growth Stalled…
&lt;/h3&gt;

&lt;p&gt;This halt is in fact that we’re reaching the limit size of the transistors, an essential part in CPUs. Making them smaller than this limit size will introduce computing errors, because of quantic behavior. Quantum computing will be a good thing, however it won’t replace the function of classical computers as we know them today.&lt;/p&gt;

&lt;h3&gt;
  
  
  Faith isn’t lost: invest in parallel computing
&lt;/h3&gt;

&lt;p&gt;Moore’s Law isn’t broken yet on another aspect: the number of transistors we can stack in parallel. This means that we can still have a speedup of computing when doing parallel processing. In simpler words: having more cores. GPUs are growing towards this direction: it’s fairly common to see GPUs with 2000 cores in the computing world, already.&lt;/p&gt;

&lt;h3&gt;
  
  
  That means Deep Learning is a good bet
&lt;/h3&gt;

&lt;p&gt;Luckily for Deep Learning, it comprise matrix multiplications. This means that deep learning algorithms can be massively parallelized, and will profit from future improvements from what remains of Moore’s Law.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://github.com/guillaume-chevalier/Awesome-Deep-Learning-Resources"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--J_zX0q0y--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://github.com/guillaume-chevalier/Awesome-Deep-Learning-Resources/raw/master/google_trends.png" alt=""&gt;&lt;/a&gt;See also: &lt;a href="https://github.com/guillaume-chevalier/Awesome-Deep-Learning-Resources"&gt;Awesome Deep Learning Resources&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  The AI Singularity in 2029
&lt;/h2&gt;

&lt;h3&gt;
  
  
  A prediction by Ray Kurtzweil
&lt;/h3&gt;

&lt;p&gt;Ray Kurtzweil predicts that the singularity will happen in 2029. That is, as he defines it, the moment when a 1000$ computer will contain as much computing power as the brain. He is confident that this will happen, and he insists that what needs to be worked on to reach true singularity is better algorithms.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--gP5H2Z-s--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://www.neuraxio.com/en/blog/assets/bright-blue-clouds.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--gP5H2Z-s--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://www.neuraxio.com/en/blog/assets/bright-blue-clouds.jpg" alt=""&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  “We’re limited by the algorithms we use”
&lt;/h3&gt;

&lt;p&gt;So we’d be mostly limited by not having found the best mathematical formulas yet. Until then, for learning to properly take place using deep learning, one needs to feed a lot of data to deep learning algorithms.&lt;/p&gt;

&lt;p&gt;We, at Neuraxio, predict that Deep Learning algorithms built for time series processing will be something very good to build upon to get closer to &lt;a href="https://guillaume-chevalier.com/limits-of-deep-learning-and-its-future/"&gt;where the future of deep learning is headed&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  Big Data and AI
&lt;/h2&gt;

&lt;p&gt;Yes, this keyword is so 2014. It still holds relevant.&lt;/p&gt;

&lt;h3&gt;
  
  
  “90% of existing data was created in the last 2 years”
&lt;/h3&gt;

&lt;p&gt;It is reported by IBM New Vantage that 90% of the financial data was accumulated in the past 2 years. That’s a lot. At this rate of growth, we’ll be able to feed deep learning algorithms abundantly, more and more.&lt;/p&gt;

&lt;h3&gt;
  
  
  “By 2020, 37% of the information will have a potential for analysis”
&lt;/h3&gt;

&lt;p&gt;That is what The Guardian reports, according to big data statistics from IDC. In contrast, only 0.5% of all data was analyzed in 2012, according to the same source. Information is more and more structured, and organization are now more conscious of tools to analyze their data. This means that deep learning algorithms will soon have access to the data more easily, wheter the data is stored locally or in the cloud.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--7bhV8B2i--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://www.neuraxio.com/en/blog/assets/big-data-in-the-cloud.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--7bhV8B2i--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://www.neuraxio.com/en/blog/assets/big-data-in-the-cloud.jpg" alt=""&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  It’s about intelligence.
&lt;/h2&gt;

&lt;p&gt;Is about what defines us humans compared to all previous species: our intelligence.&lt;/p&gt;

&lt;p&gt;The key of intelligence and cognition is a very interesting subject to explore and is not yet well understood. Technologies related to this field are are promising, and simply, interesting. Many are driven by passion.&lt;/p&gt;

&lt;p&gt;On top of that, deep learning algorithms may use Quantum Computing and will apply to &lt;a href="https://guillaume-chevalier.com/random-thoughts-on-brain-computer-interfaces-productivity-and-privacy/"&gt;machine-brain interfaces in the future&lt;/a&gt;. Trend stacking at its finest: a recipe for success is to align as many stars as possible while working on practical matters.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--ywr09K4I--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://www.neuraxio.com/en/blog/assets/passion-sky-clouds.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--ywr09K4I--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://www.neuraxio.com/en/blog/assets/passion-sky-clouds.jpg" alt=""&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;First, Moore’s Law and computing trends indicate that more and more things will be parallelized. Deep Learning will exploit that.&lt;/p&gt;

&lt;p&gt;Second, the AI singularity is predicted to happen in 2029 according to Ray Kurtzweil. Advancing Deep Learning research is a way to get there to reap the rewards and do good.&lt;/p&gt;

&lt;p&gt;Third, data doesn’t sleep. More and more data is accumulated every day. Deep Learning will exploit that.&lt;/p&gt;

&lt;p&gt;Finally, deep learning is about intelligence. It is about technology, it is about the brain, it is about learning, it is about what defines humans compared to all previous species: their intelligence. Curious people will know their way around deep learning.&lt;/p&gt;

&lt;p&gt;If you liked this article, consider following us for more!&lt;/p&gt;

</description>
      <category>deeplearning</category>
    </item>
    <item>
      <title>A Rant on Kaggle Competition Code (and Most Research Code)</title>
      <dc:creator>Guillaume Chevalier</dc:creator>
      <pubDate>Thu, 26 Dec 2019 05:25:23 +0000</pubDate>
      <link>https://dev.to/neuraxio/a-rant-on-kaggle-competition-code-and-most-research-code-3i4a</link>
      <guid>https://dev.to/neuraxio/a-rant-on-kaggle-competition-code-and-most-research-code-3i4a</guid>
      <description>&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fwww.neuraxio.com%2Fen%2Fblog%2Fassets%2Fbroken_automl_code.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fwww.neuraxio.com%2Fen%2Fblog%2Fassets%2Fbroken_automl_code.jpg" alt="A Rant on Kaggle Competition Code (and Most Research Code)"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Machine Learning competition &amp;amp; research code sucks. What to do about it?&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;For having used code from Kaggle competitions a few times already, we realized it wasn’t full of rainbows, unicorns, and leprechauns. It’s rather like a Frankenstein. A Frankenstein is a work made of glued parts of other works and badly integrated. Machine Learning competition code in general, as well as machine learning research code, suffers from deep architectural issues. What to do about it? Using neat design patterns is the solution.&lt;/p&gt;

&lt;h2&gt;
  
  
  Bad Design Patterns.
&lt;/h2&gt;

&lt;p&gt;It’s so common to see code coming from Kaggle competitions which doesn’t have the right abstractions for later deploying the pipeline to production - and with logic reason, kagglers have no incentives to prepare for deploying code to production, as they only need to win the competition by generating good results. The same goes with most research code for which papers are published, often, just beating the benchmarks is what is sought by coders. The situation is roughly the same in academia where researchers too often just try to get results to publish a paper and ditch the code after. Moreover, many machine learning coders didn’t learn to code properly in the first place, which makes things harder.&lt;/p&gt;

&lt;p&gt;Here are a few examples of bad patterns we’ve seen:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Coding a pipeline using bunch of manual small “main” files to be executed one by one in a certain order, in parallel or one after the other. Yes, we saw that many times.&lt;/li&gt;
&lt;li&gt;Forcing to use disk persistence between the aforementioned small main files, which strongly couple the code to the storage and makes it impossible to run the code without saving to disk. Yes, many times.&lt;/li&gt;
&lt;li&gt;Making the disk persistence mechanism different for each of those small “main” files. For example, using a mix of JSON, then CSV, then Pickles and sometimes HDF5 and otherwise raw numpy array dumps. Or even worse : mixing up many databases and bigger frameworks instead of keeping it simple and writing to disks. Yikes! Keep it simple!&lt;/li&gt;
&lt;li&gt;Provide no instructions whatsoever on how to run things in the good order. Bullcrap is left as an exercise for the reader.&lt;/li&gt;
&lt;li&gt;Have no unit tests, or unit tests that yes-do-test the algorithm, but that also requires writing to disks or using what was already written to disks. Ugh. And by the time you execute that untested code again, you end up with an updated dependency for which no installation version was provided and nothing work as it did anymore.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Pointing to Some Examples
&lt;/h2&gt;

&lt;p&gt;Those bad patterns doesn’t only apply to code written in programming competition environments (such as &lt;a href="https://github.com/guillaume-chevalier/CSGames-2019-AI" rel="noopener noreferrer"&gt;this code&lt;/a&gt; of mine written in a rush - yes, I can do it too when unavoidably &lt;a href="https://www.amazon.ca/Clean-Coder-Conduct-Professional-Programmers/dp/0137081073" rel="noopener noreferrer"&gt;pressured&lt;/a&gt;). Here are some examples of code with checkpoints using the disks:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Most &lt;a href="http://blog.kaggle.com/category/winners-interviews/" rel="noopener noreferrer"&gt;winning Kaggle competition&lt;/a&gt; code. We dove many times in such code, and it never occured to us to see the proper abstractions.&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://github.com/google-research/bert" rel="noopener noreferrer"&gt;BERT&lt;/a&gt;. Bear with me - just try to refactor “&lt;a href="https://github.com/google-research/bert/blob/master/run_squad.py" rel="noopener noreferrer"&gt;run_squad.py&lt;/a&gt;” for a second, and you’ll realize that every level of abstraction are coupled together. To name a few, the console argument parsing logic is mixed up at the same level of the model definition logic, full of global flag variables. Not only that, the model definition logic is mixed in all of this, along with the data loading and saving logic that uses the cloud, in one huge file of more than 1k lines of code in a small project.&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://github.com/facebookresearch/fastText/" rel="noopener noreferrer"&gt;FastText&lt;/a&gt;. The Python API is made for loading text files from disks, training on that, and dumping on disk the result. Couldn’t dumping on disk and using text files as training input be optional?&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Using Competition Code?
&lt;/h2&gt;

&lt;p&gt;Companies can sometimes draw inspiration from code on Kaggle, I’d advise them to code their own pipelines to be production-proof, as taking such competition as-is is risky. There is a saying that competition code is the worst code for companies to use, and even that the people winning competitions are the worst once to hire - because they write poor code.&lt;/p&gt;

&lt;p&gt;I wouldn’t go that far in that saying (as I myself most of the time earn podiums in coding competitions) - it’s rather that competition code is written without thinking of the future as the goal is to win. Ironically, it’s at that moment that reading &lt;a href="https://www.quora.com/What-is-your-review-of-Clean-Code-A-Handbook-of-Agile-Software-Craftsmanship-Robert-C-Martin/answer/Guillaume-Chevalier-2" rel="noopener noreferrer"&gt;Clean Code&lt;/a&gt; and &lt;a href="https://www.amazon.ca/Clean-Coder-Conduct-Professional-Programmers/dp/0137081073" rel="noopener noreferrer"&gt;Clean Coder&lt;/a&gt; gets important. Using good pipeline abstractions helps machine learning projects surviving.&lt;/p&gt;

&lt;h2&gt;
  
  
  Solving the Problems.
&lt;/h2&gt;

&lt;p&gt;Here are the things you want when building a machine learning pipeline which goal is to be sent to production:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;You ideally want a pipeline than can process your data by calling just one function and not lots of small executable files. &lt;a href="https://www.neuraxle.org/stable/api/neuraxle.checkpoints.html" rel="noopener noreferrer"&gt;You might have some caching enabled&lt;/a&gt; if things are too slow to run, but you keep caching as minimal as possible, and your &lt;a href="https://www.neuraxle.org/stable/api/neuraxle.steps.caching.html" rel="noopener noreferrer"&gt;caching might not be checkpoints exactly&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;Having the possibility to not use any data checkpoints between pipeline steps simply. You want to be able to &lt;a href="https://www.neuraxle.org/stable/examples/auto_ml_checkpoint.html#sphx-glr-examples-auto-ml-checkpoint-py" rel="noopener noreferrer"&gt;deactivate all your pipeline’s checkpoints easily&lt;/a&gt;. Checkpoints are good for training the model, debugging it and actively coding the pipeline, but in production it’s just heavy and it must be easily disableable.&lt;/li&gt;
&lt;li&gt;The ability to &lt;a href="https://github.com/Neuraxio/Neuraxle" rel="noopener noreferrer"&gt;scale your ML pipeline on a cluster of machines&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;Finally, you want the whole thing to be robust to errors and to do good predictions. &lt;a href="https://github.com/Neuraxio/Neuraxle" rel="noopener noreferrer"&gt;Automatic Machine Learning&lt;/a&gt; can help here.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;And if your goal is instead to continue to do competitions, please at least note that I started winning more competitions &lt;strong&gt;after&lt;/strong&gt; learning how to do clean code. So the solutions above should as well apply in competitions, you’ll have more mental clarity, and as a result, more speed too, even if designing and thinking about your code beforehand seems like taking a lot of precious time. You’ll start saving even in the short run, quickly. Now that we’ve built a framework easing the process of writing clean pipelines, we have a hard time picturing how we’d get back to our previous habits anytime. Clean must be the new habit.&lt;/p&gt;

&lt;p&gt;In all cases, using good patterns and good practices will almost always save time even in the short or medium term. For instance, &lt;a href="https://www.neuraxle.org/stable/examples/boston_housing_regression_with_model_stacking.html#sphx-glr-examples-boston-housing-regression-with-model-stacking-py" rel="noopener noreferrer"&gt;using the pipe and filter design pattern with Neuraxle&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;It’s hard to write good code when pressured by the deadline of a competition. With no incentives to build reusable and deployable code, it can be hard. We created Neuraxle to easily allow for the good abstractions to be used when in a rush. As a result, it’s a good thing that competition code be refactored into Neuraxle code, and it’s a good idea to write all your future code using a framework like Neuraxle.&lt;/p&gt;

&lt;p&gt;The future is now. If you’d like to support Neuraxle, we’ll be glad that you &lt;a href="//mailto:hello@neuraxio.com"&gt;get in touch with us&lt;/a&gt;. You can also &lt;a href="https://www.neuraxio.com/en/blog/neuraxle/index.html" rel="noopener noreferrer"&gt;register to our updates and follow us&lt;/a&gt;. Cheers!&lt;/p&gt;

</description>
      <category>cleancode</category>
    </item>
    <item>
      <title>How to Code Neat Machine Learning Pipelines?</title>
      <dc:creator>Guillaume Chevalier</dc:creator>
      <pubDate>Sun, 22 Dec 2019 03:15:35 +0000</pubDate>
      <link>https://dev.to/neuraxio/how-to-code-neat-machine-learning-pipelines-475i</link>
      <guid>https://dev.to/neuraxio/how-to-code-neat-machine-learning-pipelines-475i</guid>
      <description>&lt;p&gt;Have you ever coded an ML pipeline which was taking a lot of time to run? &lt;/p&gt;

&lt;p&gt;Or worse: have you ever got to the point where you needed to save on disk intermediate parts of the pipeline to be able to focus on one step at a time by using checkpoints? &lt;/p&gt;

&lt;p&gt;Or even worse: have you ever tried to refactor such poorly-written machine learning code to put it to production, and it took you months? &lt;/p&gt;

&lt;p&gt;Well, we’ve all been there working on machine learning pipelines for long enough. &lt;/p&gt;

&lt;p&gt;So how should we build a good pipeline that will give us flexibility and the ability to easily refactor the code to put it in production later?&lt;/p&gt;

&lt;p&gt;Read the full post here: &lt;br&gt;
&lt;a href="https://www.neuraxio.com/en/blog/neuraxle/2019/10/26/neat-machine-learning-pipelines.html"&gt;https://www.neuraxio.com/en/blog/neuraxle/2019/10/26/neat-machine-learning-pipelines.html&lt;/a&gt;&lt;/p&gt;

</description>
      <category>python</category>
      <category>machinelearning</category>
      <category>architecture</category>
    </item>
  </channel>
</rss>
