Skip to content

Move portable/util.py into extension/export_util #4141

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 5 commits into from

Conversation

helunwencser
Copy link
Contributor

@helunwencser helunwencser commented Jul 3, 2024

Stack from ghstack (oldest at bottom):

portable/util.py is used by multiple example models including llm models. Since we are moving llm models' export libraries into extension/llm/export, it makes sense to move portable/util.py
into extension as well.

This change does that.

It moves the test into examples/models which seems to be a better place for these unit tests since they test the export flow for different models and also rely on some code under examples/models like
EagerModelFactory.

Differential Revision: D59306348

`portable/util.py` is used by multiple example models including llm models. Since we are moving llm models' export libraries into `extension/llm/export`, it makes sense to move `portable/util.py`
into extension as well.

This change does that.

It moves the test into `examples/models` which seems to be a better place for these unit tests since they test the export flow for different models and also rely on some code under `examples/models` like
`EagerModelFactory`.

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

[ghstack-poisoned]
Copy link

pytorch-bot bot commented Jul 3, 2024

🔗 Helpful Links

🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/executorch/4141

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

✅ No Failures

As of commit 53748ac with merge base 29fdaa1 (image):
💚 Looks good so far! There are no failures yet. 💚

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

@facebook-github-bot facebook-github-bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Jul 3, 2024
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D59306348

helunwencser added a commit that referenced this pull request Jul 3, 2024
`portable/util.py` is used by multiple example models including llm models. Since we are moving llm models' export libraries into `extension/llm/export`, it makes sense to move `portable/util.py`
into extension as well.

This change does that.

It moves the test into `examples/models` which seems to be a better place for these unit tests since they test the export flow for different models and also rely on some code under `examples/models` like
`EagerModelFactory`.

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

ghstack-source-id: 232405434
Pull Request resolved: #4141
`portable/util.py` is used by multiple example models including llm models. Since we are moving llm models' export libraries into `extension/llm/export`, it makes sense to move `portable/util.py`
into extension as well.

This change does that.

It moves the test into `examples/models` which seems to be a better place for these unit tests since they test the export flow for different models and also rely on some code under `examples/models` like
`EagerModelFactory`.

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

[ghstack-poisoned]
helunwencser added a commit that referenced this pull request Jul 3, 2024
Pull Request resolved: #4141

`portable/util.py` is used by multiple example models including llm models. Since we are moving llm models' export libraries into `extension/llm/export`, it makes sense to move `portable/util.py`
into extension as well.

This change does that.

It moves the test into `examples/models` which seems to be a better place for these unit tests since they test the export flow for different models and also rely on some code under `examples/models` like
`EagerModelFactory`.

It also fixes the import hack inside `executorch/examples/models/llama2/builder.py`.

Differential Revision: [D59306348](https://our.internmc.facebook.com/intern/diff/D59306348/)
ghstack-source-id: 232553687
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D59306348

`portable/util.py` is used by multiple example models including llm models. Since we are moving llm models' export libraries into `extension/llm/export`, it makes sense to move `portable/util.py`
into extension as well.

This change does that.

It moves the test into `examples/models` which seems to be a better place for these unit tests since they test the export flow for different models and also rely on some code under `examples/models` like
`EagerModelFactory`.

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

[ghstack-poisoned]
helunwencser added a commit that referenced this pull request Jul 8, 2024
Pull Request resolved: #4141

`portable/util.py` is used by multiple example models including llm models. Since we are moving llm models' export libraries into `extension/llm/export`, it makes sense to move `portable/util.py`
into extension as well.

This change does that.

It moves the test into `examples/models` which seems to be a better place for these unit tests since they test the export flow for different models and also rely on some code under `examples/models` like
`EagerModelFactory`.

It also fixes the import hack inside `executorch/examples/models/llama2/builder.py`.
ghstack-source-id: 232865153

Differential Revision: [D59306348](https://our.internmc.facebook.com/intern/diff/D59306348/)
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D59306348

`portable/util.py` is used by multiple example models including llm models. Since we are moving llm models' export libraries into `extension/llm/export`, it makes sense to move `portable/util.py`
into extension as well.

This change does that.

It moves the test into `examples/models` which seems to be a better place for these unit tests since they test the export flow for different models and also rely on some code under `examples/models` like
`EagerModelFactory`.

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

[ghstack-poisoned]
helunwencser added a commit that referenced this pull request Jul 8, 2024
Pull Request resolved: #4141

`portable/util.py` is used by multiple example models including llm models. Since we are moving llm models' export libraries into `extension/llm/export`, it makes sense to move `portable/util.py`
into extension as well.

This change does that.

It moves the test into `examples/models` which seems to be a better place for these unit tests since they test the export flow for different models and also rely on some code under `examples/models` like
`EagerModelFactory`.

It also fixes the import hack inside `executorch/examples/models/llama2/builder.py`.
ghstack-source-id: 232898293

Differential Revision: [D59306348](https://our.internmc.facebook.com/intern/diff/D59306348/)
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D59306348

`portable/util.py` is used by multiple example models including llm models. Since we are moving llm models' export libraries into `extension/llm/export`, it makes sense to move `portable/util.py`
into extension as well.

This change does that.

It moves the test into `examples/models` which seems to be a better place for these unit tests since they test the export flow for different models and also rely on some code under `examples/models` like
`EagerModelFactory`.

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

[ghstack-poisoned]
helunwencser added a commit that referenced this pull request Jul 9, 2024
Pull Request resolved: #4141

`portable/util.py` is used by multiple example models including llm models. Since we are moving llm models' export libraries into `extension/llm/export`, it makes sense to move `portable/util.py`
into extension as well.

This change does that.

It moves the test into `examples/models` which seems to be a better place for these unit tests since they test the export flow for different models and also rely on some code under `examples/models` like
`EagerModelFactory`.

It also fixes the import hack inside `executorch/examples/models/llama2/builder.py`.
ghstack-source-id: 233035427

Differential Revision: [D59306348](https://our.internmc.facebook.com/intern/diff/D59306348/)
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D59306348

@facebook-github-bot
Copy link
Contributor

This pull request has been merged in 2d9c6b5.

@kirklandsign
Copy link
Contributor

  File "/pytorch/executorch/examples/portable/scripts/export_and_delegate.py", line 23, in <module>
    from ..utils import export_to_edge
ModuleNotFoundError: No module named 'examples.portable.utils'

helunwencser added a commit that referenced this pull request Jul 9, 2024
#4141 missed updating export_and_delegate.py. This PR adds it.

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

[ghstack-poisoned]
helunwencser added a commit that referenced this pull request Jul 9, 2024
#4141 missed updating export_and_delegate.py. This PR adds it.

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

ghstack-source-id: 233107223
Pull Request resolved: #4193
facebook-github-bot pushed a commit that referenced this pull request Jul 9, 2024
Summary:
Pull Request resolved: #4193

#4141 missed updating export_and_delegate.py. This PR adds it.
ghstack-source-id: 233107223
exported-using-ghexport

Reviewed By: lucylq

Differential Revision: D59547264

fbshipit-source-id: b7b86164e7b1de544f403dd3b12b4afab24f13c8
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. fb-exported Merged
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants