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
ff2a881b
Commit
ff2a881b
authored
Aug 05, 2021
by
Hongkun Yu
Committed by
A. Unique TensorFlower
Aug 05, 2021
Browse files
Update error messages of registry to make the instruction more clear.
PiperOrigin-RevId: 389025611
parent
08189186
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
3 deletions
+7
-3
official/core/registry.py
official/core/registry.py
+7
-3
No files found.
official/core/registry.py
View file @
ff2a881b
...
...
@@ -87,11 +87,15 @@ def lookup(registered_collection, reg_key):
for
h_idx
,
entry_name
in
enumerate
(
hierarchy
):
if
entry_name
not
in
collection
:
raise
LookupError
(
"collection path {} at position {} never registered."
.
format
(
entry_name
,
h_idx
))
f
"collection path
{
entry_name
}
at position
{
h_idx
}
is never "
f
"registered. Please make sure the
{
entry_name
}
and its library is "
"imported and linked to the trainer binary."
)
collection
=
collection
[
entry_name
]
return
collection
else
:
if
reg_key
not
in
registered_collection
:
raise
LookupError
(
"registration key {} never registered."
.
format
(
reg_key
))
raise
LookupError
(
f
"registration key
{
reg_key
}
is never "
f
"registered. Please make sure the
{
reg_key
}
and its library is "
"imported and linked to the trainer binary."
)
return
registered_collection
[
reg_key
]
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