"git@developer.sourcefind.cn:OpenDAS/torch-spline-conv.git" did not exist on "0994ab780b3cd6ef0df14185b5d7ba559f65d00b"
Commit 68dc253e authored by Hongkun Yu's avatar Hongkun Yu Committed by A. Unique TensorFlower
Browse files

Make gin flags optional through try/except

PiperOrigin-RevId: 361951657
parent 64c88b24
......@@ -61,13 +61,21 @@ def define_flags():
'--> params in params_override. See also the help message of '
'`--config_file`.')
flags.DEFINE_multi_string(
'gin_file', default=None, help='List of paths to the config files.')
# The libraries rely on gin often make mistakes that include flags inside
# the library files which causes conflicts.
try:
flags.DEFINE_multi_string(
'gin_file', default=None, help='List of paths to the config files.')
except flags.DuplicateFlagError:
pass
flags.DEFINE_multi_string(
'gin_params',
default=None,
help='Newline separated list of Gin parameter bindings.')
try:
flags.DEFINE_multi_string(
'gin_params',
default=None,
help='Newline separated list of Gin parameter bindings.')
except flags.DuplicateFlagError:
pass
flags.DEFINE_string(
'tpu', default=None,
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment