(executorch_program, example_inputs, expected_output)
| 39 | |
| 40 | |
| 41 | def get_bundled_program(executorch_program, example_inputs, expected_output): |
| 42 | method_test_suites = [ |
| 43 | MethodTestSuite( |
| 44 | method_name="forward", |
| 45 | test_cases=[ |
| 46 | MethodTestCase( |
| 47 | inputs=example_inputs, expected_outputs=[expected_output] |
| 48 | ) |
| 49 | ], |
| 50 | ) |
| 51 | ] |
| 52 | logging.info(f"Expected output: {expected_output}") |
| 53 | |
| 54 | bundled_program = BundledProgram(executorch_program, method_test_suites) |
| 55 | bundled_program_buffer = serialize_from_bundled_program_to_flatbuffer( |
| 56 | bundled_program |
| 57 | ) |
| 58 | return bundled_program_buffer |
| 59 | |
| 60 | |
| 61 | def parse_args(): |
no test coverage detected