Giter Site home page Giter Site logo

metaflow-transformers-tutorials's Introduction

First, get started with Metaflow by executing these simple flows:

  1. helloworld.py - a simple hello world flow
  2. counter_branch.py - test artifacts
  3. parameters.py - test parameters
  4. foreach.py - test foreaches (parallel tasks)

After these simple examples, you can take a look at a more realistic case:

In this tutorial, we'll fine-tune a sentiment analysis model on top of HuggingFace's DistilBERT model with the IMDB dataset.

First, we'll show how to do it without Metaflow.

  1. sent_analysis_train.py is the training code (6-7 minutes on the small dataset of 100 samples on my Mac)
  2. sent_analysis_predict.py is the prediction code (30 seconds)

We'll do live coding to show how to convert the training code to Metaflow. See sent_analysis_metaflow.py for instructions.

We'll run python sent_analysis_metaflow.py --no-pylint run --mode small to train a model on 100 samples locally.

We'll show how Metaflow automatically saves trained models which we can access for predictions.

We'll use @batch to train the full dataset (40,000 samples) on AWS. We'll need GPU since it'll take a while for the full data on CPU.

metaflow-transformers-tutorials's People

Contributors

chiphuyen avatar tuulos 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.