SIGN IN SIGN UP

Refactor serialize.py (#9579)

Pull Request resolved: https://github.com/pytorch/executorch/pull/9124

Refactor `_extract_tensors` out of serialize.py, simplify before
serializing named_data ghstack-source-id: 273798696

Differential Revision:
[D70752429](https://our.internmc.facebook.com/intern/diff/D70752429/)

### Summary
[PLEASE REMOVE] See [CONTRIBUTING.md's Pull
Requests](https://github.com/pytorch/executorch/blob/main/CONTRIBUTING.md#pull-requests)
for ExecuTorch PR guidelines.

[PLEASE REMOVE] If this PR closes an issue, please add a `Fixes
#<issue-id>` line.

[PLEASE REMOVE] If this PR introduces a fix or feature that should be
the upcoming release notes, please add a "Release notes: <area>" label.
For a list of available release notes labels, check out
[CONTRIBUTING.md's Pull
Requests](https://github.com/pytorch/executorch/blob/main/CONTRIBUTING.md#pull-requests).

### Test plan
[PLEASE REMOVE] How did you test this PR? Please write down any manual
commands you used and note down tests that you have written if
applicable.
L
lucylq committed
644b7ddf14180d97e348faa627f576e13d367d69
Parent: 3b2a8ca
Committed by GitHub <noreply@github.com> on 3/25/2025, 5:23:34 PM