Giter Site home page Giter Site logo

smarthi / amazon-sagemaker-bert-classify-pytorch Goto Github PK

View Code? Open in Web Editor NEW

This project forked from aws-samples/amazon-sagemaker-bert-classify-pytorch

0.0 2.0 0.0 167 KB

This sample show you how to train BERT on Amazon Sagemaker using Spot instances

License: MIT No Attribution

Jupyter Notebook 20.59% Python 79.41%

amazon-sagemaker-bert-classify-pytorch's Introduction

Build Status

Amazon Sagemaker BERT text classification using PyTorch

This sample show you how to

To get started, use the notebook BertTextClassification.ipynb

Dataset

We use the Dbpedia ontology dataset, for more details, see https://wiki.dbpedia.org/services-resources/dbpedia-data-set-2014#2

Customise for your dataset

In order to customise this sample, for your own dataset, perform the following steps

  1. Create a dataset class, that implements the PyTorch Dataset abstract class, see dbpedia_dataset.py as an example implementation.
  2. Create a label mapper class, that implements abstract class LabelMapperBase, to maps string labels to zero indexed integer labels. See an example implementation dbpedia_dataset_label_mapper.py.
  3. Replace the use of classes DbpediaDataset and DbpediaLabelMapper in builder.py with your own custom dataset and label mapper class

Running locally

  1. Install python 3.7.4

  2. Set up requirements.

    pip install -r tests/requirements.txt
  3. Verify set up

    export PYTHONPATH=./src
    pytest

Security

See CONTRIBUTING for more information.

License

This library is licensed under the MIT-0 License. See the LICENSE file.

amazon-sagemaker-bert-classify-pytorch's People

Contributors

amazon-auto avatar elangovana avatar

Watchers

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