<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by John Aven on Medium]]></title>
        <description><![CDATA[Stories by John Aven on Medium]]></description>
        <link>https://medium.com/@snoodleboot?source=rss-5f41e82a2ff7------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/2*vs822Rfc9VqqAdoWvjMclw.jpeg</url>
            <title>Stories by John Aven on Medium</title>
            <link>https://medium.com/@snoodleboot?source=rss-5f41e82a2ff7------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sun, 29 Nov 2026 11:35:58 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@snoodleboot/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[The Guide to Writing Good Software]]></title>
            <link>https://medium.com/contrarian-engineering/the-guide-to-writing-good-software-4aab24cf027f?source=rss-5f41e82a2ff7------2</link>
            <guid isPermaLink="false">https://medium.com/p/4aab24cf027f</guid>
            <category><![CDATA[ml-engineering]]></category>
            <category><![CDATA[software-architecture]]></category>
            <category><![CDATA[gsd]]></category>
            <category><![CDATA[data-engineering]]></category>
            <category><![CDATA[software-engineering]]></category>
            <dc:creator><![CDATA[John Aven]]></dc:creator>
            <pubDate>Tue, 24 Jan 2023 23:05:03 GMT</pubDate>
            <atom:updated>2023-02-08T18:36:39.757Z</atom:updated>
            <content:encoded><![CDATA[<h4>Code Decay and Technical Debt SUCK</h4><p>So…</p><p>I will be presenting here and within this series my views and opinions and reflect a great degree on how I address the bigger picture of tech debt. Nothing here is negative, it is all positive — we all want to grow! But don’t always know how. It is the job of leadership to point the way, it is the job of the junior to follow while asking questions.</p><p>I have been fortunate in my career to have been exposed to software, data, and ML engineering across many domains and from within various organization levels. And there has been one dominant trend — most engineers write bad code. That doesn’t mean that they are bad engineers. Most of the time, it’s because they have had some fundamental gaps in their professional development. These commonly fit into</p><ul><li>Lack of senior mentorship</li><li>Lack of exposure to good practices</li><li>Poor organizational development practices</li><li>Early in career</li><li>No constructive or assistive feedback</li></ul><p>There are other reasons as well, but those should suffice to paint a picture of where this comes from.</p><p>But why is writing bad code a bad thing? Bad code leads to many hard-to-correct issues that can cost a company in the short run by contributing to customer churn, product instability, and an increase in fragility and bugginess. In the long run, it can hurt through the exponential slowing of release timelines, loss of industry trust, and ultimately company failure.</p><p>So, what’s my point? My point is that by writing good code, you can avoid many of the headaches addressed above. The problem comes from the first part — you can’t solve the second without solving the first issue. So, through a series of articles that I will chronicle here, I will first cover the first part by providing approaches, mindsets, and strategies on</p><ul><li>Basic Coding Practices</li><li>Software Architecture</li><li>Refactoring Strategies</li><li>DevOps Practices</li><li>SOLID OOP</li><li>FP vs. OOP</li><li>Design Driven Development</li><li>Cloud-Native Development</li><li>Microservices &amp; Communication Protocols</li></ul><p>and how to recover from troublesome engineering scenarios</p><ul><li>Refactoring team structures</li><li>Adjusting your SDLC for success</li><li>Data-driven development health</li><li>Managing customer expectations during change</li><li>Refactoring complex code</li><li>Improving product quality</li><li>Trash cans are for rewrites</li><li>Bottleneck elimination</li></ul><p>Nobody, engineer or business partner, wants to have substantial tech debt or even spend the time and money to resolve it.</p><p>If this is of interest, I’d love to have you follow along. If there is a topic you see missing, please let me know here or through my <a href="https://www.linkedin.com/in/john-aven-phd/">LinkedIn</a> profile, and I will be glad to see if I can fit it into the series!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=4aab24cf027f" width="1" height="1" alt=""><hr><p><a href="https://medium.com/contrarian-engineering/the-guide-to-writing-good-software-4aab24cf027f">The Guide to Writing Good Software</a> was originally published in <a href="https://medium.com/contrarian-engineering">Contrarian Software Engineering</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Introducing Hashmap Data Migrator]]></title>
            <link>https://medium.com/hashmapinc/introducing-hashmap-data-migrator-87417065dbc8?source=rss-5f41e82a2ff7------2</link>
            <guid isPermaLink="false">https://medium.com/p/87417065dbc8</guid>
            <category><![CDATA[data-migration]]></category>
            <category><![CDATA[data]]></category>
            <category><![CDATA[python]]></category>
            <category><![CDATA[data-engineering]]></category>
            <category><![CDATA[cloud-computing]]></category>
            <dc:creator><![CDATA[John Aven]]></dc:creator>
            <pubDate>Fri, 08 Jan 2021 13:02:34 GMT</pubDate>
            <atom:updated>2021-03-24T12:12:38.910Z</atom:updated>
            <content:encoded><![CDATA[<h4>Open Source Tooling to Move Your Data Warehouse to the Cloud</h4><p>by John Aven and Jhimli Bora</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*7XQ1MbzqfdE5gb-T0Yk0_g.png" /></figure><p>Choosing the right tools can be difficult when planning to <a href="https://www.hashmapinc.com/cloudmigrations">move data to the cloud</a> or any migration of a large data asset or assets. Additionally, the tools chosen to transport data in your new system may not support your current data systems — especially in the capacity of a migration. The <a href="https://www.hashmapinc.com/">Hashmap</a> team has built an open-source tool aimed to fill that temporary gap.</p><h3>About</h3><p>Hashmap Data Migrator, or <a href="https://www.hashmapinc.com/hdm"><strong>hdm</strong> </a>(yes — lowercase), is an open-source software from Hashmap. It is Apache 2.0 licensed. hdm’s goal is to assist in moving data from your on-premises data warehouse (Netezza, Exadata, SAP HANA, Teradata, Hadoop, Oracle, etc.) into your <a href="https://www.hashmapinc.com/cloudmigrations">cloud data warehouse</a> of choice (Snowflake, BigQuery, Synapse, RedShift, etc.) — some functionality is still in development.</p><p>This library has been built and re-built a few times with the intent of getting the feel just right. Early versions of the library went by the name of knerrir — and the internal parts of the library had nautical themes (knerrir is a fleet of Viking cargo ships). Ultimately, the mix of library components having odd names and an evolving design didn’t mesh too well. After many internal simplifications and rewrites, the library’s name was rebranded — the name didn’t feel right anymore.</p><p>hdm is designed to work out of the box for most data transport use cases. It can be extended to your needs for a personalized fit when you have specific compliance requirements (e.g., a new link in the pipeline to do particular tests/checks against the data.). Such customization isn’t generally feasible in a migration setting with off-the-shelf tooling. Furthermore, the software’s design is such that the migrator’s runtime can be distributively deployed across different machines, partially on-premises, partially in the cloud, and various other combinations as long as there is a shared database to maintain the state and <em>lineage.</em></p><h3>Architecture</h3><p>The design of hdm focuses on the following qualities:</p><ol><li><strong>Composability</strong> — Different environments have different needs, so combine what is needed to move data from A to B.</li><li><strong>Configurability</strong> —Connections, watermarks, stage names, and so on are all environment and business decision based and may be determined to some extent by target infrastructure and runtime environment.</li><li><strong>Stateful</strong> — The state of the data and a running pipeline is known at all times and can be restarted/continued from where it last left off.</li><li><strong>Deployable</strong> — The solution can be decomposed and deployed.</li><li><strong>Auditable</strong> — The state of the system maintains an audit trail of all data movement.</li><li><strong>Distributable</strong> — While some steps will need common access to storage layers, it can be deployed in disparate locations.</li><li><strong>Resilience</strong> — The system does not fail when errors are observed (a few exceptions are being worked on still).</li></ol><p>In terms of the software is built on SOLID design principles and various design patterns:</p><ol><li><strong>Inversion of Control </strong>— A Dynamic Service Locator with Dependency Injection is used in the form of the library <a href="https://gitlab.com/hashmapinc/oss/providah">providah</a>.</li><li><strong>Template</strong> — The interfaces are not really interfaces, but templated base classes that define an API and implement baseline functionality. This functionality is overridden as necessary.</li><li><strong>Scheduler</strong> — Code is executed on threads in the batch orchestration. For each thread, the state can update and cause a recursive call until done.</li><li><strong>Mediator</strong> — This is used to get and set the state of the processing pipelines at various stages.</li></ol><p>The software is made up of 5 main components:</p><ol><li><a href="https://medium.com/p/c193f4b1aa36/edit"><strong>State Management</strong></a><strong> — </strong>software &amp; database.</li><li><strong>Configurations — </strong>data transport pipeline &amp; data system access.</li><li><strong>Catalog</strong> — responsible for identifying all data assets to migrate and creating the necessary entities in the target system.</li><li><strong>Orchestration</strong> — engine which supports various modes of pipeline execution.</li><li><strong>DataLinks</strong> — pairs of source/sink specifications. A chain of DataLinks makes up a data transport pipeline.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*_y-2NrFCQMeaY74OZJwqPw.png" /><figcaption>High-level diagram showing the various data flow aspects of hdm.</figcaption></figure><p>In this diagram:</p><ul><li>Blue arrows represent the scraping of DDL from source data systems.</li><li>Black arrows are the process flow for catalog generation.</li><li>Magenta arrows are the DDL-based asset generation in the sink systems based upon source systems.</li><li>The yellow and red arrows represent two separate data movement pipelines.</li><li>Green arrows are the input configurations.</li><li>The bi-directional purple arrow represents the synchronization of state and lineage of data transfer.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*5heu_zIelAQ-q-A0rggj8w.png" /><figcaption>Classifier UML for the main Interfaces in the hdm library.</figcaption></figure><p>In addition to these classes, there are a few driver classes that are not represented. The bulk of any extension to this library will happen with the above-named interfaces. For clarity, all diamond arrows indicate that the parent&#39;s lifecycle constrains the child&#39;s life-cycle.</p><h4>Source &amp; Sinks</h4><p>Sources and sinks are abstractions of data assets &amp; actions. Data assets are Netezza databases, file systems, object stores (S3, Azure Data Lake Services, etc.), cloud data warehouses — like Snowflake, and so on. The actions are abstractions describing how connections are established (JDBC/ODBC, SFTP, etc.) with the source or sink, how data is moved in or out, and how data is partitioned (e.g., splitting of large files into smaller ones). To keep things simple, the object model is designed so that each such combination is given a specialization (in the object-oriented sense) — thus minimizing the complexity around the composition. While this produces many more classes that would need to be managed through a ‘factory.’ We use <a href="https://gitlab.com/hashmapinc/oss/providah">providah</a> to remove the need to build and maintain various factory classes.</p><h4>Orchestration</h4><p>Managing multiple pipelines can be complex. While we have plans to implement additional orchestration options soon, we have two main orchestration options:</p><ul><li>DeclaredOrchestrator — Each data pipeline is fully specified and executes as a stand-alone pipeline. There is no reuse of individual components.</li><li>BatchOrchestrator — In this orchestration, a specific portion of a ‘root’ source configuration is specified (e.g., a Table &amp; Watermark column for a database source) as a list of targets. The remainder of the pipeline is reusable and will be shared for all originating sources in the template.</li></ul><p>We are currently working on an additional orchestration option, AutoBatchOrchestrator. In the option, orchestration will integrate the cataloging capabilities to enhance batch extraction to adapt to data asset changes.</p><h4>Configuring a Pipeline</h4><p>Pipelines are configured through a YAML-based configuration.</p><p>Pipelines are defined declaratively in YAML files. These YAML files identify:</p><ul><li><strong>orchestrator</strong>: (internal hdm concept) used to orchestrate your pipeline&#39;s execution.</li></ul><p>It is formatted in the YAML as depicted below:</p><pre>orchestrator:<br>  name: Manual Orchestration<br>  type: declared_orchestrator<br>  conf: null</pre><ul><li><strong>state_manager</strong>: Next the State Manager is specified. This should be consistent across all of the pipelines. The State Manager is the glue the couples the otherwise independent portions of the pipeline together.</li></ul><p>It is formatted in the YAML as depicted below:</p><pre>state_manager:<br>  name: state_manager<br>  type: SQLiteStateManager<br>  conf:<br>    connection: state_manager</pre><p>Next is the portion of the YAML that specifies the different steps in the data movement. These will be specified in two separate sections.</p><ul><li><strong><em>declared_data_links</em> </strong>— These are fully specified portions of a pipeline. In this, each pair of source &amp; sink is called a stage. See the example below that is targeted at offloading data from Netezza and storing it on a filesystem.</li></ul><pre>declared_data_links:<br>  stages:<br>    - source:<br>        name: Netezza Source Connection<br>        type: NetezzaSource<br>        conf:<br>          ...<br>      sink:<br>        name: File System Sink Connection<br>        type: FSSink<br>        conf:<br>          ...</pre><ul><li><strong><em>template_data_links</em> </strong>— These are partially defined source/sink pairs. Instead of being called stages, they are called templates. A template has an additional field called a batch_definition. A batch definition will define how the template source is used — the source is ALWAYS the template. See an example below for creating a pipeline that is pulling multiple tables at once. A similar example would be found for auto batch orchestration.</li></ul><pre>template_data_links:<br>  templates:<br>    - batch_definition:<br>        - source_name: netezza_source<br>          field: table_name<br>          values:<br>            - database.schema.table_1<br>            - database.schema.table_1<br>          threads: 5<br>      source:<br>        name: netezza_source<br>        type: NetezzaSource<br>        conf:<br>          ...<br>          table_name: &lt;&lt;template&gt;&gt;<br>      sink:<br>        name: fs_chunk_stg<br>        type: FSSink<br>        conf:<br>          ...</pre><h3>Using hdm</h3><p>While <a href="https://www.hashmapinc.com/hdm">hdm</a> appears to have many moving parts, it is quite simple to use. This will be covered in the next blog post of the series.</p><p>For out-of-the-box functionality, you must:</p><ol><li>Create a <strong>.hashmap_data_migrator</strong> directory in your user ‘root’.</li><li>Create a <strong>hdm_profiles.yml</strong> to store local secrets for connections (integrations with key management systems like Hashicorp Vault and Azure KeyVault don’t come out of the box at this time).</li><li>A <strong>manifest.yml</strong> (name it what you want) with a pipeline configuration.</li></ol><p>If you wish to extend the library&#39;s functionality, you must either extend/implement an interface (see UML above) or a child class thereof. How and where (folder-wise) you organize these extensions is up to you. Thanks to the <a href="https://gitlab.com/hashmapinc/oss/providah">providah</a> library, you will only need to make sure that your class definitions are scraped.</p><pre>python -m hashmap_data_migrator {manifest} -l {log settings} -e {env}</pre><p>Where {manifest} is the manifest.yml file, {log settings} is a log configuration file, and {env} is an indicator of the environment in the hdm_profiles.yml that will be used to execute the pipeline.</p><p>Watch a demo of hdm in this Hashmap Megabyte video:</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2Frq525RJoCMQ%3Ffeature%3Doembed&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3Drq525RJoCMQ&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2Frq525RJoCMQ%2Fhqdefault.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/652a1bb13a6ca5c284b4b8c10797a144/href">https://medium.com/media/652a1bb13a6ca5c284b4b8c10797a144/href</a></iframe><h3>What’s to Come</h3><ol><li>Source Support for <a href="https://www.hashmapinc.com/snowflake-hadoopaccelerator">Hadoop</a>, <a href="https://www.hashmapinc.com/migration-exadata-to-snowflake">Exadata</a>, etc. (<a href="https://medium.com/hashmapinc/accelerating-netezza-to-snowflake-migrations-59440ce05d97">Netezza is supported now</a>)</li><li>Sink Support for Synapse, Redshift, BigQuery (Snowflake is supported now)</li><li>Data Quality Integration to automate data validation at all ends</li><li>Cloud-Native &amp; Dockerized Deployments</li><li>Fit-for-purpose packaging. We will be providing packaging designed around your specific migration needs. Specialized libraries that don’t have all the unnecessary dependencies — only what you need.</li></ol><h3>Resources</h3><p>Gitlab Mirror: <a href="https://gitlab.com/hashmapinc/oss/hashmap-data-migrator">https://gitlab.com/hashmapinc/oss/hashmap-data-migrator</a></p><p>Github Mirror:<a href="https://github.com/hashmapinc/hdm"> https://github.com/hashmapinc/hdm</a></p><p>PyPI: <a href="https://pypi.org/project/hashmap-data-migrator/">https://pypi.org/project/hashmap-data-migrator</a></p><h3>Ready to Accelerate Your Digital Transformation?</h3><p>If you are considering moving data and analytics products and applications to the cloud or if you would like help and guidance and a few best practices in delivering higher value outcomes in your existing cloud program, then please <a href="https://www.hashmapinc.com/reach-out">contact us.</a></p><p><a href="https://www.hashmapinc.com/"><strong>Hashmap</strong></a> offers a range of enablement workshops and assessment services, cloud modernization and migration services, and consulting service packages as part of our Cloud service offerings. We would be glad to work through your specific requirements.</p><p>Hashmap’s <a href="https://www.hashmapinc.com/workshop-migrate-and-modernize">Data &amp; Cloud Migration and Modernization Workshop</a> is an interactive, two-hour experience for you and your team to help understand how to accelerate desired outcomes, reduce risk, and enable modern data readiness. We’ll talk through options and make sure that everyone has a good understanding of what should be prioritized, typical project phases, and how to mitigate risk. <a href="https://migrations.hashmapinc.com/migrations-workshop">Sign up today</a> for our complimentary workshop.</p><p><a href="https://www.hashmapinc.com/workshop-migrate-and-modernize">Data &amp; Cloud Migrate &amp; Modernize Workshop | Hashmap</a></p><h3>Other Tools and Content You Might Like</h3><ul><li><a href="https://www.hashmapinc.com/snowflake-utilities-accelerators">Snowflake Utilities &amp; Accelerators | Do more with Snowflake | Hashmap</a></li><li><a href="https://medium.com/hashmapinc/accelerating-netezza-to-snowflake-migrations-59440ce05d97">Accelerating Netezza to Snowflake Migrations</a></li><li><a href="https://www.youtube.com/channel/UCZlzWvmHe5Zq2R9p9AgbEdQ">HASHMAP</a></li><li><a href="https://medium.com/hashmapinc/behind-the-scenes-of-snowflake-healthcheck-661091ba1701">Behind the Scenes of Snowflake Healthcheck</a></li></ul><p><em>Feel free to share on other channels and be sure and keep up with all new content from Hashmap </em><a href="http://hashmapinc.com/"><strong><em>here</em></strong></a><em>. To listen in on a casual conversation about all things data engineering and the cloud, check out Hashmap’s podcast </em><a href="https://www.hashmapinc.com/hashmapontap"><strong><em>Hashmap on Tap</em></strong></a><strong><em> </em></strong><em>as well on Spotify, Apple, Google, and other popular streaming apps.</em></p><p><a href="https://www.hashmapinc.com/hashmapontap">Hashmap on Tap | Hashmap Podcast</a></p><p><strong><em>John Aven</em></strong><em>, Ph.D., is the Director of Engineering at </em><a href="http://hashmapinc.com/"><strong><em>Hashmap</em></strong></a><strong><em>, an NTT DATA Company, </em></strong><em>providing Data, Cloud, IoT, and AI/ML solutions and consulting expertise across industries with a group of innovative technologists and domain experts accelerating high-value business outcomes for our customers. Be sure and connect with John on </em><a href="https://www.linkedin.com/in/john-aven-phd/"><strong><em>LinkedIn</em></strong></a><em> and reach out for more perspectives and insight into accelerating your data-driven business outcomes.</em></p><p><strong><em>Jhimli Bora </em></strong>is <em>a Cloud and Data Engineer with </em><a href="https://www.hashmapinc.com/"><strong><em>Hashmap</em></strong></a><strong><em>, an NTT DATA Company, </em></strong><em>providing Data, Cloud, IoT, and AI/ML solutions and consulting expertise across industries with a group of innovative technologists and domain experts accelerating high-value business outcomes for our customers. Connect with her on </em><a href="https://www.linkedin.com/in/jhimlibora/"><em>LinkedIn</em></a><strong><em>.</em></strong></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=87417065dbc8" width="1" height="1" alt=""><hr><p><a href="https://medium.com/hashmapinc/introducing-hashmap-data-migrator-87417065dbc8">Introducing Hashmap Data Migrator</a> was originally published in <a href="https://medium.com/hashmapinc">Hashmap, an NTT DATA Company</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Exploring DevOps Options]]></title>
            <link>https://medium.com/hashmapinc/exploring-devops-options-bbaeaf62a0c8?source=rss-5f41e82a2ff7------2</link>
            <guid isPermaLink="false">https://medium.com/p/bbaeaf62a0c8</guid>
            <category><![CDATA[gitlab-ci]]></category>
            <category><![CDATA[version-control]]></category>
            <category><![CDATA[devops]]></category>
            <category><![CDATA[git]]></category>
            <category><![CDATA[gitlab]]></category>
            <dc:creator><![CDATA[John Aven]]></dc:creator>
            <pubDate>Fri, 04 Dec 2020 13:22:41 GMT</pubDate>
            <atom:updated>2020-12-04T13:22:41.387Z</atom:updated>
            <content:encoded><![CDATA[<h4>Working with GitLab</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*QTgcmdzxRxIt42Xc_SOFHA.png" /></figure><p>Here, <a href="https://www.hashmapinc.com/">at Hashmap</a>, we use <a href="https://about.gitlab.com/">GitLab</a> as one of our many version control platforms. Yes, we employ more than one — we are a consulting firm — and as a consulting firm, it pays to be familiar with a plethora of the tools available out there. However, the core of our work is done with GitLab for some fundamental reasons we will discuss below. That aside, we’d like to talk about the basics of using GitLab and some of the cool features.</p><h3>The Very Basics</h3><p>GitLab is, well, at the base, just another git repository hosting service. As soon as you venture away from that base level, you start to discover some unique and originating ideas. First off, it offers free private repositories — which is excellent for smaller companies — with approachable pay tiers that can be approached as your company grows. It also has self-hosting options if you don’t want to host your code on their public cloud instance — they run on Google Cloud Platform. As soon as you create a project, you realize some of the menus aren’t like those of its competitors (although they have been catching up). And since you are starting to see similar capabilities, the most basic of these are:</p><ul><li>Integrated task management (Kanban board with issues, labels, and milestones — much more as your pay grade increases)</li><li>Baked in CI/CD pipelines that you can either use their shared runners — get started quick — or run on privately hosted Kubernetes clusters on Google Cloud Platform (GKE)</li><li>Wiki for software and user documentation is a separate git repository that can be edited offline.</li></ul><p>These three things enable the basis of most modern software development project management stacks. But wait, there’s more!</p><h3>Additional Software Development Support</h3><p>There are so many features in GitLab — and new ones always popping up — but here is a quick synopsis of a few I find the most immediate value in:</p><h4>Integrated IDE</h4><p>GitLab has an integrated IDE that supports dozens of languages, with built-in syntax highlighting. This is a handy tool to use in a pinch or for that developer that doesn’t want to deal with setting a more fully feature IDE on their machine (yes — I know some of you still use <em>vi</em> and all of its plugins — not my flavor, but to each their own). Furthermore, the IDE may be a suitable choice for some smaller companies who want to use a simple solution.</p><h4>Reusable CI/CD Pipelines</h4><p>How often do you end up recreating — you know, exercising that copypasta skill — the same build and deploy steps in your CI/CD pipelines? Well, GitLab’s CI/CD platform has a solution for this and for many other needs (we’ll discuss these at a later time). To reuse CI/CD pipelines or reuse various pipeline components, the <em>include</em> statement is used:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/642/1*v8VIMgHqG6U9bcWjqB-nrA.png" /><figcaption>Oversimplified example with a locally defined sub-pipeline.</figcaption></figure><p>Want to learn more? Then please read <a href="https://medium.com/u/886c759dd690">Sam Kohlleffel</a>’s <a href="https://medium.com/hashmapinc/creating-reusable-ci-cd-pipelines-with-gitlab-4c898de30b1e">blog post</a> on building reusable pipelines in GitLab for work we do here internally at Hashmap.</p><h4>Organizing in Groups</h4><p>Without understatement, my favorite feature of GitLab is the ability to organize your work in a project structure called Groups. Maybe this is because I am partial to Google Cloud Platform in my own work — or maybe it is a logical structure that lets me organize the numerous repositories we have here at Hashmap. Hashmap is filled with technically savvy individuals in many departments. And to support this, and with our size, we have developed a department hierarchy for managing our code and publically mirrored repositories.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/934/1*KqqmLpuTXfFN6GmZZQ4vnQ.png" /><figcaption>Top Level of our Group organization</figcaption></figure><p>This is the current hierarchy at a high level. Within each of the branches, there is further decomposition into other purposefully named subgroups. Each of the main branches has a ‘pocs’ section — this is a section where employees are given control to do their own experimentation, create their own projects as they wish, test out new ideas, learn, and experiment.</p><p>While at Hashmap, we have an openness policy that makes all of our internal work open to other Hashmappers, thus allowing internal growth and shared contribution. This isn’t for everyone. In most organizations, there is a necessity for stricter controls — and this level of organization allows this through role-based access control at the group level following the principle of least privilege.</p><h3>Closing Thoughts</h3><p>While there are many additional capabilities that GitLab enables, it is not my intent to provide an end-to-end synopsis of GitLab here. Additional blog posts do and/or will cover more of these. Still, you are always welcome to contact us at <a href="https://www.hashmapinc.com/reach-out">Hashmap</a> to have additional discussions or contact me through social media for additional discussions. Making the best of your environment in a fit-for-purpose way for YOU is why we are here.</p><h3>Ready to Accelerate Your Digital Transformation?</h3><p>At Hashmap, we work with our clients to build better, together.</p><p>If you’d like additional assistance in this area, <a href="https://www.hashmapinc.com/solutionconsulting"><strong>Hashmap</strong></a> offers a range of enablement workshops and consulting service packages as part of our consulting service offerings, and would be glad to work through your specifics in this area.</p><p><em>Feel free to share on other channels and be sure and keep up with all new content from Hashmap </em><a href="http://hashmapinc.com/"><strong><em>here</em></strong></a><em>. To listen in on a casual conversation about all things data engineering and the cloud, check out Hashmap’s podcast </em><a href="https://www.hashmapinc.com/hashmapontap"><strong><em>Hashmap on Tap</em></strong></a><strong><em> </em></strong><em>as well on Spotify, Apple, Google, and other popular streaming apps.</em></p><p><a href="https://www.hashmapinc.com/hashmapontap">Hashmap on Tap | Hashmap Podcast</a></p><h3>Other Tools and Content You Might Like</h3><ul><li><a href="https://medium.com/hashmapinc/building-ml-pipelines-654daf4f23dc">Building ML Pipelines</a></li><li><a href="https://medium.com/hashmapinc/creating-reusable-ci-cd-pipelines-with-gitlab-4c898de30b1e">Creating Reusable CI/CD Pipelines with Gitlab</a></li><li><a href="https://www.hashmapinc.com/snowflake-utilities-accelerators">Snowflake Utilities &amp; Accelerators | Do more with Snowflake | Hashmap</a></li><li><a href="https://medium.com/hashmapinc/how-we-automated-snowflake-data-profiler-cfe93ea5703c">How We Automated Snowflake Data Profiler</a></li></ul><p><strong><em>John Aven</em></strong><em>, Ph.D., is the Director of Engineering at </em><a href="http://hashmapinc.com/"><strong><em>Hashmap</em></strong></a><strong><em>:</em></strong><em> providing Data, Cloud, IoT, and AI/ML solutions and consulting expertise across industries with a group of innovative technologists and domain experts accelerating high-value business outcomes for our customers. Be sure and connect with John on </em><a href="https://www.linkedin.com/in/john-aven-phd/"><strong><em>LinkedIn</em></strong></a><em> and reach out for more perspectives and insight into accelerating your data-driven business outcomes.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=bbaeaf62a0c8" width="1" height="1" alt=""><hr><p><a href="https://medium.com/hashmapinc/exploring-devops-options-bbaeaf62a0c8">Exploring DevOps Options</a> was originally published in <a href="https://medium.com/hashmapinc">Hashmap, an NTT DATA Company</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Building ML Pipelines]]></title>
            <link>https://medium.com/hashmapinc/building-ml-pipelines-654daf4f23dc?source=rss-5f41e82a2ff7------2</link>
            <guid isPermaLink="false">https://medium.com/p/654daf4f23dc</guid>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[containerization]]></category>
            <category><![CDATA[docker]]></category>
            <category><![CDATA[mlops]]></category>
            <category><![CDATA[data-science]]></category>
            <dc:creator><![CDATA[John Aven]]></dc:creator>
            <pubDate>Thu, 19 Nov 2020 18:58:51 GMT</pubDate>
            <atom:updated>2020-11-19T19:26:50.117Z</atom:updated>
            <content:encoded><![CDATA[<h4>Dockerizing Your Code</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*1svaWDdDLl8smXZt5e0a3A.png" /></figure><p>Machine learning continues to evolve. While many folks are moving towards more modern approaches, there is still an apprehension around using <a href="https://www.docker.com/">Docker</a> and Docker related technologies in much of data science. Making the change and using a containerized solution space like Docker is not necessarily an easy step to take — much like moving your data science workloads to the cloud wasn’t (and maybe you still haven’t taken that step).</p><p>Docker, often called a containerization technology, uses an abstraction of virtualization that reuses the host system Linux kernel to package and run an application in a platform-independent immutable deployment unit. This packaging creates immutably deployable software meant to be identically executable (and often abstractly reusable) across any platform with a running Docker or <a href="https://kubernetes.io/">Kubernetes</a> installation.</p><h3>Why!</h3><p>Now, what does this have to with building an ML pipeline? That’s an easy question. The difficult one is how to dockerize your data science code.</p><p>Data Science as a practice has some shortcomings — many sciences really do — but scientists don’t really want to admit to this. In data science, it is around how they execute their experiments, manage the results, and version their executable code. In reality, if you want to be as ethical in your experiments as possible, then you want to have completely versioned steps end-to-end. But we aren’t here to discuss the end-to-end problem: baby steps are in order.</p><p>An incremental improvement in your data science/machine learning practice is to get into the habit of dockerizing (creating Docker executable packages/images) the various components of your pipeline. Each piece, or if an appropriate collection of executable pieces, should be written into an immutable, versioned, and tagged docker image. This will, much more than version control, ensure that the code training is repeatable (regardless of where it runs). By using a Docker hub/repository, whether public or private, should be used so that you can store copies of all of your execution artifacts. All of this (and more) will help make sure that you are using ethical and compliant ML practices.</p><p>Stitching the execution of these pipelines together is not always a simple matter. It does take some time to educate yourself on building the pipelines and solving the approach that is the best fit for you and your team.</p><h3>Dockerizing Your Pipeline</h3><p>The first step in dockerizing your code is to know the basics of Docker. And since I have no intention of creating a tutorial on Docker at this time, I refer you to this excellent <a href="https://docker-curriculum.com/">tutorial</a>. The remaining steps are:</p><ol><li><strong>Create a Dockerfile</strong> for each section of your pipeline that you wish to keep separate in execution from the others. This separation can be done at language boundaries (R vs. Python), library version differences, natural/organic separations (feature selection vs. model training), data locality (on-premises vs. cloud), and so on.</li><li><strong>Choose a base Docker Image</strong> that will pacify most of your requirements — there are many pre-built Docker images tailored to handle different machine learning needs. But as a rule, most Docker images will not fit your specific needs. You should create images that fit your common stack so that you minimize build times for repetitive actions (like rerunning pipelines with small changes). The Docker image used as your base is placed on a line using the FROM statement.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/522/1*YP2e12ESciZFfaSFfhsBSw.png" /><figcaption>Base docker image for Tensorflow</figcaption></figure><p>3.<strong> Add Requirements </strong>to the Docker image. These requirements can be anything from small datasets, configuration information (be careful here on storing secrets when your image may be public — and even when it is private — there are better strategies for this), code dependencies, and much more. These are the things that are needed to make your code GO. Adding content is done through either the COPY or ADD statement.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/404/1*zEDfd_JspnA2a65Ro4THYw.png" /><figcaption>Copying python requirements</figcaption></figure><p>4.<strong> Copy Code</strong> that will be used in your execution. If you are working with a large project, you may have many Docker images for the same code base, and so on, then it’s most likely a better option to copy the entire codebase into your image (often these really are small in the grand scheme of things). This is done the same as adding requirements using the COPY or ADD statement — we have a different intent here.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/318/1*28M3VkfK9NhyuX5qIL82PA.png" /><figcaption>Copying code to be executed.</figcaption></figure><p>5.<strong> Install Dependencies and Build Code</strong> that will be needed to execute your pipeline. Sometimes, like in most Python and R pipelines, it suffices to install your libraries, but if you are running code that is Java/Scala, C/C++, etc., you will need to compile your code within the Docker image. Dependencies are installed using RUN. A RUN statement will execute a bash command that follows. To make sure that your image is as small as possible — it&#39;s a Docker thing — you should chain your installation and build steps into a single bash command using &amp;&amp; whenever possible.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/534/1*gtS6gAVbk6sEW_YgN5iSaA.png" /><figcaption>Executing a pip install on python requirements</figcaption></figure><p>6.<strong> Set Execution Entrypoint</strong> so that when you run the Docker image, you choose to do so — it will know what code to run. This is done using the CMD statement. This command is a bit odd when you first encounter it but is essentially a list of strings that make up a bash command.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/472/1*fbK6ACdhq6n8uwxwIolxHQ.png" /><figcaption>Execution using preferred exec format</figcaption></figure><p>Putting it all together, you have a rather simple layout of what you should do. Now, Dockerfile images in the wild often have much more going on. Sometimes the underlying OS dependencies need to be updated, more complex installations are executed, more and different kinds of files are copied, environment variables are set, and much more.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/580/1*BJZ0TJbR3kSudSKcTy-RHg.png" /><figcaption>Contents of a Simple Dockerfile</figcaption></figure><p>7.<strong> Building the Image</strong> is the act of taking the instructions laid out in the Dockerfile and executing them against the Docker build engine to compile an executable engine. This step is not unlike the process one would take when compiling executable code — and if you read enough and happen to have the right software engineering background, you will start seeing a lot of parallels with object orient programming and software engineering general. Anyway, this image is built through a command-line bash command. It creates a binary image on your device that is now portable and executable on any platform where Docker is running — magic!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/710/1*B88ZXKbRAzlpL9U73zQc4g.png" /><figcaption>Command to build your docker image</figcaption></figure><p>8.<strong> Tag &amp; Publish Image</strong> your image to make sure that it is available to remote environments, relative to where you built the image, to be executable. Tagging is how you assign identifiable versions to an image. It is not uncommon to have multiple tags for an image. The tag LATEST is most often used for the latest stable image — e.g., not test or experimental images.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/834/1*h5pcKA9x-VoPyGJjEzeb1g.png" /><figcaption>Tag and Push commands</figcaption></figure><h3>Organizing your Code</h3><p>When working with Docker, especially when you have to manage to create your Docker images yourself, it is important to have a logical way of organizing your code. While the way I present here is how I personally like to manage the code with Docker, I don’t think that I would call it a preferred way. Ideally, whatever way you use, and any tooling you may use with it should give you the freedom to use your own organization.</p><p>My mind likes to compartmentalize different units of work. This is how I operate. So, naturally, I tend to organize my code similarly (all things code). Each logical portion of a pipeline/workflow tends to be placed within its own directory. This allows me to look at the code and see what I am doing. In the sample below, I will make a working assumption that all code for each stage is in one file (this is usually not the case — it is the exception — in well-organized code with a high reuse factor).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/806/1*yg5-ADTs8V6fikh90wA9Pg.png" /><figcaption>Roughly how I organize my code</figcaption></figure><p>Of course, you wouldn’t necessarily break things down this way — it doesn’t always beneficial to have such granularity — but the idea remains. What is important is for each thing I deploy is that I have a separate Dockerfile (not gonna talk about advanced approaches with templatization or other tools out there — we have one coming very soon and will fill it in here when ready — pay attention).</p><p>When I am working manually, I like to create a Bash script that encapsulates all of the work that I would be doing when deploying my code. In this case — as a point — that means having a complete build of all of the images (this is very quickly put together bash and not what someone would do in production).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*0tvoGgzhv11vTlw_lswR6Q.png" /><figcaption>Sample docker build and publish script.</figcaption></figure><p>Whatever you do, make sure that you have some organization that helps you organize your build process — whatever that may be (<a href="https://www.hashmapinc.com/">we can help</a>).</p><h3>Using your Dockerized Pipeline</h3><p>Running your dockerized data science pipelines can be done in many ways. In traditional approaches (tech ages FAST), you would run it on an on-premises system or a VM using docker-compose — hopefully not running using Docker run (unless you are testing). Docker-compose, Kubernetes (<a href="https://medium.com/hashmapinc/building-ml-pipelines-a6bff42c7154">with Argo — see this blog</a>), Prefect, <a href="https://medium.com/hashmapinc/orchestration-and-dag-design-in-apache-airflow-two-approaches-35edd3eaf7c0">Apache Airflow</a>, and various other technologies can be used to build an ML pipeline. These are all used to create an execution pipeline known as a DAG (<a href="https://medium.com/hashmapinc/building-ml-pipelines-8e27344a42d2">see my blog here explaining what a DAG is</a>). Once you have deployed your Docker and have chosen your pipeline orchestration technology, you can use it to run either locally or remotely (the preferred approach).</p><p>Your solution is now versioned, in a repository, and the data experiments you are performing are completely repeatable (cough, data changes, cough).</p><p>The best part, though, is that you will get the same results when you run it remotely, no matter where it is running. You won&#39;t need to worry about where it is running, and you will have your machine free from computational load to continue to develop more and better models.</p><h3>What I Didn&#39;t Talk About</h3><p>Quite honestly, a ton of topics — it is just not possible to give this justice in a single blog post. I can only give you a taste, and it is up to you where to go next. Building automation around your training process, storing and organizing your simulation results, deploying containerized models, obfuscating or hiding away the creation of your pipelines in complex tools, and so on — there are many topics. And I will be walking through these topics one at a time in this Building ML Pipelines series. They aren’t in any particular order: they will reference each other (as you have surely seen some links above), are meant to provide you some insight into the intricacies of doing ML in our evolving tech world, and hopefully help guide you down your path to MLOps maturity.</p><h3>How Hashmap Can Help</h3><p>The next step is deciding whether <a href="https://medium.com/hashmapinc/why-i-love-mlflow-951b8d1134be">MLflow</a> should be part of the data analytics solution for your organization. <a href="https://www.hashmapinc.com/">Hashmap</a> can help you here. Our machine learning and MLOps experts are here to help you on your journey — to bring you and your organization to the next level. Let us help you get ahead of your competition and become truly efficient in your data analytics.</p><p>If you’d like assistance along the way, then please <a href="https://www.hashmapinc.com/reach-out?utm_source=medium&amp;utm_medium=blog_post&amp;utm_campaign=Unit%20Testing%20on%20dbt%20Models%20Using%20a%20Static%20Test%C2%A0Dataset">contact us</a>.</p><p><a href="https://www.hashmapinc.com/?utm_source=medium&amp;utm_medium=blog_post&amp;utm_campaign=Unit%20Testing%20on%20dbt%20Models%20Using%20a%20Static%20Test%C2%A0Dataset">Hashmap</a> offers a range of enablement workshops and assessment services, cloud modernization and migration services, data science, MLOps, and various other technology consulting services.</p><p><em>To listen in on a casual conversation about all things data engineering and the cloud, check out Hashmap’s podcast </em><a href="https://www.hashmapinc.com/hashmapontap"><strong><em>Hashmap on Tap</em></strong></a><strong><em> </em></strong><em>as well on Spotify, Apple, Google, and other popular streaming apps.</em></p><p><a href="https://www.hashmapinc.com/hashmapontap">Hashmap on Tap | Hashmap Podcast</a></p><h3>Other Tools and Content You Might Like</h3><ul><li><a href="https://medium.com/hashmapinc/building-ml-pipelines-a6bff42c7154">Building ML Pipelines</a></li><li><a href="https://medium.com/hashmapinc/why-i-love-mlflow-951b8d1134be">Why I Love MLflow</a></li><li><a href="https://www.hashmapinc.com/megabytes">Hashmap Megabytes | Bite-Size Video Series</a></li><li><a href="https://www.hashmapinc.com/snowflake-utilities-accelerators">Snowflake Utilities &amp; Accelerators | Do more with Snowflake | Hashmap</a></li></ul><p><strong><em>John Aven</em></strong><em>, Ph.D., is the Director of Engineering at </em><a href="http://hashmapinc.com/"><strong><em>Hashmap</em></strong></a><strong><em>,</em></strong><em> providing Data, Cloud, IoT, and AI/ML solutions and consulting expertise across industries with a group of innovative technologists and domain experts accelerating high-value business outcomes for our customers. Be sure and connect with John on </em><a href="https://www.linkedin.com/in/john-aven-phd/"><strong><em>LinkedIn</em></strong></a><em> and reach out for more perspectives and insight into accelerating your data-driven business outcomes.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=654daf4f23dc" width="1" height="1" alt=""><hr><p><a href="https://medium.com/hashmapinc/building-ml-pipelines-654daf4f23dc">Building ML Pipelines</a> was originally published in <a href="https://medium.com/hashmapinc">Hashmap, an NTT DATA Company</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Building ML Pipelines]]></title>
            <link>https://medium.com/hashmapinc/building-ml-pipelines-8e27344a42d2?source=rss-5f41e82a2ff7------2</link>
            <guid isPermaLink="false">https://medium.com/p/8e27344a42d2</guid>
            <category><![CDATA[data-science]]></category>
            <category><![CDATA[prefect]]></category>
            <category><![CDATA[airflow]]></category>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[directed-acyclic-graph]]></category>
            <dc:creator><![CDATA[John Aven]]></dc:creator>
            <pubDate>Thu, 19 Nov 2020 15:15:51 GMT</pubDate>
            <atom:updated>2020-11-19T15:15:51.317Z</atom:updated>
            <content:encoded><![CDATA[<h4>What is a DAG?</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ru-4X6KH9Fm-RPmn25IlLQ.png" /></figure><p>In modern computing solutions, the concept of a DAG or Directed Acyclic Graph is central. While the term DAG has become quite the buzz word: understanding what they are, how they are used in computing, and how/where they show up in data science and machine learning is not just buzz. In short, a DAG describes a sequence of execution steps in the complex non-recurring computation.</p><p>How often do you come across the need to create a DAG in machine learning?</p><p>Every. Single. Day.</p><p>Machine learning can be constructively defined to be “the art of building DAGs to treat and transform data using a sequence of advanced mathematical transforms to generate a repeatable formulation that solves a problem for new data.” In Data Science and Machine Learning, a pipeline or workflow is nothing but a DAG. Note that this is not the only place where DAGs are found in Data Science/Machine Learning.</p><p>The point is, as you build your ML code, you need to orchestrate your workflow. There really is little reason to do this manually. Unfortunately, not everyone is aware of the tools out there. A first step is to understand what you are building — a DAG — and help you down that path. So let’s get started!</p><h3>DAGs Defined</h3><p>So, why do we call them DAGs? A DAG is a Directed Acyclic Graph — a mathematical abstraction of a pipeline. Let’s break this down a bit, though.</p><p>A <em>graph</em> is a collection of vertices (or point) and edges (or lines) that indicate connections between the vertices.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*9To_1IEr5_KspGZ8QIo-mA.png" /><figcaption>Simple Graph</figcaption></figure><p>A <em>directed graph</em> is a graph in which the edges point in a direction from one vertex to another. In this case, two edges between the same pair of vertices may exist, but in this case, they will point in opposite directions. A directed graph is often referred to as a digraph.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*L0ZuMCL-wSl1qQjBBzPyQw.png" /><figcaption>A simple digraph</figcaption></figure><p>A graph is <em>cyclic</em> if it contains one or more cycles, where a <em>cycle</em> is defined as a path between vertices along edges that allows you to return to a vertex along with a unique set of edges. A graph is <em>acyclic</em> when it contains no cycles.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ByZRSSuMD0xP9F6g_Xvmmg.png" /><figcaption>Digraph with a highlighted cycle</figcaption></figure><p>Therefore, a <em>directed acyclic graph</em> or <em>DAG</em> is a directed graph with no cycles. A rather simple concept once you can put some definition to it. And look at that — you came here to read about DAGs in ML Pipelines, and you got a mini-lesson in Graph Theory!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*3eEtimgIPEAuizSWtu6HyQ.png" /><figcaption>Simple DAG</figcaption></figure><p>So, in the end, the reason that the DAG terminology is used is not just because it is cool to say DAG, but because it describes the nature of a workflow in cases where you NEVER look back to previous steps.</p><p>Now, you may be saying… “We loop back all the time in machine learning; the model training step is fraught with it when you are optimizing, recurrent neural networks loop back on themselves, and so on!” — You are correct. A DAG is not a universal descriptor of a pipeline when you zoom in, but it is a descriptor at the high level of execution; it describes the steps being taken — aka the pipeline.</p><h3>Tools for &amp; with DAGs</h3><p>Now, while some folks still will build their pipelines manually, and by some, I mean many or most, this is very labor-intensive — time-intensive — hard to repeat!</p><p>Building your pipeline can be done with many tools. A few of which are:</p><ul><li><a href="https://airflow.apache.org/">Apache Airflow</a> — python-based orchestration platform built for operations teams and, to some extent, data science. One of the best UIs in this space.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*d4PjiXklgHyj3XBdgwBH2A.png" /><figcaption>Sample ML Pipeline in Airflow</figcaption></figure><ul><li><a href="https://www.prefect.io/">Prefect</a> — programmatic orchestration platform built to be used by developers. It is an emerging tool in this space that is gaining traction.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/350/1*Jz2UVqrVYj1hIwHxOpw2VQ.png" /><figcaption>Sample ML Pipeline in Prefect Core</figcaption></figure><ul><li><a href="https://argoproj.github.io/">Argo</a> — Workflow orchestration built for the cloud-native space. Declarative and with a simple to use UI. See my article <a href="https://medium.com/hashmapinc/building-ml-pipelines-a6bff42c7154">here</a>, where I address using Argo to build ML Pipelines.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*grWvT-3jUcrnbTrsVtRHAg.png" /><figcaption>Sample ML Pipeline in Argo</figcaption></figure><ul><li><a href="https://luigi.readthedocs.io/en/stable/index.html">Luigi</a> — Another open-source solution built to be used by developers.</li><li><a href="https://www.bmc.com/it-solutions/control-m.html">Ctrl-M</a> — Popular enterprise workflow management tool from BMC.</li><li><a href="https://www.tensorflow.org/tfx">TensorFlow-Extended (TFX)</a> — Orchestration layer used in TensorFlow for Deep Learning pipeline orchestration.</li></ul><p>These are tools that help you build compute pipelines as DAGs. They each have their own learning curves and cost/benefit tradeoffs. Choosing what is right for you truly depends on your operating environment, enterprise strategy, level of user expertise required, and whether you lean towards Open Source Solutions or commercial solutions.</p><p>Now, beyond building pipelines, and just as a matter of curiosity, DAGs are also present in many of the computing solutions:</p><ul><li><a href="https://docs.getdbt.com/docs/building-a-dbt-project/documentation/#navigating-the-documentation-site">data build tool</a></li><li><a href="https://databricks.com/blog/2015/06/22/understanding-your-spark-application-through-visualization.html">Apache Spark Execution DAGs</a></li><li><a href="https://www.tensorflow.org/guide/keras/functional">Tensorflow Functional API</a></li><li><a href="https://beam.apache.org/documentation/pipelines/design-your-pipeline/">Apache Beam Pipelines</a></li></ul><p>And so many more places. It ends up that knowing this concept will help you understand the execution of many processes (not just those related to machine learning pipelines).</p><p>Now, go out and read more, learn more, and explore the options out there. There are many tools out there. Look through your code; are you creating DAGs and not aware that you are? If you don’t want to use one of the solutions mentioned, you could even build your own home-grown solution; e.g., by utilizing the networkx library in Python. But guess what? If you are doing that, then consider using Prefect to do this — it is low-level and meant to be used at that programmatic level.</p><h3>Working with Hashmap</h3><p>Are you overwhelmed with the concept of a DAG? Which DAG focused orchestration tool should you adopt — or are you using the right tool for training and deploying your ML pipelines? <a href="https://www.hashmapinc.com/">Hashmap</a> can help you here. Our machine learning and MLOps experts are here to help you on your journey — to bring you and your organization to the next level. Let us help you get ahead of your competition and become truly efficient in your data analytics.</p><p>If you’d like assistance along the way, then please <a href="https://www.hashmapinc.com/reach-out?utm_source=medium&amp;utm_medium=blog_post&amp;utm_campaign=Unit%20Testing%20on%20dbt%20Models%20Using%20a%20Static%20Test%C2%A0Dataset">contact us</a>.</p><p><a href="https://www.hashmapinc.com/?utm_source=medium&amp;utm_medium=blog_post&amp;utm_campaign=Unit%20Testing%20on%20dbt%20Models%20Using%20a%20Static%20Test%C2%A0Dataset">Hashmap</a> offers a range of enablement workshops and assessment services, cloud modernization and migration services, data science, MLOps, and various other technology consulting services.</p><h3>Other Tools and Content You Might Like</h3><ul><li><a href="https://medium.com/hashmapinc/building-ml-pipelines-a6bff42c7154">Building ML Pipelines</a></li><li><a href="https://www.hashmapinc.com/solutionaccelerators">Hashmap | Services | Solution Accelerators</a></li><li><a href="https://medium.com/hashmapinc/why-i-love-mlflow-951b8d1134be">Why I Love MLflow</a></li><li><a href="https://www.hashmapinc.com/megabytes">Hashmap Megabytes | Bite-Size Video Series</a></li></ul><p><em>To listen in on a casual conversation about all things data engineering and the cloud, check out Hashmap’s podcast </em><a href="https://www.hashmapinc.com/hashmapontap"><strong><em>Hashmap on Tap</em></strong></a><strong><em> </em></strong><em>as well on Spotify, Apple, Google, and other popular streaming apps.</em></p><p><a href="https://www.hashmapinc.com/hashmapontap">Hashmap on Tap | Hashmap Podcast</a></p><p><strong><em>John Aven</em></strong><em>, Ph.D., is the Director of Engineering at </em><a href="http://hashmapinc.com/"><strong><em>Hashmap</em></strong></a><strong><em>:</em></strong><em> providing Data, Cloud, IoT, and AI/ML solutions and consulting expertise across industries with a group of innovative technologists and domain experts accelerating high-value business outcomes for our customers. Be sure and connect with John on </em><a href="https://www.linkedin.com/in/john-aven-phd/"><strong><em>LinkedIn</em></strong></a><em> and reach out for more perspectives and insight into accelerating your data-driven business outcomes.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=8e27344a42d2" width="1" height="1" alt=""><hr><p><a href="https://medium.com/hashmapinc/building-ml-pipelines-8e27344a42d2">Building ML Pipelines</a> was originally published in <a href="https://medium.com/hashmapinc">Hashmap, an NTT DATA Company</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Why I Love MLflow]]></title>
            <link>https://medium.com/hashmapinc/why-i-love-mlflow-951b8d1134be?source=rss-5f41e82a2ff7------2</link>
            <guid isPermaLink="false">https://medium.com/p/951b8d1134be</guid>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[data-science]]></category>
            <category><![CDATA[mlops]]></category>
            <category><![CDATA[mlflow]]></category>
            <category><![CDATA[devops]]></category>
            <dc:creator><![CDATA[John Aven]]></dc:creator>
            <pubDate>Thu, 05 Nov 2020 21:57:56 GMT</pubDate>
            <atom:updated>2020-11-05T22:04:46.905Z</atom:updated>
            <content:encoded><![CDATA[<h4>And You Should Too</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1000/1*0zMGy7YdRhuSA3X2ymqotg.jpeg" /></figure><p>Whether you are a data scientist, an ML engineer, a data analytics manager, a compliance officer, or the CEO (or anyone else whose job depends or will eventually) — you need to know what <a href="https://mlflow.org/">MLflow</a> is and why you should be using it.</p><p>When a data scientist builds a model, they go through a lot of experimentation; some even intentionally apply the scientific method. But unlike most scientists — or rather, exactly like most scientists — their record-keeping habits are generally shameful. I can tell you this from experience. When it comes to any computational science, these bad habits lead to issues within some industries — any industry that needs to adhere to strict compliance mandates. In turn, these bad habits lead to legal issues, lack of evidence, no management insight, loss of results, and much more.</p><p>But let’s face it — there is no reason with today’s modern computing solutions to do this in a computationally focused scientific field (well, most of them really are anymore). We have tools, lots of tools, and IMHO (maybe not so much on the H). MLflow is the best tool out there in this space. But why do I love it?</p><h4>1) Combined Model Management &amp; Experiment Tracking</h4><p>This first one is a boon. It is the core functional aspect that MLflow is filling. With small but simple changes to the data scientist’s code, they will remove the need to manually track the parameterization they use in each run using a spreadsheet, manually in a notebook, and considerably arcane approaches.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*iF0wT5LA774cU7i-NNgetg.png" /><figcaption>All of these functions in a manageable and trackable application</figcaption></figure><p>MLflow organizes results in experiments with experiment nesting. With this capability, it is no longer necessary to use the haphazard and error-prone methods of yesteryear. The organization or these variants are tagged in time and with unique IDs. While you can manually override this behavior, I would caution doing so.</p><h4>2) Artifact Storage</h4><p>Artifacts are things that need to be saved. This can be portions of data with specific needs (labels, predicted results, etc.), images generated as visualizations of the data, and in some corner cases — models (although they can generally be handled above, there are cases where this is the better option). Since each experiment is managed independently within MLflow, there is zero needed to use some cockamamie naming scheme like</p><ul><li>_new, _old, _new_old, _old_new</li><li>_1, _2, _2_1, _3</li><li>etc.</li></ul><p>All through which it is impossible to track this history of these solution pieces over time. In addition to this, we now have a convenient storage mechanism to easily pass data throughout a machine learning pipeline without explicitly linking the various steps.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*qUnkImMZ3oCFmiVTJWzFqA.png" /><figcaption>What we (as scientists) have been doing for way too long.</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/640/1*tg4sCrJ7dcIoOD0W-PyT1A.png" /><figcaption>Here an experiment has stored all the stages of the experiment, and in the modeling stages, the versions of the model therein trained are logged. Naming conventions should be applied to uniquely tag the model or store it in a ‘run’ unique directory. However, that will be tracked to the experiment in which the model is associated. The same applies to data assets that can be stored as artifacts.</figcaption></figure><h4>3) Model Deployment</h4><p>Deploying models has always been a headache. Sometimes you can use a pricey framework, but other times you need an inexpensive alternative. Instead, build your own solution to manage this — which is often not a great solution since it is yet another tool to maintain — but this isn’t always escapable. A starting place or layer to wrap in a facade, however, always helps.</p><p>MLflows serialized models can be served from MLflow with their standard REST API or retrieved through its programmatic API. In many situations, the REST API is great and can be used — at least internally. For other more advanced situations, the programmatic API is excellent and provides a lot of flexibility.</p><h4>4) Multi-platform &amp; Framework Integration</h4><p>Now, buying into a tool that doesn’t support and has no plan to support other tools and platforms you are working with can be hard to buy, especially when you can’t extend it to do so with ease yourself. Fortunately, MLflow supports numerous platforms and will continue to support even more. For me, as a consultant and a technologist in general, not only do I need to be able to provide solutions that fit a client&#39;s needs, but I have a personal need to continue to learn the newest things out there. That requires tools that will easily integrate there. Some of the supported integrations are:</p><p><strong>Languages</strong></p><ul><li>Python</li><li>Java</li><li>R</li><li>Rest (language-independent integration)</li></ul><p><strong>Platforms/Tooling</strong></p><ul><li>Azure ML</li><li>AWS Sagemaker</li><li>Scikit-Learn</li><li>TensorFlow</li><li>PyTorch</li><li>fast.ai</li><li>Spark &amp; Databricks (some extras in Databricks)</li><li>spaCy</li><li>XGBoost</li><li>And many more…</li></ul><p>While this is not all of what is core in functionality, it is not all things present. When you need an integration that is not there, another cool functionality can provide custom integration via the plugin API. This comes in handy when you need to extend the functionality of MLflow beyond what is there out of the box. Whether you are a large enterprise or a start-up that is just getting things going, you will ALWAYS find something you will need custom functionality.</p><h4>Anything Else?</h4><p>So, what’s left? Most obviously is data — versioning of data and storage of said data. While data can be stored as artifacts, this storage medium should be limited to smaller datasets. Larger datasets can be linked as assets in this way, but the integrations here are restrictive from a data warehousing aspect (think extending this for your needs with the plugin API).</p><p>MLflow also provides an abstraction for a deployable reusable component — a project. This is a dockerized solution with Anaconda — a python variant packaging commonly used in machine learning circles.</p><h3>How Hashmap Can Help</h3><p>The next steps are deciding whether MLflow should be part of the data analytics solution for your organization. <a href="https://www.hashmapinc.com/">Hashmap</a> can help you here. Our machine learning and MLOps experts are here to help you on your journey — to bring you and your organization to the next level. Let us help you get ahead of your competition and become truly efficient in your data analytics.</p><p>If you’d like assistance along the way, then please <a href="https://www.hashmapinc.com/reach-out?utm_source=medium&amp;utm_medium=blog_post&amp;utm_campaign=Unit%20Testing%20on%20dbt%20Models%20Using%20a%20Static%20Test%C2%A0Dataset">contact us</a>.</p><p><a href="https://www.hashmapinc.com/?utm_source=medium&amp;utm_medium=blog_post&amp;utm_campaign=Unit%20Testing%20on%20dbt%20Models%20Using%20a%20Static%20Test%C2%A0Dataset">Hashmap</a> offers a range of enablement workshops and assessment services, cloud modernization and migration services, data science, MLOps, and various other technology consulting services.</p><p><em>To listen in on a casual conversation about all things data engineering and the cloud, check out Hashmap’s podcast </em><a href="https://www.hashmapinc.com/hashmapontap"><strong><em>Hashmap on Tap</em></strong></a><strong><em> </em></strong><em>as well on Spotify, Apple, Google, and other popular streaming apps.</em></p><p><a href="https://www.hashmapinc.com/hashmapontap">Hashmap on Tap | Hashmap Podcast</a></p><h3>Other Tools and Content You Might Like</h3><ul><li><a href="https://medium.com/hashmapinc/building-ml-pipelines-a6bff42c7154">Building ML Pipelines</a></li><li><a href="https://www.hashmapinc.com/webinars-and-meetups">Hashmap Webinars &amp; Meetups | On-Demand Videos</a></li><li><a href="https://www.hashmapinc.com/megabytes">Hashmap Megabytes | Bite-Size Video Series</a></li></ul><p><strong><em>John Aven</em></strong><em>, Ph.D., is the Director of Engineering at </em><a href="http://hashmapinc.com/"><strong><em>Hashmap</em></strong></a><strong><em>:</em></strong><em> providing Data, Cloud, IoT, and AI/ML solutions and consulting expertise across industries with a group of innovative technologists and domain experts accelerating high-value business outcomes for our customers. Be sure and connect with John on </em><a href="https://www.linkedin.com/in/john-aven-phd/"><strong><em>LinkedIn</em></strong></a><em> and reach out for more perspectives and insight into accelerating your data-driven business outcomes.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=951b8d1134be" width="1" height="1" alt=""><hr><p><a href="https://medium.com/hashmapinc/why-i-love-mlflow-951b8d1134be">Why I Love MLflow</a> was originally published in <a href="https://medium.com/hashmapinc">Hashmap, an NTT DATA Company</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Building ML Pipelines]]></title>
            <link>https://medium.com/hashmapinc/building-ml-pipelines-a6bff42c7154?source=rss-5f41e82a2ff7------2</link>
            <guid isPermaLink="false">https://medium.com/p/a6bff42c7154</guid>
            <category><![CDATA[mlops]]></category>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[data-science]]></category>
            <category><![CDATA[argo]]></category>
            <category><![CDATA[kubernetes]]></category>
            <dc:creator><![CDATA[John Aven]]></dc:creator>
            <pubDate>Wed, 28 Oct 2020 13:48:54 GMT</pubDate>
            <atom:updated>2020-11-06T23:15:02.710Z</atom:updated>
            <content:encoded><![CDATA[<h4>Kubernetes with Argo for the Win</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*GhbQIdIIVFtYCiBjYkAeEg.jpeg" /></figure><p><a href="https://kubernetes.io/">Kubernetes</a> is a generally untapped compute resource. It is that unfamiliar territory between IaaS and PaaS. Many engineers are apprehensive of using it, IT management is fearful of adding it to the stack, and technologists keep begging for it to be used — but why?</p><ul><li>Another abstraction for pipeline code deployment to engineers is another tech the ‘company’ requires them to learn.</li><li>It is another piece of tech to support management — which means more stuff &amp; more debt.</li><li>To the technologist, those are boneheaded thoughts (yes, every technologist has a colossal ego) — there is no reason to hold back progress when you can modernize and move forward with better tooling.</li></ul><p>Well, they are all wrong — and they are all correct. The question is how to reconcile this. To do so, you need a business case to work off of. For this situation, let’s address the execution of Data Scientist developed pipelines.</p><p><strong>Use Case:</strong> <em>Our data science program, while moving to the cloud, is all over the place. They have failed to establish a consistent and reliable approach to solving machine learning problems, and we have been told that the issue is in their workflows. It has been reported that each data scientist, machine learning engineer, and similar across that various parts of my company is using different approaches to building pipelines, building their tooling, and running code across multiple systems — requiring movement of data that may not be necessary. We want to find a solution that allows for all of the workflows to be created in a single way the enforces running the code in a specified and blessed environment. We don’t want the data scientists to know or need to worry about where this is. As we are new to the cloud and want to be prepared for the future — we don’t want to play catch up now to play it again in short order — but don’t want the majority of our technical employees to have to worry about how we have modernized (e.g., learning a lot of new technology to be productive).</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*c30HtHT6f9GBfSwlV1GMhw.png" /><figcaption>At each level (only a few shown here) the tech options can be staggering — and it is easy to dive into analysis paralysis.</figcaption></figure><p>While there are many different ways, this can be addressed. In consulting engagements, we’d want to find a lot more information to propose the best fit for your organization; the topic here is Kubernetes and Argo. And yes, this particular combination is a good choice — and for more reasons than expressed in the use cases here. And a mature implementation will be more than what we discuss here, but this will be a good starting point to get your mind thinking on this and its feasibility in your organization.</p><h3>Kubernetes</h3><p>First off, what is Kubernetes and why do technologists love it so much? (we do too — after all, we are technologists). For starters, the ability to build an application packaged into a deployable unit that can be deployed on nearly any system is desirable. Imagine not having to make it ‘too’ different for different systems — that means having to worry less about the operational space. This is a big part where DevOps (another discussion) comes in. I am talking about Docker — one of the greatest virtualization technologies out there. What Kubernetes (k8s for short) does is provide an environment to consistently manage (or orchestrate) these containers in a distributed (multiple machines) fashion and the interactions between them with common deployment paradigms.</p><p>Having a consistent environment to orchestrate these containers is one thing — but how you do so is also important. Kubernetes provides a declarative interface that allows engineers to clearly and consistently define how things are put together and deployed. These declarations are made in YAML files, known as manifests, which are commonly used to specify application configuration. So that means the declarations are equivalent to defining how an application is configured — convenient, right!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*BDjOneA2V0jVUvBInKZhIw.png" /><figcaption>Example Argo Workflow</figcaption></figure><p>These configurations or manifest files that declare your applications deployed configuration are given types that represent abstractions of what they are configuring. These configuration files represent abstractions in Kubernetes such as Controllers (Jobs, Deployments, and Daemonsets — which run on all nodes) that deploy Pods (smallest unit of work) and other abstractions like Services that help manage how Controllers interact. The engineering extension to these concepts is Operators, which add additional capabilities or encapsulate highly reusable software units.</p><p>Now, you may hear the term tossed around — Cloud Native — but what does that mean? To be clear, building something to run using cloud vendor services does not make your application cloud-native, and using a cloud-native application does not make your cloud-native. What does make it cloud-native is that it is containerized (e.g., Docker) and deployable to a container orchestration platform (e.g., Kubernetes) most often using modern DevOps tooling and development practices.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*1VUMxnLnPAUJ_N7PkLPidA.png" /><figcaption>Evolution of cloud computing from defining the cloud, to running on a cloud provider, to deploying solutions that run on ANY cloud.</figcaption></figure><p>Since these platforms can be deployed (or are a service) in many cloud environments and can be used as a core component of a private cloud, these solutions are naturally highly portable. While there will be small differences in environments — once one deployment is prepared, the work required to adapt to a new environment is minimal.</p><h4>Argo</h4><p>Now that you know what Kubernetes is, we need to discuss <a href="https://argoproj.github.io/">Argo</a>. Argo is a custom Kubernetes operator. It is an operator that is designed to provide a workflow orchestration layer over step-wise processes with dependencies. These step-wise processes with dependencies are called a DAG in most modern computing solutions.</p><p>A quick search will lead you to other DAG related tools; you may be familiar with some of them: Apache Airflow, Prefect, Luigi, etc. — but these technologies are not cloud-native. Like all other things in Kubernetes, Argo is declarative, built to run across environments, and manage containerized workloads. In fact, once it is installed on your Kubernetes cluster and extends the Kubernetes CLI, you can deploy the Argo manifest, which declaratively abstracts the idea of a DAG.</p><p>Assume that we have the machine learning workflow depicted below:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*WyYwPU2yz8O3i9qxfqu6OQ.png" /><figcaption><em>Clearly, this is an oversimplification of real-world pipelines, but it will serve its purpose.</em></figcaption></figure><p>Each step is written to a docker image and executed in a declarative fashion where the DAG is fully specified in the Argo manifest. This allows for defining reusable docker images that have common pre-canned routines within them to be reused in Kubernetes within a workflow — my discussion around using Docker for ML work can be found <a href="https://medium.com/hashmapinc/why-i-love-mlflow-951b8d1134be">here</a>. By allowing an Argo manifest to specify the pipeline, you are declaring the order in which steps are to be executed in your pipeline — and in doing so, you are also saying that everything will be executed on a Kubernetes cluster and that Argo will take care of scheduling, monitoring and tracking the progress of your pipeline.</p><h4>The benefits (UI)</h4><p>The Argo UI is just awesome. It provides views of all versions of the pipeline as it was executed. While being able to visualize each pipeline is one thing, and a feature that is very important as a take it or leaves it, it is not the only feature that Argo provides.</p><p>Argo’s UI tracks at each execution the STDIO logs of each executing phase — useful for identifying execution issues when they arise.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Xg_P07Cqrl3IfvuMrZYdjA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*OtWG0ElXxSaHO_INugFY7Q.png" /></figure><p>Now, when you are running your code often, and it seems to be taking longer to train your models than you would expect, you need to track down which stage is taking the longest. Argo tracks this information for you and provides a visual representation of this information in the UI. This feature will show you which stages are taking the longest to execute.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*e4g8JO2QgXdeqJk_gVxayQ.png" /></figure><h4>Anyway, Why ML with Argo?</h4><p>Machine learning is naturally a composable process. Each stage of a workflow, or a collection of stages, can be grouped into a single ‘atomic’ processing step. In general, these are stitched together in custom processes, sometimes with Airflow. But almost always, it comes down to a custom process, even an in-house built solution that is exceedingly rigid (usually written by software engineers that have little to no data science experience). Or worst yet, your orchestration is manual, and you have to move things (data, models, etc.) around to different environments. Don’t do that! Take steps to move to more automated environments. And a Kubernetes environment with dockerized workflows is a great first step in doing so.</p><p>Data science is a software engineering practice — even though many data scientists don’t feel that way. But it is anyway. And with this, you must monitor in a centralized fashion all of the various training steps taken. Argo provides this in being able to observe the status of pipelines and the outcome of each step. This isn’t about tracking the ML results, but the software component of what you are doing. See my article on <a href="https://medium.com/hashmapinc/why-i-love-mlflow-951b8d1134be">MLflow</a> on approaches to dealing with this unique need.</p><p>Next, and perhaps the most important to a Data Scientist, is the need to support polyglotism — developing a solution using multiple programming languages. This is one big reason that many processes are done manually. Different needs dictate different environments. Today this is not needed. Containerized solutions are a great solution to support polyglottism.</p><p>Now, when you subscribe to a cloud provider and use their tools (hopefully not dogmatically), you end up locking yourself into their space and forcing your data scientists to use their tools — not tools fit for your purpose. This does not mean you should avoid using solutions from a cloud provider — you need to make the fit correct — and perhaps some of their solution space will work for you. But always be mindful. A cloud-native solution, based on Kubernetes deployments, provides a framework that empowers you to lift and shift to a new provider more easily than using a cloud provider solution. While moving data in migration is difficult enough, moving your data processes is harder — much harder.</p><h4>The Bad (manual work to create DAG)</h4><p>Building a DAG in Argo is not very pleasant. From a Data Scientist&#39;s point of view, this is a lot more work than desirable. And creating/managing many of these pipelines, possibly with small variations, is a bit messy. This operational work is a little more work than I honestly enjoy doing (all engineers are lazy-facts). I have little desire to specify the template for each stage: where images are located, what the entry-point to my code is, and so on — all this without even building the DAG yet.</p><h4>The Good (Stay Tune for Links)</h4><p>It would be much better to write an abstraction on this that builds these files for you from a minimalized declaration of a DAG — and fortunately, such a tool exists. See this blog on LearningAwps. This is a flexible framework designed to help you deploy your ML code with minimal change to your existing processes into an operationally managed environment — moving you closer to production code with ease — the MLOps approach.</p><h3>How Hashmap Can Help</h3><p>The next steps are deciding whether MLflow should be part of the data analytics solution for your organization. <a href="https://www.hashmapinc.com/">Hashmap</a> can help you here. Our machine learning and MLOps experts are here to help you on your journey — to bring you and your organization to the next level. Let us help you get ahead of your competition and become truly efficient in your data analytics.</p><p>If you’d like assistance along the way, then please <a href="https://www.hashmapinc.com/reach-out?utm_source=medium&amp;utm_medium=blog_post&amp;utm_campaign=Unit%20Testing%20on%20dbt%20Models%20Using%20a%20Static%20Test%C2%A0Dataset">contact us</a>.</p><p><a href="https://www.hashmapinc.com/?utm_source=medium&amp;utm_medium=blog_post&amp;utm_campaign=Unit%20Testing%20on%20dbt%20Models%20Using%20a%20Static%20Test%C2%A0Dataset">Hashmap</a> offers a range of enablement workshops and assessment services, cloud modernization and migration services, data science, MLOps, and various other technology consulting services.</p><h3>Other Tools and Content You Might Like</h3><ul><li><a href="https://www.hashmapinc.com/recommender">Recommender | Reduce Data &amp; Cloud Option Fatigue | Hashmap</a></li><li><a href="https://www.hashmapinc.com/megabytes">Hashmap Megabytes | Bite-Size Video Series</a></li><li><a href="https://medium.com/hashmapinc/snowflake-solution-anti-patterns-spark-is-my-hammer-e49ebf9b08df">Snowflake Solution Anti-Patterns: Spark is My Hammer</a></li><li><a href="https://www.hashmapinc.com/solutionaccelerators">Hashmap | Services | Solution Accelerators</a></li></ul><p><strong><em>John Aven</em></strong><em>, Ph.D., is the Director of Engineering at </em><a href="http://hashmapinc.com/"><strong><em>Hashmap</em></strong></a><em> providing Data, Cloud, IoT, and AI/ML solutions and consulting expertise across industries with a group of innovative technologists and domain experts accelerating high-value business outcomes for our customers. Be sure and connect with John on </em><a href="https://www.linkedin.com/in/john-aven-phd/"><strong><em>LinkedIn</em></strong></a><em> and reach out for more perspectives and insight into accelerating your data-driven business outcomes.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a6bff42c7154" width="1" height="1" alt=""><hr><p><a href="https://medium.com/hashmapinc/building-ml-pipelines-a6bff42c7154">Building ML Pipelines</a> was originally published in <a href="https://medium.com/hashmapinc">Hashmap, an NTT DATA Company</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Data Science Repo Scaffolding for the Next Generation]]></title>
            <link>https://medium.com/hashmapinc/data-science-repo-scaffolding-for-the-next-generation-fa3f34b37ffe?source=rss-5f41e82a2ff7------2</link>
            <guid isPermaLink="false">https://medium.com/p/fa3f34b37ffe</guid>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[data]]></category>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[data-science]]></category>
            <category><![CDATA[evolving-data-science]]></category>
            <dc:creator><![CDATA[John Aven]]></dc:creator>
            <pubDate>Fri, 31 Jan 2020 13:06:01 GMT</pubDate>
            <atom:updated>2020-11-05T21:09:53.002Z</atom:updated>
            <content:encoded><![CDATA[<h4>#3 in the Evolving Data Science Series</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*tgi7gAmXyGQAZrbsBf-b_g.jpeg" /></figure><p>Welcome back to the <a href="https://medium.com/hashmapinc/evolving-data-science-ab3cdec1e7e0"><strong>Evolving Data Science</strong></a> series. If you haven’t already read the previous entries, please find them below and read them at your leisure. There is no ‘ordering’ in this series. Today we want to talk about how you as a company, as agents of change, can scale up your data science processes and reach a new scale.</p><h3>Code Repo Variance</h3><p>Some of the inherent complexity found in data science comes from the number of different steps that can be taken in any given solution. This generally results in code repositories that vary to a great degree. These code repositories can even vary across a team on a solution-by-solution resolution. Each scientist has their own preference in terms of what they consider a good structure and that changes over time. This can lead to chaos!</p><p>While this approach may be fine for smaller teams with a low velocity, this is the essence of technical debt. A simple solution is not always the best; the effort to move away from this approach is often more difficult than the effort it saved upfront for an appropriate and properly scoped/designed solution. Fortunately, this is not the case when it comes to data science; it is straight-forward to move from an <em>ad hoc</em> approach to a repository layout and then to a properly defined scaffolding.</p><h3>Next-Gen Approach</h3><p>You may be saying to yourself, or you will after you do some reading, that there is already a solution for this and it’s called ‘cookie cutter.’ Well, you aren’t wrong. In fact, it is a solution, but it is a solution for data science solutions of today and yesterday. It is not designed to help you move to the next generation of data science solutions or the next generation of ML Engineering.</p><p>The data science team here at Hashmap has worked on a fresh approach that will help you evolve your data science practice and operate at a scale you previously only wished you could.</p><p>We are ready to speak to you, are you ready to evolve? If so, then please contact us and arrange a time to speak about how we can help your organization meet the needs of tomorrow today.</p><p>This is part of the <a href="https://medium.com/hashmapinc/evolving-data-science-ab3cdec1e7e0">Evolving Data Science</a> series.</p><ul><li><a href="https://medium.com/hashmapinc/deploying-machine-learning-solutions-de014d5a3712">Deploying Machine Learning Solutions</a></li><li><a href="https://medium.com/hashmapinc/versioning-data-science-solutions-28c8e7d47cd1">Versioning Data Science Solutions</a></li></ul><p><em>Feel free to share on other channels and be sure and keep up with all new content from Hashmap </em><a href="https://medium.com/hashmapinc"><strong><em>here</em></strong></a><em>.</em></p><p><strong><em>John Aven</em></strong><em>, Ph.D., is the Director of Engineering at </em><a href="http://hashmapinc.com/"><strong><em>Hashmap</em></strong></a><em> providing Data, Cloud, IoT, and AI/ML solutions and consulting expertise across industries with a group of innovative technologists and domain experts accelerating high-value business outcomes for our customers. Be sure and connect with John on </em><a href="https://www.linkedin.com/in/john-aven-phd/"><strong><em>LinkedIn</em></strong></a><em> and reach out for more perspectives and insight into accelerating your data-driven business outcomes.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=fa3f34b37ffe" width="1" height="1" alt=""><hr><p><a href="https://medium.com/hashmapinc/data-science-repo-scaffolding-for-the-next-generation-fa3f34b37ffe">Data Science Repo Scaffolding for the Next Generation</a> was originally published in <a href="https://medium.com/hashmapinc">Hashmap, an NTT DATA Company</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Snowflake Solution Anti-Patterns: Spark is My Hammer]]></title>
            <link>https://medium.com/hashmapinc/snowflake-solution-anti-patterns-spark-is-my-hammer-e49ebf9b08df?source=rss-5f41e82a2ff7------2</link>
            <guid isPermaLink="false">https://medium.com/p/e49ebf9b08df</guid>
            <category><![CDATA[data]]></category>
            <category><![CDATA[antipattern]]></category>
            <category><![CDATA[spark]]></category>
            <category><![CDATA[cloud-computing]]></category>
            <category><![CDATA[snowflake]]></category>
            <dc:creator><![CDATA[John Aven]]></dc:creator>
            <pubDate>Thu, 30 Jan 2020 13:16:01 GMT</pubDate>
            <atom:updated>2022-11-28T04:49:49.354Z</atom:updated>
            <content:encoded><![CDATA[<h4>Hadoop is Not a Cloud Data Warehouse</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*1ZLzp1GBaFh1qrRAPl2WtQ.jpeg" /></figure><p>Spark has been the answer to processing all big data in memory but is that still true? In the world of big data, Spark was the data engineer’s answer to solving big data needs that Hadoop demanded. Loading large amounts of data into memory and performing SQL and dataflow type operations on the data was a major requirement. Spark’s predecessor, MapReduce, required data to be read and written to disk many times.</p><p>However, as Snowflake has taken on a much larger part of the overall data and analytics market, we need to reevaluate the place of Spark in the stack.</p><h3>Is Spark a Long-Term Solution?</h3><p>The question comes down to how we will be doing transformational logic for Snowflake and whether Spark is an appropriate tool. So here are the common reasons Spark is utilized:</p><ol><li>We have developed skillsets around Spark and have existing solutions in this space that we don’t want to rewrite.</li><li>Spark developers are in high demand.</li><li>We need to perform in-memory to get optimal performance.</li><li>You can boost performance with query pushdown to Snowflake.</li><li>Data is in many locations and we need to use these sources in our transformations.</li></ol><p>Well, there are many issues with these assumptions:</p><ol><li>Spark requires highly specialized skills, whereas ELT solutions are heavily reliant on SQL skills — much easier to fill these roles.</li><li>ELT solutions are also much easier to maintain and are more reliable; they run on Snowflake’s compute and Snowflake manages the run configurations.</li><li>Spark connector will pipe data through a stage (in/out), and while temporary, is an extra step in the processing pipeline.</li><li>Query pushdown requires no use of UDFs within Spark; anyone who has worked with Spark knows that UDFs are very common. When this happens the data will be copied into memory anyhow.</li><li>If you have data in multiple systems, then you may need to adjust your cloud data strategy. Consider moving the data that is necessary for the transformations into Snowflake as well.</li></ol><h3>Our Suggestion for Snowflake</h3><p>Don’t rely upon Spark workloads as a long-term solution. When you already have significant investment in Spark and are migrating to Snowflake, have a strategy in place to move from Spark to a Snowflake-centric ELT solution.</p><p>There are various options here:</p><ol><li>Use of Stored Procedures and Scheduling/Orchestration (Tasks, Airflow, etc.).</li><li>DBT (data build tool) with orchestration/scheduling — consider their cloud offering.</li><li>Orchestration tool with SnowSQL queries.</li></ol><p>I realize that there are times when Snowflake + Spark is a logical solution and possibly a ‘best’ solution. These cases, however, should be the exception rather than the rule. Know when it is best and don’t use it as a hammer for all of your data transformation needs.</p><h3>Need Snowflake Cloud Data Warehousing and Migration Assistance?</h3><p>If you’d like additional assistance in this area, <a href="https://www.hashmapinc.com/snowflake-reachout">Hashmap</a> offers a range of enablement workshops and consulting service packages as part of our consulting service offerings, and would be glad to work through your specifics in this area.</p><p>Feel free to share on other channels and be sure and keep up with all new content from Hashmap by <a href="https://medium.com/hashmapinc"><strong>following our Engineering and Technology Blog</strong></a><strong>.</strong></p><h3>Other Tools and Content for You</h3><ul><li><a href="https://www.hashmapinc.com/snowflake-utilities-accelerators">Snowflake Utilities &amp; Accelerators | Do more with Snowflake | Hashmap</a></li><li><a href="https://medium.com/hashmapinc/snowflake-solution-anti-patterns-the-perpetual-data-scientist-60a117e99a2e">Snowflake Solution Anti-Patterns: The Perpetual Data Scientist</a></li><li><a href="https://medium.com/hashmapinc/3-best-practices-for-on-prem-to-snowflake-677390536121">3 Best Practices for On-Prem to Snowflake</a></li><li><a href="https://medium.com/hashmapinc/tech-in-5-snowflake-dask-548f7e6289e">#Tech in 5 — Snowflake &amp; Dask</a></li><li><a href="https://medium.com/hashmapinc/schema-unification-with-snowflake-de3cbf8444e">Schema Unification with Snowflake</a></li><li><a href="https://medium.com/hashmapinc/using-dbt-to-execute-elt-pipelines-in-snowflake-dbe76d5beed5">Using DBT to Execute ELT Pipelines in Snowflake</a></li></ul><p><strong><em>John Aven</em></strong><em>, Ph.D., is the Director of Engineering at </em><a href="http://hashmapinc.com/"><strong><em>Hashmap</em></strong></a><em> providing Data, Cloud, IoT, and AI/ML solutions and consulting expertise across industries with a group of innovative technologists and domain experts accelerating high-value business outcomes for our customers. Be sure and connect with John on </em><a href="https://www.linkedin.com/in/john-aven-phd/"><strong><em>LinkedIn</em></strong></a><em> and reach out for more perspectives and insight into accelerating your data-driven business outcomes.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e49ebf9b08df" width="1" height="1" alt=""><hr><p><a href="https://medium.com/hashmapinc/snowflake-solution-anti-patterns-spark-is-my-hammer-e49ebf9b08df">Snowflake Solution Anti-Patterns: Spark is My Hammer</a> was originally published in <a href="https://medium.com/hashmapinc">Hashmap, an NTT DATA Company</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Snowflake Solution Anti-Patterns: The Probable Data Scientist]]></title>
            <link>https://medium.com/hashmapinc/snowflake-solution-anti-patterns-the-perpetual-data-scientist-60a117e99a2e?source=rss-5f41e82a2ff7------2</link>
            <guid isPermaLink="false">https://medium.com/p/60a117e99a2e</guid>
            <category><![CDATA[data-science]]></category>
            <category><![CDATA[data]]></category>
            <category><![CDATA[snowflake]]></category>
            <category><![CDATA[snowflake-computing]]></category>
            <category><![CDATA[cloud-computing]]></category>
            <dc:creator><![CDATA[John Aven]]></dc:creator>
            <pubDate>Wed, 29 Jan 2020 13:36:01 GMT</pubDate>
            <atom:updated>2020-11-05T21:07:26.812Z</atom:updated>
            <content:encoded><![CDATA[<h4>That Wasteful ‘Parquet’ Layer</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*8fxIRnPg8rzfoy2W8GSHHw.jpeg" /></figure><p>Those of us working within the big data space have been trained to build out various layers within a ‘data lake’. These layers, usually three to five, typically consist of the following (common alternate naming conventions included):</p><ol><li>Raw/Landing/Stage</li><li>Standardized/Normalized</li><li>Cleansed/Prepared</li><li>Modeled/Provisioned</li><li>Published/Reporting/Consumption/BI</li></ol><p>Occasionally, some of these layers get combined depending on the architect and the business requirements. Within a Data Lake, these layers have a purpose. These match, equivalently, to the various stages you find in data warehousing solutions. They served a purpose in the data lake space but do they make sense when working with a Cloud Data Warehouse? The short answer is NO.</p><h3>Maintaining the ‘Standardized’ Layer</h3><p>The general consensus is that the data lake is no longer needed — save for a staging/raw location that is used as the ingestion point for Snowflake — e.g. an external stage. What I have observed, however, is a continued effort to maintain the ‘standardized’ layer.</p><p>Arguments for this layer are varied but generally have one of the following veins:</p><ol><li>They are standardized so that the stages in Snowflake are all constructed the same.</li><li>Schemas evolve; we want to support schema evolution.</li><li>A data scientist may need to access the data ‘later’ to do analysis.</li></ol><p>This is an anti-pattern. I call it the ‘Probable Data Scientist’, but why is it an anti-pattern? The answers are simple:</p><ol><li>The compute necessary to create this extra layer requires additional compute outside of Snowflake that has to be maintained and introduces additional technical debt.</li><li>Schema evolution can be managed in Snowflake. Use VARIANT columns and build the logic into Snowflake.</li><li>Data scientists are not singular creatures. One may want CSV, another Parquet, and so on. The language they are performing their work in may have specific data format requirements that the presumed formats do not support.</li><li>Data can be PUT into an external stage when needed. Don’t store data outside of Snowflake that you do not need. This avoids added costs for storage, the additional infrastructure to secure, and code/tooling that would need to be maintained.</li></ol><h3>My Recommendation</h3><p>I would highly recommend that this layer only exists when your tooling creates it natively before landing the data in your staging location. Manage your complexity in Snowflake; offload data when and only when you need to do so. Make it business use case driven instead of futuristic.</p><p><em>Feel free to share on other channels and be sure and keep up with all new content from Hashmap by </em><a href="https://medium.com/hashmapinc"><strong><em>following our Engineering and Technology Blog</em></strong></a></p><p>If you enjoyed reading this, some of John’s other recent stories are below:</p><ul><li><a href="https://medium.com/hashmapinc/streamsets-snowflake-part-1-db4776b46ac9">Streamsets &amp; Snowflake: Part 1</a></li><li><a href="https://medium.com/hashmapinc/securely-using-snowflakes-python-connector-within-an-azure-function-45756f2ad950">Securely Using Snowflake’s Python Connector within an Azure Function</a></li><li><a href="https://medium.com/hashmapinc/deploying-machine-learning-solutions-de014d5a3712">Deploying Machine Learning Solutions</a></li><li><a href="https://medium.com/hashmapinc/versioning-data-science-solutions-28c8e7d47cd1">Versioning Data Science Solutions</a></li></ul><p><strong><em>John Aven</em></strong><em>, Ph.D., is Director of Engineering at </em><a href="http://hashmapinc.com/"><strong><em>Hashmap</em></strong></a><em> providing Data, Cloud, IoT, and AI/ML solutions and consulting expertise across industries with a group of innovative technologists and domain experts accelerating high-value business outcomes for our customers. Be sure and connect with John on </em><a href="https://www.linkedin.com/in/john-aven-phd/"><strong><em>LinkedIn</em></strong></a><em> and reach out for more perspectives and insight into accelerating your data-driven business outcomes.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=60a117e99a2e" width="1" height="1" alt=""><hr><p><a href="https://medium.com/hashmapinc/snowflake-solution-anti-patterns-the-perpetual-data-scientist-60a117e99a2e">Snowflake Solution Anti-Patterns: The Probable Data Scientist</a> was originally published in <a href="https://medium.com/hashmapinc">Hashmap, an NTT DATA Company</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>