executorch icon indicating copy to clipboard operation
executorch copied to clipboard

Update exir_deserialize logic

Open ethansfng opened this issue 1 month ago • 3 comments

Summary: For model hand_tracking_dpe_v26 we have this metadata string that is being deserialized.

"L__self__,,on_device_ai.helios.compiler_tests.e2e_test_gen.configs.hand_track ing_dpe_v26.hand_tracking_dpe_v26.Test_dpe_v26_dpefeedforward_only_por_qconfig _executorch;140317725696144,mods,nimble.ml_libs.problems.mview.models.dpe_infe rence_v2.DPEFeedForward;140317579086400,getattr(getattr(L['self'].mods.image encoder._image_backbone._layers, '0'), '3'),torch.nn.modules.pooling.MaxPool2d"

This string has multiple entries separated by ";" with format "key,path,type_str"

For 140317579086400,getattr(getattr(L['self'].mods._image_encoder._image_backbone._layers, '0'),'3'),torch.nn.modules.pooling.MaxPool2d

Should be split into 3 parts:

  1. key: 140317579086400
  2. path: getattr(getattr(L['self'].mods._image_encoder._image_backbone._layers,'0'), '3')
  3. type: torch.nn.modules.pooling.MaxPool2d

The original code removes parenthases and content in it and then splits on commas Result: "getattrgetattr, '0', '3',torch.nn.modules.pooling.MaxPool2d"

This issue pops up when we have nested getattr() within layers such as this: self._layers = nn.Sequential( Conv2d(...), ReLU(), Conv2d(...), MaxPool2d(...), )

Differential Revision: D87112636

ethansfng avatar Nov 15 '25 04:11 ethansfng

:link: Helpful Links

:test_tube: See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/executorch/15840

Note: Links to docs will display an error until the docs builds have been completed.

:white_check_mark: No Failures

As of commit f1003ce4873cd89a847ecad3cf1bf1b724ef54d7 with merge base 3826f44a843a5cb425973cf3acbc59d5ec294998 (image): :green_heart: Looks good so far! There are no failures yet. :green_heart:

This comment was automatically generated by Dr. CI and updates every 15 minutes.

pytorch-bot[bot] avatar Nov 15 '25 04:11 pytorch-bot[bot]

@ethansfng has exported this pull request. If you are a Meta employee, you can view the originating Diff in D87112636.

meta-codesync[bot] avatar Nov 15 '25 04:11 meta-codesync[bot]

This PR needs a release notes: label

If your change should be included in the release notes (i.e. would users of this library care about this change?), please use a label starting with release notes:. This helps us keep track and include your important work in the next release notes.

To add a label, you can comment to pytorchbot, for example @pytorchbot label "release notes: none"

For more information, see https://github.com/pytorch/pytorch/wiki/PyTorch-AutoLabel-Bot#why-categorize-for-release-notes-and-how-does-it-work.

github-actions[bot] avatar Nov 15 '25 04:11 github-actions[bot]

@ethansfng Please see the copilot recommendations, they look pretty good

mergennachin avatar Nov 17 '25 16:11 mergennachin