Git Product home page Git Product logo

airflow-prefect's Introduction

Airflow 2.0 vs. Prefect

This R&D / technical watch project was created to compare and benchmark 2 workflow management tools: Airflow 2.0 and Prefect. Following the release of Airflow 2.0, this repository was used as an illustrative / sandbox environment to highlight the main differences that still exist between these solutions when it comes to the orchestration of machine learning workflows.

You can follow the guidelines below to schedule and orchestrate a dummy data science training workflow based on the iris dataset. This will help you get an idea of the philosophy behind each tool.

Prefect

Before running the server for the first time, run the following command to configure Prefect for local orchestration:

prefect backend server

Note the server requires Docker and Docker Compose to be running. To start the server, UI, and all required infrastructure, run:

prefect server start

Once all components are running, you can view the Prefect UI by visiting http://localhost:8080.

Please note that executing flows from the server requires at least one Prefect Agent to be running:

prefect agent local start

We are now ready to use Prefect Core Server. Let's create a new project for the purpose of this demo:

prefect create project airflow_prefect_contest

Finally, to register any flow with the server, call the register method:

flow.register()

Airflow 2.0

Airflow needs a home, ~/airflow is the default, but you can lay foundation somewhere else if you prefer:

export AIRFLOW_HOME=~/airflow

Initialize the database:

airflow db init

Start the web server. The default port is 8080 but we'll use 8081 to avoid a conflict with Prefect's web server:

airflow webserver -p 8081

You can now view the Airflow UI by visiting http://localhost:8081.

Start the scheduler:

airflow scheduler

Create an admin user account for yourself:

 airflow users create --username admin
                      --firstname <your-firstname>
                      --lastname <your-lastname>
                      --role Admin
                      --email <your-email>

airflow-prefect's People

Stargazers

 avatar

Watchers

 avatar

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.