-
Notifications
You must be signed in to change notification settings - Fork 137
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
Unify io_config public method and public attribute #1091
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 tasks
jambayk
reviewed
Apr 18, 2024
jambayk
reviewed
Apr 18, 2024
trajepl
reviewed
Apr 18, 2024
…into myguo/io_config
trajepl
force-pushed
the
myguo/io_config
branch
from
April 18, 2024 08:53
959fe92
to
3c34f6e
Compare
jambayk
reviewed
Apr 18, 2024
jambayk
reviewed
Apr 18, 2024
JKinx
reviewed
Apr 18, 2024
jambayk
reviewed
Apr 18, 2024
…into myguo/io_config
jambayk
approved these changes
Apr 18, 2024
xiaoyu-work
reviewed
Apr 18, 2024
def io_config(self) -> Dict[str, Any]: | ||
assert self._io_config, "SNPEModelHandler: io_config is not set" | ||
|
||
keys = {"input_names", "input_shapes", "output_names", "output_shapes"} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Any reason we need this?
6 tasks
jambayk
added a commit
that referenced
this pull request
Apr 26, 2024
…ecution_provider (#1116) ## Describe your changes This fixes some bugs introduced by some recent PRs: - #1091 - made `model.io_config` a property which calls `get_hf_model_io_config` if the conditions meet. - However, this function fails if the model is not supported. Now it doesn't fail and logs when unsupported. - `PytorchModelHandler.to_json` uses `_io_config` for `"io_config"` so that the serialized model is the same as the one that was initialized. - #1072 - execution_provider is optional for non-onnx pass but `to_json` still has the key. Which doesn't match the signature for https://github.com/microsoft/Olive/blob/91c4c20e324fbc47dcbbea20bf89035ec94fa4a6/olive/passes/olive_pass.py#L459 - Only add when not None - Also removed `pass_accelerator_type` and `pass_execution_provider` from the aml_pass_runner command line inputs. These values are already present in `pass_config.json` ## Checklist before requesting a review - [ ] Add unit tests for this change. - [ ] Make sure all tests can pass. - [ ] Update documents if necessary. - [ ] Lint and apply fixes to your code by running `lintrunner -a` - [ ] Is this a user-facing change? If yes, give a description of this change to be included in the release notes. - [ ] Is this PR including examples changes? If yes, please remember to update [example documentation](https://github.com/microsoft/Olive/blob/main/docs/source/examples.md) in a follow-up PR. ## (Optional) Issue link
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Describe your changes
Checklist before requesting a review
lintrunner -a
(Optional) Issue link