GithubHelp home page GithubHelp logo

yinghai / onnx-fb-universe Goto Github PK

View Code? Open in Web Editor NEW

This project forked from onnxbot/onnx-fb-universe

0.0 2.0 0.0 1.11 MB

ONNX Integration Builds

License: MIT License

Shell 3.90% Python 89.92% PureBasic 6.17%

onnx-fb-universe's Introduction

onnx-fb-builds

Travis Jenkins
Build Status Build Status

Why Universe Repo?

  • It integrates multiple repos, including onnx, onnx-caffe2, onnx-pytorch, pytorch, caffe2, to provide a convenient environment for developers.
  • OnnxBot automatically updates the submodules in repos folder, runs the tests, and automatically detects the breaking changes from different repos.

Installation

./install.sh    # or ./install-develop.sh to install the most of the repos in develop mode.
./test.sh

Dockerfile may be helpful for setting up the whole repo.

Repo Structure

  • repos: submodules
  • test: test scripts
  • jenkins: jenkins CI configuration
  • travis: travis CI configuration

Test

Test Script

This repo contains several test scripts in test folder.

  • test_caffe2.py: PyTorch ==> ONNX ==> Caffe2 end-to-end tests, in which the decimal precision is checked.
  • test_models.py: PyTorch ==> ONNX model tests, check the output ONNX graph with expected files.
  • test_operators.py: PyTorch ==> ONNX operator tests, check the output ONNX graph with expected files.
  • test_verify.py: PyTorch ==> ONNX verification tests, check the exporting raises exceptions in certain conditions.
  • test_pytorch_helper.py: PyTorch ==> ONNX helper tests, check the pytorch related helper functions.

To update the expected files, please add flag --accept to the end of the command.

Convert Test from PyTorch

Using convert_pytorch_test.py, we can easily turn some existing PyTorch testing cases to ONNX backend test cases. Just run:

python test/convert_pytorch_test.py

Generate Test from PyTorch Operator

Script test_operators.py is also able to generate ONNX backend test cases based on operator tests. Just run:

python test/test_operators.py --onnx-test

Check the Generated Tests

All the generated ONNX backend test data is stored in repos/onnx/onnx/backend/test/data/model.

But the generated test cases may not pass end-to-end tests, so we have another script filter_generated_test.py to check whether the cases are passed or not, and the failed data will be moved to test/failed/generated.

filter_generated_test.py supports the following flags:

  • -v: verbose
  • --delete: delete failed test cases, by default, they are moved to test/failed/generated.
  • --no-expect: do not generate expect files for each test, by default, expected files are generated in test/expect folder for debugging purpose.

More Docs

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.