Skip to content
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

kws_streaming needs updates to be usable on latest tensorflow #1972

Open
Jacob-Bishop opened this issue Mar 30, 2024 · 0 comments
Open

kws_streaming needs updates to be usable on latest tensorflow #1972

Jacob-Bishop opened this issue Mar 30, 2024 · 0 comments

Comments

@Jacob-Bishop
Copy link

Jacob-Bishop commented Mar 30, 2024

  • Contains references to tf._keras_internal, which does not appear to be available in recent versions of tensorflow. (I can't find any other uses of this by googling, so not sure when it was removed?) Here, it looks like there are viable replacements within tensorflow, although possible I've missed something - I'm not an expert here:

    • tf._keras_internal.utils.control_flow_util.smart_cond is now available at tensorflow.python.framework.smart_cond.smart_cond
    • I think tf._keras_internal.models is the same as tensorflow.python.keras.models?
    • I think tf._keras_internal.engine.functional is the same as tensorflow.python.keras.engine.functional?
  • Requires tensorflow_addons, which does not support tensorflow > 2.14 per https://github.com/tensorflow/addons?tab=readme-ov-file. I haven't investigated what exactly the dependencies on tensorflow-addons are, I'm not sure how big a project it would be to fix this?

  • Traning example jupyter notebook uses tf1.keras.backend.set_learning_phrase(0), which according to https://docs.w3cub.com/tensorflow~2.3/keras/backend/set_learning_phase was scheduled for removal in 2020. I don't see any reference to it in the docs for 2.4, so guessing that happened. [Edit: Looks like this is still available through the v1 compat api, at least as of 2.11, it just raises a UserWarning].

There may be other issues, this is just what I've found so far. cc @rybakov.

[Edit: For anyone else trying to get this to run, making the suggested edits to deal with _keras_internal allows me to run the training demo script on tensorflow 2.13, but inference breaks with the infinite loop on clone_model mentioned here https://github.com/tensorflow/tensorflow/issues/61492. Migrating to 2.15 introduces new breakages, although I didn't document what they were.]

@Jacob-Bishop Jacob-Bishop changed the title kws_streaming needs substantial updates to be usable on latest tensorflow kws_streaming needs updates to be usable on latest tensorflow Mar 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant