Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Enhancement] Fix tests for OpenVINO with Python 3.6 #125

Merged
merged 2 commits into from
Feb 10, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/en/tutorials/how_to_support_new_backends.md
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ The backends in MMDeploy must support the ONNX. The backend loads the ".onnx" fi
f'--input_shape="{input_shapes}" ' \
f'--disable_fusing '
command = f'mo.py {mo_args}'
mo_output = run(command, capture_output=True, shell=True, check=True)
mo_output = run(command, stdout=PIPE, stderr=PIPE, shell=True, check=True)
```

**Use executable program:**
Expand Down
4 changes: 2 additions & 2 deletions mmdeploy/backend/openvino/onnx2openvino.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Copyright (c) OpenMMLab. All rights reserved.
import os.path as osp
import subprocess
from subprocess import CalledProcessError, run
from subprocess import PIPE, CalledProcessError, run
from typing import Dict, List, Union

import mmcv
Expand Down Expand Up @@ -86,7 +86,7 @@ def onnx2openvino(input_info: Dict[str, Union[List[int], torch.Size]],

logger = get_root_logger()
logger.info(f'Args for Model Optimizer: {command}')
mo_output = run(command, capture_output=True, shell=True, check=True)
mo_output = run(command, stdout=PIPE, stderr=PIPE, shell=True, check=True)
logger.info(mo_output.stdout.decode())
logger.debug(mo_output.stderr.decode())

Expand Down