"tests/vscode:/vscode.git/clone" did not exist on "2e2dd861f309f64bafbb4e3d0126e953f2ed4d18"
Commit ff2a881b authored by Hongkun Yu's avatar Hongkun Yu Committed by A. Unique TensorFlower
Browse files

Update error messages of registry to make the instruction more clear.

PiperOrigin-RevId: 389025611
parent 08189186
......@@ -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]
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