Coder Social home page Coder Social logo

tensorflow-example_1rja's Introduction

Recesser Tensorflow Example

This example is based on a Tensorflow tutorial for classifying text with a BERT deep learning model.

First, you need to download the dataset. You can easily do that with wget:

wget http://ai.stanford.edu/~amaas/data/sentiment/aclImdb_v1.tar.gz

Do not unpack this. The main.py script will do that automatically.

You can now either train the model locally, or inside the Recesser System.

Local Execution

You need to have Python 3 installed. Create a virtual environment and install the dependencies from requirements.txt:

python3 -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt

Now run the script providing the location of the downloaded dataset on the command line:

python3 main.py aclImdb_v1.tar.gz

This will take a few minutes. After the execution has finished you will see the loss and the accuracy of the model printed to the command line.

Execution inside Recesser

After downloading the dataset from the internet you need to upload it to the Recesser system.

First, set the the address of your system as the environment variable RECESSER_ADDR and your token as RECESSER_TOKEN:

export RECESSER_ADDR="<address of your system>"
export RECESSER_TOKEN="<your token>"

Then upload the data:

rcssr artifact upload aclImdb_v1.tar.gz

If the file has not changed, the computed handle in the workflow description recesser.yaml will be correct.

Then, register this repository with the system:

rcssr repository add "recesser/tensorflow-example"

The CLI will generate an SSH key, register it inside the Recesser system and print it out on the command line. You need to copy this key and set it as a read-only deploy key on your GitHub repository.

Now after a short while (less than 1min on the default setting), Recesser should have picked up your repository and started training the machine learning model.

tensorflow-example_1rja's People

Contributors

nikstur avatar trellixvulnteam 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.