Code Monkey home page Code Monkey logo

airflow-automation's Introduction

Airflow automation

Introduction

  • You need to have AWS EC2 Linux instance, and set up Jupyter Lab and Airflow there. We also need AWS RDS to store data. It's stressful to work on command line and configuration, so I tried to describe in detail each process and what command you need to type in documentation. Please check "setup_document.pdf" in this repository.

Problem

  • Data analysis requires pipeline of getting data, cleaning data, training model, making prediction, visualizing data, reporting and repeat. We want to automate an entire process and be productive.

Solution

  • Use Airflow (https://airflow.apache.org/) to set dependency and set time schedule.
  • Airflow allows you to only use python to specify what tasks you want to automate, when to be executed and set dependency for each taks. The example is below.

image_01

  • Airflow also has a nice user interface, so it's easy to tell what automation is currently running and their status.

image_02

  • Even though you have multiple files to execute, the next task can wait for the previous task to complete its task in the automation like below.

image_03

Process

  1. Set up EC2 for always running server and RDS to store data.
  2. Jupyter Notebook for analysis and visualization in Jupyter Lab.
  3. TensorFlow to train neural network to automate developing model and model update.
  4. Papermill to execute all the Notebooks.
  5. Airflow to set dependency between the Notebooks and set time schedule.
  6. Email python package to report out.
  • Our goal is to train neural network regression every day, make forecast, and send emails to check whether our forecast is good.

image_04

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.