File tree Expand file tree Collapse file tree 1 file changed +1
-10
lines changed
Expand file tree Collapse file tree 1 file changed +1
-10
lines changed Original file line number Diff line number Diff line change @@ -343,18 +343,9 @@ def serialize(
343343 else :
344344 example_inputs = b""
345345
346- # TODO (shangdi): change to use `torch._export.utils.remove_proxy_from_state_dict`
347- # after pytorch repo is updated.
348- # Proxy cannot be dumped, so we remove them.
349- new_state_dict = {}
350- for k , v in exported_program .state_dict .items ():
351- if "proxy" in v .__dict__ :
352- new_state_dict [k ] = v .clone ().detach ()
353- else :
354- new_state_dict [k ] = v
355346 return export_serialize ._SerializedProgram (
356347 serialized_ep ,
357- export_serialize .serialize_torch_artifact (new_state_dict ),
348+ export_serialize .serialize_torch_artifact (exported_program . state_dict ),
358349 export_serialize .serialize_torch_artifact (constants ),
359350 example_inputs ,
360351 )
You can’t perform that action at this time.
0 commit comments