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
Issues pickling/unpickling Flags with dill #61
Comments
I'm not sure it makes sense to pickle FLAGS at all. If you pickle/unpickle |
I can see how pickling/unpickling In this case, Beam is pickling I am biased towards my use case, but I think the first case would be sufficient in most situations. |
So any ideas about how to pickle an independent copy of a global |
My tentative plan here is to make pickling FLAGS an error. You'll be to able to use |
DUP=copy.deepcopy(FLAGS)
print pickle.loads(pickle.dumps(DUP)) throws the same error. Please let me know if I'm wrong. |
I have an internal change (still under review inside Google for now) that will fix deepcopy() and will hopefully make it into public version of abseil-py soon. |
That's awesome! I'm looking forward to that release. I also saw the commit #d08b66 which makes much sense to me. |
d08b66f is the original version of this fix but it broke some internal users so it was rolled back. I don't have an ETA, but it will be coming soon. |
Good to know. Thanks! |
Please ignore my last question. I applied a quick hack which meets my need link . |
This has been merged in 8526d52 Note that you still can't pickle flags, but you do get a useful error message. |
Fantastic, thanks @shoyer. I don't especially mind the inability to pickle since |
File "DeepSpeech.py", line 11, in |
i am using tensorflow 1.14 gpu based kindly help me to resolve this issue |
Could you file a separate issue? This isn't related to pickling/unpickling flags. |
Closing this issue according to rasmi's comment |
but will u still help me with this issue |
I came across this issue when using the
save_main_session
in Apache Beam 2.4.0 with absl.flags (absl-py version 0.2.1).save_main_session
pickles then unpickles the variables in the main session, flags.FLAGS included.The following error is raised:
Example code:
The text was updated successfully, but these errors were encountered: