Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ModelZoo
ResNet50_tensorflow
Commits
7e3d5270
Commit
7e3d5270
authored
Mar 09, 2021
by
Hongkun Yu
Committed by
A. Unique TensorFlower
Mar 09, 2021
Browse files
Make gin flags optional through try/except
PiperOrigin-RevId: 361951657
parent
d5d087ba
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
6 deletions
+14
-6
official/common/flags.py
official/common/flags.py
+14
-6
No files found.
official/common/flags.py
View file @
7e3d5270
...
@@ -61,13 +61,21 @@ def define_flags():
...
@@ -61,13 +61,21 @@ def define_flags():
'--> params in params_override. See also the help message of '
'--> params in params_override. See also the help message of '
'`--config_file`.'
)
'`--config_file`.'
)
flags
.
DEFINE_multi_string
(
# The libraries rely on gin often make mistakes that include flags inside
'gin_file'
,
default
=
None
,
help
=
'List of paths to the config files.'
)
# 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
(
try
:
'gin_params'
,
flags
.
DEFINE_multi_string
(
default
=
None
,
'gin_params'
,
help
=
'Newline separated list of Gin parameter bindings.'
)
default
=
None
,
help
=
'Newline separated list of Gin parameter bindings.'
)
except
flags
.
DuplicateFlagError
:
pass
flags
.
DEFINE_string
(
flags
.
DEFINE_string
(
'tpu'
,
default
=
None
,
'tpu'
,
default
=
None
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment