absl flags API raise error, UnrecognizedFlagError: Unknown command line flag 'f'
See original GitHub issue- Describe the current behavior:
import sys
from absl import flags
flags.FLAGS(sys.argv)
throws UnrecognizedFlagError: Unknown command line flag 'f'
because the iPython call uses the -f
flag. This causes a bug in TensorFlow, see https://github.com/tensorflow/tensorflow/issues/40280.
- Describe the expected behavior:
It should not be necessary to write special code for Colab. Hence, Colab should not expose the -f
flag to sys.argv
.
- Link (not screenshot!) to a minimal, public, self-contained notebook that reproduces this issue (click the Share button, then Get Shareable Link):
Issue Analytics
- State:
- Created 3 years ago
- Comments:7 (2 by maintainers)
Top Results From Across the Web
python - how to run a tf.test.TestCase from jupyter notebook
it seems that when you run with notebook, there is an argument to the command that "Stays" when you run tf.test.main().
Read more >Flags - Abseil
If the command-line value is not in this list, it raises a flag error; otherwise, it assigns to FLAGS.flag as a string. DEFINE_list...
Read more >tf.compat.v1.flags.FlagValues | TensorFlow v2.11.0
Raised on any parsing error. TypeError, Raised on passing wrong type of arguments. ValueError, Raised on flag value parsing error.
Read more >unknown flags in tf_xla_flags: --tf_xla_enable_xla_devices
How to ressolve the error: Not creating XLA devices- tensorflow? ... tensorflow/tensorflowUnrecognizedFlagError: Unknown command line flag 'f'#17702.
Read more >UnrecognizedFlagError: Unknown command line flag 'eval_flow'
Hello, I am getting this error while trying to run this part of the code. def main(unused_argv): if FLAGS.trace == “”: raise ......
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
You can get around this by putting this cell before the offending call in your notebook:
Source: https://github.com/google-research/bleurt/issues/4#issuecomment-635118502
Error message: FATAL Flags parsing error: Unknown command line flag ‘f’ Pass --helpshort or --helpfull to see help on flags.
An exception has occurred, use %tb to see the full traceback.
SystemExit: 1