Serialize a bundled program to disk.
(executorch_program, method_test_suites, output_path: str)
| 73 | |
| 74 | |
| 75 | def _save_bundled_program(executorch_program, method_test_suites, output_path: str): |
| 76 | """Serialize a bundled program to disk.""" |
| 77 | bundled_program = BundledProgram(executorch_program, method_test_suites) |
| 78 | bundled_program_buffer = serialize_from_bundled_program_to_flatbuffer( |
| 79 | bundled_program |
| 80 | ) |
| 81 | |
| 82 | with open(output_path, "wb") as file: |
| 83 | file.write(bundled_program_buffer) |
| 84 | |
| 85 | |
| 86 | def _load_example_inputs(model_input: str | None) -> Any: # nosec B614 |
no test coverage detected