Skip to content

tests for openvino failed with Python==3.6 #118

@RunningLeon

Description

@RunningLeon

Hi, I'm trying to build mmdeploy with different versions of python. Found tests for openvino failed with Python==3.6.
Could you take a look at this? @SemyonBevzuk

Failed tests

______________________________ test_onnx2openvino ______________________________

    @backend_checker(Backend.OPENVINO)
    def test_onnx2openvino():
        from mmdeploy.apis.openvino import get_output_model_file, onnx2openvino
        pytorch_model = TestModel().eval()
        export_img = torch.rand([1, 3, 8, 8])
        onnx_file = tempfile.NamedTemporaryFile(suffix='.onnx').name
        input_name = get_random_name()
        output_name = get_random_name()
        generate_onnx_file(pytorch_model, export_img, onnx_file, input_name,
                           output_name)
    
        input_info = {input_name: export_img.shape}
        output_names = [output_name]
        openvino_dir = tempfile.TemporaryDirectory().name
>       onnx2openvino(input_info, output_names, onnx_file, openvino_dir)

tests/test_apis/test_onnx2openvino.py:77: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
mmdeploy/backend/openvino/onnx2openvino.py:89: in onnx2openvino
    mo_output = run(command, capture_output=True, shell=True, check=True)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

input = None, timeout = None, check = True
popenargs = ('mo --input_model="/tmp/tmpp09w337y.onnx" --output_dir="/tmp/tmp_2wetdld" --output="kKj8yxmdx1" --input="bNBAIKaJrT" --input_shape="[1, 3, 8, 8]" --disable_fusing ',)
kwargs = {'capture_output': True, 'shell': True}

    def run(*popenargs, input=None, timeout=None, check=False, **kwargs):
        """Run command with arguments and return a CompletedProcess instance.
    
        The returned instance will have attributes args, returncode, stdout and
        stderr. By default, stdout and stderr are not captured, and those attributes
        will be None. Pass stdout=PIPE and/or stderr=PIPE in order to capture them.
    
        If check is True and the exit code was non-zero, it raises a
        CalledProcessError. The CalledProcessError object will have the return code
        in the returncode attribute, and output & stderr attributes if those streams
        were captured.
    
        If timeout is given, and the process takes too long, a TimeoutExpired
        exception will be raised.
    
        There is an optional argument "input", allowing you to
        pass a string to the subprocess's stdin.  If you use this argument
        you may not also use the Popen constructor's "stdin" argument, as
        it will be used internally.
    
        The other arguments are the same as for the Popen constructor.
    
        If universal_newlines=True is passed, the "input" argument must be a
        string and stdout/stderr in the returned object will be strings rather than
        bytes.
        """
        if input is not None:
            if 'stdin' in kwargs:
                raise ValueError('stdin and input arguments may not both be used.')
            kwargs['stdin'] = PIPE
    
>       with Popen(*popenargs, **kwargs) as process:
E       TypeError: __init__() got an unexpected keyword argument 'capture_output'

/opt/hostedtoolcache/Python/3.6.15/x64/lib/python3.6/subprocess.py:423: TypeError
----------------------------- Captured stderr call -----------------------------
2022-01-28 07:56:51,505 - mmdeploy - INFO - Args for Model Optimizer: mo --input_model="/tmp/tmpp09w337y.onnx" --output_dir="/tmp/tmp_2wetdld" --output="kKj8yxmdx1" --input="bNBAIKaJrT" --input_shape="[1, 3, 8, 8]" --disable_fusing 
------------------------------ Captured log call -------------------------------
INFO     mmdeploy:onnx2openvino.py:88 Args for Model Optimizer: mo --input_model="/tmp/tmpp09w337y.onnx" --output_dir="/tmp/tmp_2wetdld" --output="kKj8yxmdx1" --input="bNBAIKaJrT" --input_shape="[1, 3, 8, 8]" --disable_fusing

More detailed message: github action

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions