Skip to content

Commit b602439

Browse files
Varun Purifacebook-github-bot
authored andcommitted
Remove <model>.pte generation from export_bundled_program.py (#714)
Summary: Pull Request resolved: #714 Pull Request resolved: #692 Currently, this script generates two files: - `<model>.pte` after calling `save_pte_program` - `<model>.bp` after calling `save_bundled_program` Since this example is intended to showcase the functionality of the bundled program, we shouldn't generate `<model>.pte` -- only `<model>.bp`. We should also rename the function to reflect this. Gasoonjia tarun292 do you agree w/ the above? Just a small thought I had while using this. Reviewed By: tarun292, Gasoonjia Differential Revision: D50069707 fbshipit-source-id: 0999d555ed0dce9b1ed0a75bb70cd5618825ecb0
1 parent 8035f47 commit b602439

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

examples/sdk/scripts/export_bundled_program.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616

1717
from ...models import MODEL_NAME_TO_MODEL
1818
from ...models.model_factory import EagerModelFactory
19-
from ...portable.utils import export_to_exec_prog, save_pte_program
19+
from ...portable.utils import export_to_exec_prog
2020

2121

2222
def save_bundled_program(
@@ -54,9 +54,8 @@ def save_bundled_program(
5454
file.write(bundled_program_buffer)
5555

5656

57-
def export_to_pte(model_name, model, method_names, example_inputs):
57+
def export_to_bundled_program(model_name, model, method_names, example_inputs):
5858
exec_prog = export_to_exec_prog(model, example_inputs)
59-
save_pte_program(exec_prog.buffer, model_name)
6059

6160
# Just as an example to show how multiple input sets can be bundled along, here we
6261
# create a list with the example_inputs tuple used twice. Each instance of example_inputs
@@ -91,4 +90,4 @@ def export_to_pte(model_name, model, method_names, example_inputs):
9190

9291
method_names = ["forward"]
9392

94-
export_to_pte(args.model_name, model, method_names, example_inputs)
93+
export_to_bundled_program(args.model_name, model, method_names, example_inputs)

0 commit comments

Comments
 (0)