File tree Expand file tree Collapse file tree 2 files changed +5
-3
lines changed
Expand file tree Collapse file tree 2 files changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -15,6 +15,7 @@ def get_torch_module_and_inputs(model_path):
1515def _get_torch_module (model_path ):
1616 py_module = load_module (f"{ model_path } /model.py" )
1717 torch_module_cls = py_module .GraphModule
18+ torch_module_cls .__graph_net_file_path__ = model_path
1819 return torch_module_cls ()
1920
2021
Original file line number Diff line number Diff line change @@ -221,15 +221,16 @@ def handle_underscore_suffix_difference():
221221
222222 zip_filter_names = get_zip_filter_names ()
223223
224- def zip_filter_names_str ():
224+ def zip_filter_names_error_str ():
225225 for triple in zip_filter_names :
226226 print (triple )
227- return "<printed before>"
227+ error_model_path = module .__graph_net_file_path__
228+ return f"{ error_model_path = } "
228229
229230 from pathlib import Path
230231
231232 Path ("/tmp/a.py" ).write_text (traced_module .code )
232- assert len (zip_filter_names ) == 0 , f" { zip_filter_names_str () = } "
233+ assert len (zip_filter_names ) == 0 , zip_filter_names_error_str ()
233234 return traced_module
234235
235236
You can’t perform that action at this time.
0 commit comments