modelbox-ai / modelbox

A high performance, high expansion, easy to use framework for AI application. 为AI应用的开发者提供一套统一的高性能、易用的编程框架,快速基于AI全栈服务、开发跨端边云的AI行业应用,支持GPU,NPU加速。
https://modelbox-ai.com
Apache License 2.0
133 stars 39 forks source link

Python test case crash #234

Open pymumu opened 2 years ago

pymumu commented 2 years ago

python测试用例在ubuntu 2004下crash

    @unittest.skip("disable thread for no delete")
    def test_flow_op_thread(self):

    @unittest.skip("disable thread for no delete")
    def test_flow_op(self):

可能导致原因是py_resize.py下列代码: 将numpy的数据push到outpu时异常。

    def process(self, data_ctx):
        in_bl = data_ctx.input("resize_in")
        out_bl = data_ctx.output("resize_out")

        for buffer in in_bl:
            np_image = np.array(buffer, copy= False)
            resize_image = Image.fromarray(np_image).resize((self.width_config, self.height_config))
            out_bl.push_back(np.array(resize_image))

        modelbox.info("ResizeFlowunit process")
        return modelbox.Status.StatusCode.STATUS_SUCCESS