tensorflow / tensorflow/model-optimization
Move TFMOT Library Code Off Private APIs
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 1.6k
- Forks
- 349
- Avg merge
- 3d 2h
- Merged PRs (30d)
- 1
Description
TFMOT currently has dependencies on TF and tf.keras private APIs. This is a focused effort to completely move off of them. We don't want TFMOT releases to stop working with newer TF releases.
Most recently, tfmot.sparsity.keras.PruningSummaries has stopped working with tf-nightly because of a dependence on a private _log_metrics API. If we can move this to use the previously available tf.summary public API, then our next release will work with all > 1.14.0 releases.
If we don't address this now, it'll eventually start to slow down releases as we may want to delay them to ensure all the techniques work with the next TF release(s).
For pruning and quantization, I've previously removed all (or nearly all) private APIs we use that we know how to fix without guidance from TF / tf.keras. Below, I'll put together a list of the ones that remain in order of priority and tackle them one-by-one.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with tfmot.sparsity.keras.PruningSummaries and trace its use of the private _log_metrics API. Compare that path with the available tf.summary public API, then identify the remaining private TensorFlow and tf.keras dependencies described in the issue. Done means the affected paths no longer depend on private APIs and continue working across the stated TensorFlow releases.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python, tensorflow
- Domain
- machine-learning
- Issue type
- Refactor
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100