Giter VIP home page Giter VIP logo

dla_template's Introduction

ASR project barebones

Installation guide

< Write your installation guide here >

pip install -r ./requirements.txt

Recommended implementation order

You might be a little intimidated by the number of folders and classes. Try to follow this steps to gradually undestand the workflow.

  1. Test hw_asr/tests/test_dataset.py and hw_asr/tests/test_config.py and make sure everythin works for you
  2. Implement missing functions to fix tests in hw_asr\tests\test_text_encoder.py
  3. Implement missing functions to fix tests in hw_asr\tests\test_dataloader.py
  4. Implement functions in hw_asr\metric\utils.py
  5. Implement missing function to run train.py with a baseline model
  6. Write your own model and try to overfit it on a single batch
  7. Implement ctc beam search and add metrics to calculate WER and CER over hypothesis obtained from beam search.
  8. Pain and suffering Implement your own models and train them. You've mastered this template when you can tune your experimental setup just by tuning configs.json file and running train.py
  9. Don't forget to write a report about your work
  10. Get hired by Google the next day

Before submitting

  1. Make sure your projects run on a new machine after complemeting the installation guide or by running it in docker container.
  2. Search project for # TODO: your code here and implement missing functionality
  3. Make sure all tests work without errors
    python -m unittest discover hw_asr/tests
  4. Make sure test.py works fine and works as expected. You should create files default_test_config.json and your installation guide should download your model checpoint and configs in default_test_model/checkpoint.pth and default_test_model/config.json.
    python test.py \
       -c default_test_config.json \
       -r default_test_model/checkpoint.pth \
       -t test_data \
       -o test_result.json
  5. Use train.py for training

Credits

This repository is based on a heavily modified fork of pytorch-template repository.

Docker

You can use this project with docker. Quick start:

docker build -t my_hw_asr_image . 
docker run \
   --gpus '"device=0"' \
   -it --rm \
   -v /path/to/local/storage/dir:/repos/asr_project_template/data/datasets \
   -e WANDB_API_KEY=<your_wandb_api_key> \
	my_hw_asr_image python -m unittest 

Notes:

  • -v /out/of/container/path:/inside/container/path -- bind mount a path, so you wouldn't have to download datasets at the start of every docker run.
  • -e WANDB_API_KEY=<your_wandb_api_key> -- set envvar for wandb (if you want to use it). You can find your API key here: https://wandb.ai/authorize

TODO

These barebones can use more tests. We highly encourage students to create pull requests to add more tests / new functionality. Current demands:

  • Tests for beam search
  • README section to describe folders
  • Notebook to show how to work with ConfigParser and config_parser.init_obj(...)

dla_template's People

Contributors

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