-
Notifications
You must be signed in to change notification settings - Fork 634
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
Add bisect_model API under ct.models.utils #2286
Conversation
0850fd3
to
818eb93
Compare
Nice! Would be great to include example usages / tests. |
fe4785d
to
c1a24ff
Compare
c1a24ff
to
626bca8
Compare
Thanks! Just added. |
Can you also add a small section describing the util in the docs, along with its use case (when to use it, e.g. SD model thats big) : https://apple.github.io/coremltools/docs-guides/source/mlmodel-utilities.html |
|
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.
Awesome utility!
Done! |
8acbf40
to
f303e59
Compare
c2368a1
to
2ea8bb2
Compare
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.
PR looks good.
I think it would be good to merge, after addressing two more comments from my side:
- a few changes in the documentation
- If we can add another unit test which uses constexpr ops that would be great (take the uncompressed model, palletize it and then chunk it for example). In the original chunking script, I remember fixing a bunch of issues which only came up when we had used constexpr ops.
0016340
to
e04042c
Compare
Done! |
https://gitlab.com/coremltools1/coremltools/-/pipelines/1392495182 |
hi i think there is issue with this API when the model is quantized before chunking: #2320 |
ct.models.utils.bisect_model
chunk_mlprogram.py
directly calling into this new API, so that any further implementation details changes in coremltools will not break the script itself.Testing:
https://gitlab.com/coremltools1/coremltools/-/pipelines/1389709376https://gitlab.com/coremltools1/coremltools/-/pipelines/1389735502https://gitlab.com/coremltools1/coremltools/-/pipelines/1392495182