tf.compat.v1.flags.DuplicateFlagError
Stay organized with collections
Save and categorize content based on your preferences.
Raised if there is a flag naming conflict.
Inherits From: Error
Methods
from_flag
@classmethod
from_flag(
flagname, flag_values, other_flag_values=None
)
Creates a DuplicateFlagError by providing flag name and values.
Args |
flagname
|
str, the name of the flag being redefined.
|
flag_values
|
FlagValues, the FlagValues instance containing the first
definition of flagname.
|
other_flag_values
|
FlagValues, if it is not None, it should be the
FlagValues object where the second definition of flagname occurs.
If it is None, we assume that we're being called when attempting
to create the flag a second time, and we use the module calling
this one as the source of the second definition.
|
Returns |
An instance of DuplicateFlagError.
|
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2020-10-01 UTC.
[null,null,["Last updated 2020-10-01 UTC."],[],[],null,["# tf.compat.v1.flags.DuplicateFlagError\n\n\u003cbr /\u003e\n\nRaised if there is a flag naming conflict.\n\nInherits From: [`Error`](../../../../tf/compat/v1/flags/Error)\n\n#### View aliases\n\n\n**Compat aliases for migration**\n\nSee\n[Migration guide](https://www.tensorflow.org/guide/migrate) for\nmore details.\n\n[`tf.compat.v1.app.flags.DuplicateFlagError`](/api_docs/python/tf/compat/v1/flags/DuplicateFlagError)\n\n\u003cbr /\u003e\n\nMethods\n-------\n\n### `from_flag`\n\n @classmethod\n from_flag(\n flagname, flag_values, other_flag_values=None\n )\n\nCreates a DuplicateFlagError by providing flag name and values.\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n| Args ||\n|---------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `flagname` | str, the name of the flag being redefined. |\n| `flag_values` | FlagValues, the FlagValues instance containing the first definition of flagname. |\n| `other_flag_values` | FlagValues, if it is not None, it should be the FlagValues object where the second definition of flagname occurs. If it is None, we assume that we're being called when attempting to create the flag a second time, and we use the module calling this one as the source of the second definition. |\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n| Returns ||\n|---|---|\n| An instance of DuplicateFlagError. ||\n\n\u003cbr /\u003e"]]