Skip to content

Commit

Permalink
adapt with the new version of ORT
Browse files Browse the repository at this point in the history
  • Loading branch information
breezedeus committed Sep 23, 2023
1 parent c6b6003 commit 1d5bc34
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ package:
rm -rf build
python setup.py sdist bdist_wheel

VERSION = 1.2.3.3
VERSION = 1.2.3.4
upload:
python -m twine upload dist/cnstd-$(VERSION)* --verbose

Expand Down
8 changes: 8 additions & 0 deletions RELEASE.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# Release Notes

# Update 2023.09.23:发布 V1.2.3.4

主要变更:
* 增加了对 `onnxruntine` (ORT) 新版的兼容:`InferenceSession` 中显式提供了 `providers` 参数。
* `setup.py` 中去除对 `onnxruntime` 的依赖,改为在 `extras_require` 中按需指定:
* `cnstd[ort-cpu]``onnxruntime`
* `cnstd[ort-gpu]`: `onnxruntime-gpu`

# Update 2023.09.21:发布 V1.2.3.3

主要变更:
Expand Down
2 changes: 1 addition & 1 deletion cnstd/__version__.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,4 @@
# specific language governing permissions and limitations
# under the License.

__version__ = '1.2.3.3'
__version__ = '1.2.3.4'
2 changes: 1 addition & 1 deletion cnstd/ppocr/utility.py
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ def create_predictor(model_fp, mode, logger):
model_file_path = model_fp
if not os.path.exists(model_file_path):
raise ValueError("not find model file path {}".format(model_file_path))
sess = ort.InferenceSession(model_file_path)
sess = ort.InferenceSession(model_file_path, providers=['AzureExecutionProvider', 'CPUExecutionProvider'])
return sess, sess.get_inputs()[0], None, None


Expand Down
3 changes: 2 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,11 +55,12 @@
'matplotlib',
'seaborn',
"onnx",
"onnxruntime",
"huggingface_hub",
]

extras_require = {
"ort-cpu": ["onnxruntime"],
"ort-gpu": ["onnxruntime-gpu"],
"dev": ["pip-tools", "pytest"],
}

Expand Down

0 comments on commit 1d5bc34

Please sign in to comment.