From e8e12f10a0ea8857f4b79c0437fe64af7101699c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Xavier=20Dupr=C3=A9?= Date: Wed, 30 Jun 2021 17:36:20 +0200 Subject: [PATCH] Upgrade version number, update documentation (#672) --- README.md | 2 +- requirements.txt | 2 +- setup.py | 2 +- skl2onnx/__init__.py | 3 +-- skl2onnx/common/_container.py | 3 +++ 5 files changed, 7 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 0326a9ff8..148525ecf 100644 --- a/README.md +++ b/README.md @@ -25,7 +25,7 @@ Or you can install from the source with the latest changes. pip install git+https://github.com/onnx/sklearn-onnx.git ``` -If you install *sklearn-onnx* from its source code, you must set the environment variable `ONNX_ML=1` before installing the onnx package. +If you install *onnx* from its source code, you must set the environment variable `ONNX_ML=1` before installing the onnx package. ## Contribute We welcome contributions in the form of feedback, ideas, or code. diff --git a/requirements.txt b/requirements.txt index 0ec9fb1d6..09ae7c863 100644 --- a/requirements.txt +++ b/requirements.txt @@ -4,4 +4,4 @@ scipy>=1.0 protobuf onnx>=1.2.1 scikit-learn>=0.19 -onnxconverter-common>=1.6.1,<1.9 +onnxconverter-common>=1.6.1 diff --git a/setup.py b/setup.py index efc23e0ef..1566bae58 100644 --- a/setup.py +++ b/setup.py @@ -49,8 +49,8 @@ 'Operating System :: MacOS :: MacOS X', 'Operating System :: Microsoft :: Windows', 'Programming Language :: Python', - 'Programming Language :: Python :: 3.6', 'Programming Language :: Python :: 3.7', 'Programming Language :: Python :: 3.8', + 'Programming Language :: Python :: 3.9', 'License :: OSI Approved :: Apache Software License'], ) diff --git a/skl2onnx/__init__.py b/skl2onnx/__init__.py index 9a80cab00..db12808af 100644 --- a/skl2onnx/__init__.py +++ b/skl2onnx/__init__.py @@ -1,10 +1,9 @@ # SPDX-License-Identifier: Apache-2.0 - """ Main entry point to the converter from the *scikit-learn* to *onnx*. """ -__version__ = "1.9.dev" +__version__ = "1.9" __author__ = "Microsoft" __producer__ = "skl2onnx" __producer_version__ = __version__ diff --git a/skl2onnx/common/_container.py b/skl2onnx/common/_container.py index 98e6242dd..e53f2cd5c 100644 --- a/skl2onnx/common/_container.py +++ b/skl2onnx/common/_container.py @@ -386,6 +386,9 @@ def add_initializer(self, name, onnx_type, shape, content): else: if any(d is None for d in shape): raise ValueError('Shape of initializer cannot contain None.') + if (hasattr(content, 'dtype') and + content.dtype in (bool, np.bool_)): + content = content.astype(np.int32) try: tensor = make_tensor(name, onnx_type, shape, content) except TypeError as e: