Addons: Merging tfa.callbacks.tqdm_progress_bar with tqdm.keras

Created on 22 Jan 2020  路  4Comments  路  Source: tensorflow/addons

This issue is for the potential merging of tfa.callbacks.tqdm_progress_bar and tqdm.keras to reduce code duplication. I'll follow up with @casperdcl, the code owner and maintainer of tqdm, https://github.com/tqdm/tqdm, to see what's the best way forward for this effort.

tqdm.keras:
https://github.com/tqdm/tqdm/blob/master/tqdm/keras.py

tfa.callbacks.tqdm_progress_bar:
https://github.com/tensorflow/addons/blob/master/tensorflow_addons/callbacks/tqdm_progress_bar.py

tfa.callback.tqdm_progress_bar tutorial:
https://github.com/tensorflow/addons/blob/master/docs/tutorials/tqdm_progress_bar.ipynb

callbacks

Most helpful comment

I think keras_tqdm is no longer maintained (last commit in Oct 2017), I will look into how we can merge tqdm.keras and the one we have here in tfa to make better sense in terms of maintenance :)

All 4 comments

fyi from https://github.com/tensorflow/addons/pull/916#issuecomment-576937849:

Anyone looked at https://github.com/tqdm/tqdm/#keras-integration? [...] looks like it was developed at the same time as the tensorflow addon. Seems silly to have it in two places.

I'd suggest opening a PR on https://github.com/tqdm/tqdm/ to change anything that may be required and then changing https://github.com/tensorflow/addons/blob/master/tensorflow_addons/callbacks/tqdm_progress_bar.py to just import from tqdm...

cc @shun-lin @gabrieldemarmiesse @seanpmorgan

and from https://github.com/tensorflow/addons/pull/916#issuecomment-576948044:

[...] referring to future development/PRs to ease the burden of maintenance. Right now there's [tfa].callbacks.tqdm_progress_bar being developed in tandem with tqdm.keras even though they are broadly identical. I was suggesting a way to avoid code/logic duplication between them.

also found https://github.com/bstriner/keras-tqdm from @bstriner to consider.

Overall there's

  • [tfa.callbacks.tqdm_progress_bar]

    • hopefully bug-free

  • [tqdm.keras]

    • neatest in terms of tqdm usage but no idea about tf/keras correctness. Nobody reviewed it.

  • [keras_tqdm]

    • longest running implementation so probably a good reference?

I still would prefer if people open PRs on the main repo ([tqdm.keras]) to make external wrapping easier, and then have very thin wrappers in [tfa.callbacks.tqdm_progress_bar], [keras_tqdm], and even [keras.callbacks].

I would be in favor of a small wrapper in Addons which utilizes a central tqdm.keras

I think keras_tqdm is no longer maintained (last commit in Oct 2017), I will look into how we can merge tqdm.keras and the one we have here in tfa to make better sense in terms of maintenance :)

Was this page helpful?
0 / 5 - 0 ratings