Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion flax/nnx/filterlib.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ def to_predicate(filter: Filter) -> Predicate:
elif isinstance(filter, (list, tuple)):
return Any(*filter)
else:
raise TypeError(f'Invalid collection filter: {filter:!r}. ')
raise TypeError(f'Invalid collection filter: {filter!r}. ')

def filters_to_predicates(
filters: tp.Sequence[Filter],
Expand Down
4 changes: 2 additions & 2 deletions flax/nnx/variablelib.py
Original file line number Diff line number Diff line change
Expand Up @@ -2292,8 +2292,8 @@ def variable_name_from_type(
name = typ.__name__
if name in VariableTypeCache:
raise ValueError(
'Name {name} is already registered in the registry as {VariableTypeCache[name]}. '
'It cannot be linked with this type {typ}.'
f'Name {name} is already registered in the registry as {VariableTypeCache[name]}. '
f'It cannot be linked with this type {typ}.'
)
register_variable_name(name, typ)
return name
Expand Down
Loading