From 2c95f488a4dc31cae0915faf958efb4d848af9f3 Mon Sep 17 00:00:00 2001 From: Karla Saur Date: Tue, 31 Mar 2020 19:35:14 +0000 Subject: [PATCH] commit hooks --- .pre-commit-config.yaml | 4 ++++ README.md | 2 +- coverage.svg | 21 +++++++++++++++++++++ hummingbird/common/_registration.py | 1 + 4 files changed, 27 insertions(+), 1 deletion(-) create mode 100644 coverage.svg diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 6d1733010..fd9819ce5 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -15,3 +15,7 @@ repos: - id: detect-private-key - id: trailing-whitespace - id: no-commit-to-branch + - repo: https://github.com/ksaur/pre-commit-hooks + rev: v2.9.0 + hooks: + - id: badge-cov diff --git a/README.md b/README.md index 78a49edac..e21b79f5e 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ # Hummingbird ![](https://github.com/microsoft/hummingbird/workflows/Python%20application/badge.svg?branch=develop) - +![](https://github.com/microsoft/hummingbird/coverage.svg?branch=develop) ## Introduction *sklearn-pytorch* converts [scikit-learn](https://scikit-learn.org/stable/) models to [PyTorch](https://pytorch.org/). Once in the PyTorch format, you can further convert to [ONNX](https://github.com/onnx/onnx) or [TorchScript](https://pytorch.org/docs/stable/jit.html) for high performance native scoring. diff --git a/coverage.svg b/coverage.svg new file mode 100644 index 000000000..a8c7e72ad --- /dev/null +++ b/coverage.svg @@ -0,0 +1,21 @@ + + + + + + + + + + + + + + + + coverage + coverage + 92% + 92% + + diff --git a/hummingbird/common/_registration.py b/hummingbird/common/_registration.py index ca3ab3112..a0df3d61d 100644 --- a/hummingbird/common/_registration.py +++ b/hummingbird/common/_registration.py @@ -35,6 +35,7 @@ def register_converter(operator_name, conversion_function, overwrite=False): """ if not overwrite and operator_name in _converter_pool: raise ValueError("We do not overwrite registered converter " "by default") + _converter_pool[operator_name] = conversion_function