Skip to content

Commit 712eb7e

Browse files
author
Flax Team
committed
Improve error message with class name.
PiperOrigin-RevId: 804790020
1 parent f4bc868 commit 712eb7e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

flax/nnx/bridge/wrappers.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -226,7 +226,7 @@ def _get_module_method(module, method: tp.Callable[..., Any] | str | None):
226226
if not callable(method):
227227
class_name = type(module).__name__
228228
raise TypeError(
229-
f"'{method}' must be a callable, got {type(method)}."
229+
f"'{class_name}.{method}' must be a callable, got {type(method)}."
230230
)
231231

232232
return method

0 commit comments

Comments
 (0)