Python 3.6
OS High Sierra
TensorFlow v1.4
As reported here and in this SO question Tensorboard gives the following error when it's ran:
Traceback (most recent call last):
File "/usr/local/bin/tensorboard", line 11, in <module>
sys.exit(main())
File "/usr/local/lib/python3.6/site-packages/tensorboard/main.py", line 39, in main
return program.main(default.get_plugins(),
File "/usr/local/lib/python3.6/site-packages/tensorboard/default.py", line 71, in get_plugins
debugger = debugger_plugin_loader.get_debugger_plugin()
File "/usr/local/lib/python3.6/site-packages/tensorboard/plugins/debugger/debugger_plugin_loader.py", line 46, in get_debugger_plugin
if FLAGS.debugger_data_server_grpc_port is None:
File "/usr/local/lib/python3.6/site-packages/absl/flags/_flagvalues.py", line 509, in __getattr__
raise _exceptions.UnparsedFlagAccessError(error_message)
absl.flags._exceptions.UnparsedFlagAccessError: Trying to access flag --debugger_data_server_grpc_port before flags were parsed.
This should only impact tf-nightly users. Quick fix is pip install --upgrade tb-nightly. Assuming https://github.com/tensorflow/tensorflow/pull/14741 is merged (which causes tf-nightly to depend on tb-nightly [only automated yesterday]), this issue shall be fixed at approximately the witching hour when tf-nightly 20171122 is loosed. Therefore I'm going to tentatively close this issue. If anything should go wrong, please leave a comment and I'll reopen.
Thank you @jart! Nice improvement on the nightly build :)
UnparsedFlagAccessError: Trying to access flag --preserve_unused_tokens before flags were parsed.
Is there any way i can get rid of this error please.
After running this codes below:
print(tokenizer.tokenize(train_InputExamples.iloc[0].text_a))
UnparsedFlagAccessError Traceback (most recent call last)
1 # Tokenised sample of the first training set observation looks like
----> 2 print(tokenizer.tokenize(train_InputExamples.iloc[0].text_a))
/opt/conda/lib/python3.7/site-packages/bert/tokenization.py in tokenize(self, text)
190 def tokenize(self, text):
191 split_tokens = []
--> 192 for token in self.basic_tokenizer.tokenize(text):
193 if preserve_token(token, self.vocab):
194 split_tokens.append(token)
/opt/conda/lib/python3.7/site-packages/bert/tokenization.py in tokenize(self, text)
235 split_tokens = []
236 for token in orig_tokens:
--> 237 if preserve_token(token, self.vocab):
238 split_tokens.append(token)
239 continue
/opt/conda/lib/python3.7/site-packages/bert/tokenization.py in preserve_token(token, vocab)
39 def preserve_token(token, vocab):
40 """Returns True if the token should forgo tokenization and be preserved."""
---> 41 if not FLAGS.preserve_unused_tokens:
42 return False
43 if token not in vocab:
/opt/conda/lib/python3.7/site-packages/absl/flags/_flagvalues.py in __getattr__(self, name)
496 # get too much noise.
497 logging.error(error_message)
--> 498 raise _exceptions.UnparsedFlagAccessError(error_message)
499
500 def __setattr__(self, name, value):
UnparsedFlagAccessError: Trying to access flag --preserve_unused_tokens before flags were parsed.
@Adeyinka-hub thanks for posting the error output. Based on the trace, it looks like the error you are seeing is more related to the 'bert' package than 'tensorboard'.
You may wish to follow https://github.com/google-research/bert/issues/1133, which seems similar to the issue you report.
Most helpful comment
This should only impact
tf-nightlyusers. Quick fix ispip install --upgrade tb-nightly. Assuming https://github.com/tensorflow/tensorflow/pull/14741 is merged (which causestf-nightlyto depend on tb-nightly [only automated yesterday]), this issue shall be fixed at approximately the witching hour when tf-nightly 20171122 is loosed. Therefore I'm going to tentatively close this issue. If anything should go wrong, please leave a comment and I'll reopen.