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

[Question] how to save the analyzer object for later online use. #304

Open
ShaiBiton opened this issue Jan 8, 2023 · 0 comments
Open

[Question] how to save the analyzer object for later online use. #304

ShaiBiton opened this issue Jan 8, 2023 · 0 comments

Comments

@ShaiBiton
Copy link

ShaiBiton commented Jan 8, 2023

Hi guys,

I love this package and started to use it again after you moved to tf2 (also used it when it was in its tf1 days).
So thanks for all the hard work !)

My question is, I'm trying to save the analyzer after generated for future use but I seem to unable to do it.
neither pickling/dill helped or even save the tf2 model itself.
the generation can take some time and in order to use it as an online feature I have to find a workaround.

from what I've got so far, I cant pickle/dill the object because its using TF infra (which has parts written in C), and I can save the generated model (analyzer_obj._analyzer_model) because the eager execution is disabled (apparently its important..)

anything you guys can contribute from your experience?

P.S
the only solution I see is to use full on TF2 and remove the line (tf.compat.v1.disable_eager_execution()) and use tf.GradientTape.
I tried to do it but it has issues with the session that add difficulty to this.

Thanks !!)
Shai

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant