-
Notifications
You must be signed in to change notification settings - Fork 332
Fix to add clustering_callbacks.py to the pip package #564
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
Fix to add clustering_callbacks.py to the pip package #564
Conversation
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.
Looks OK to me, but @alanchiao, please have a look if this is a correct way of instructing bazel to include this module into the wheel.
Please refer to an example like #421 for adding changes to the pip package. You can subsequently install from source and test the actual path like in https://www.tensorflow.org/model_optimization/guide/install#installing_from_source. |
Please also refer to https://github.com/tensorflow/model-optimization/blob/master/CONTRIBUTING.md#style-and-practices in updating the release notes given this feature. |
50f2399
to
d587165
Compare
Hi @alanchiao , thanks for the feedback.
|
Yes the release notes are ready to be edited. You can add a new section for the next release with a TBD release version. |
Changes otherwise look good. To now actually do the API review since the previous PR didn't expose anything: it'd be good to: a) Include a screenshot of a sample of what you'd see on Tensorboard from these summaries |
We need to otherwise get a look by either @nutsiepully or @liyunlu0618. |
d587165
to
002aedb
Compare
@benkli01: could you comment on "is there a reason to have a separate cluster_update_freq from update_freq? Really, it's probably best of PruningSummaries didn't inherent from the TensorBoard callback - it's confusing since if a user uses both PruningSummaries and TensorBoard callbacks, then the TensorBoard callback work would be done twice". It's the main thing that stood out to me in this API. |
Hi @alanchiao , I am really sorry for the delay. There were some internal discussions about this PR. |
Thanks Benjamin for the response. I think it's fine to be consistent with inheriting from the callback for now given it's what Pruning does. I actually intended to highlight the part ""is there a reason to have a separate cluster_update_freq from update_freq" - is it valuable to have the two separate? |
This is actually the main addition of the ClusteringSummaries. It allows to save histograms of the clustered weights per batch instead of just per epoch, so that the clustering can be observed at a finer scale. To be honest, after thinking about it I'm not sure if that is enough to justify the new class. |
The RELEASE.md was updated accordingly.
002aedb
to
649194a
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.
LGTM
This is a small fix to add a dependency on
clustering_callbacks.py
so that the file is added to the pip package.