(func)
| 346 | |
| 347 | |
| 348 | def run_two_outputs(func): |
| 349 | pipe = BasicPipeline(BATCH_SIZE, NUM_WORKERS, DEVICE_ID, SEED, images_dir) |
| 350 | pyfunc_pipe = TwoOutputsPythonOperatorPipeline( |
| 351 | BATCH_SIZE, NUM_WORKERS, DEVICE_ID, SEED, images_dir, func |
| 352 | ) |
| 353 | for it in range(ITERS): |
| 354 | (preprocessed_output,) = pipe.run() |
| 355 | output1, output2 = pyfunc_pipe.run() |
| 356 | for i in range(len(output1)): |
| 357 | pro1, pro2 = func(preprocessed_output.at(i)) |
| 358 | assert numpy.array_equal(output1.at(i), pro1) |
| 359 | assert numpy.array_equal(output2.at(i), pro2) |
| 360 | |
| 361 | |
| 362 | def test_split(): |
no test coverage detected