Giter Club home page Giter Club logo

prophet-metaflow's Introduction

prophet-metaflow

An example of how to run Facebook Prophet in Metaflow.

Read full blog post here!!

Minimum daily temperatures dataset is used. This dataset describes the minimum daily temperatures over 10 years (1981-1990) in the city Melbourne, Australia. The units are in degrees Celsius and there are 3650 observations. The source of the data is credited as the Australian Bureau of Meteorology.

What is it?

ProphetFlow is a Metaflow flow using Facebook Prophet to predict future values of a timeseries. A Prophet model is trained to predict next year minimum daily temperatures. Hyperparameters tuning is performed with cross-validation.

Step start
    Init configuration
    => load

Step load
    Raw data is loaded and prepared
    => hyper_tuning

Step hyper_tuning
    Hyperparameters tuning
    => cross_validation

Step cross_validation
    Perform cross-validation on given hyperparameters
    => train

Step train
    Check cross-validation results and find best parameters.
    A new Prophet model is fitted.
    => end

Step end
    Last step, process is finished

How to play with it

If you need, install required Python packages (Metaflow & FBProphet) as usual: pip install -r requirements.txt

Simply run training flow with: python src/ProphetFlow.py run

In predict.ipynb notebook it's explained how to use Prophet trained model to predict future values, accessing Metaflow runs artifacts.

Forecast Forecast components

A simple flow without hyperparameters tuning: python src/ProphetSimpleFlow.py run

Run in AWS

To configure Metaflow to use AWS Cloud, you first need to create stack:

aws s3 cp aws/metaflow-cfn-template.yml s3://<your_bucket>
aws cloudformation create-stack --stack-name metaflow \
                                --template-url <url_of_template_in_your_bucket> \
                                --capabilities CAPABILITY_IAM

When Cloudformation stack is created, you must configure Metaflow.

metaflow configure aws

To run all steps in flow in AWS Batch:

python src/ProphetFlow.py run --with batch:image=vnardone/prophet-metaflow

An example of how to run a single step in AWS Batch (using @batch decorator):

python src/ProphetAWSStepFlow.py run

prophet-metaflow's People

Contributors

vittorio-nardone avatar

Watchers

James Cloos 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.