pytorch/caffe2/python/onnx
Hugo van Kemenade 473e78c0fa Remove redundant code for unsupported Python versions (#49486)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/49486

Remove code for Python 3.5 and lower.

There's more that can be removed/modernised, but sticking mainly to redundant version checks here, to keep the diff/PR smaller.

Pull Request resolved: https://github.com/pytorch/pytorch/pull/46579

Reviewed By: zou3519

Differential Revision: D24453571

Pulled By: ezyang

fbshipit-source-id: c2cfcf05d6c5f65df64d89c331692c9aec09248e
2021-01-06 12:45:46 -08:00
..
bin Drop unused imports from caffe2/python (#49980) 2021-01-05 13:17:46 -08:00
tests Drop unused imports from caffe2/python (#49980) 2021-01-05 13:17:46 -08:00
__init__.py remediation of S205607 2020-07-17 17:19:47 -07:00
backend.py Remove redundant code for unsupported Python versions (#49486) 2021-01-06 12:45:46 -08:00
backend_cpp_rep.py Remove __future__ imports for legacy Python2 supports (#45033) 2020-09-23 17:57:02 -07:00
backend_rep.py Remove __future__ imports for legacy Python2 supports (#45033) 2020-09-23 17:57:02 -07:00
error.py Remove __future__ imports for legacy Python2 supports (#45033) 2020-09-23 17:57:02 -07:00
frontend.py Remove redundant code for unsupported Python versions (#49486) 2021-01-06 12:45:46 -08:00
helper.py Drop unused imports from caffe2/python (#49980) 2021-01-05 13:17:46 -08:00
onnxifi.py Drop unused imports from caffe2/python (#49980) 2021-01-05 13:17:46 -08:00
ONNXOpCoverage.md Fix typos, via a Levenshtein-type corrector (#31523) 2020-01-17 16:03:19 -08:00
README.md
test_onnxifi.py Drop unused imports from caffe2/python (#49980) 2021-01-05 13:17:46 -08:00
workspace.py Remove __future__ imports for legacy Python2 supports (#45033) 2020-09-23 17:57:02 -07:00

Caffe2 implementation of Open Neural Network Exchange (ONNX)

Usage

Installation

onnx-caffe2 is installed as a part of Caffe2. Please follow the instructions to install Caffe2.

Folder Structure

  • ./: the main folder that all code lies under
    • frontend.py: translate from caffe2 model to onnx model
    • backend.py: execution engine that runs onnx on caffe2
  • tests/: test files

Testing

onnx-caffe2 uses pytest as test driver. In order to run tests, first you need to install pytest:

pip install pytest-cov

After installing pytest, do

pytest

to run tests.

Testing coverage issues/status: https://github.com/caffe2/caffe2/blob/master/caffe2/python/onnx/ONNXOpCoverage.md

Development

During development it's convenient to install caffe2 in development mode:

cd /path/to/caffe2
pip install -e caffe2/

License

MIT License