W3cubDocs

/TensorFlow 2.3

tf.compat.v1.flags.mark_flags_as_required

Ensures that flags are not None during program execution.

if name == 'main': flags.mark_flags_as_required(['flag1', 'flag2', 'flag3']) app.run()

Args
flag_names Sequence[str], names of the flags.
flag_values flags.FlagValues, optional FlagValues instance where the flags are defined.
Raises
AttributeError If any of flag name has not already been defined as a flag.

© 2020 The TensorFlow Authors. All rights reserved.
Licensed under the Creative Commons Attribution License 3.0.
Code samples licensed under the Apache 2.0 License.
https://www.tensorflow.org/versions/r2.3/api_docs/python/tf/compat/v1/flags/mark_flags_as_required