[Bugfix] Fix extra whitespace in strings caused by newline (#23272)

Signed-off-by: DarkLight1337 <tlleungac@connect.ust.hk>
This commit is contained in:
Cyrus Leung
2025-08-20 22:03:00 -07:00
committed by GitHub
parent f571ff8eb6
commit 0c31e28e95
7 changed files with 30 additions and 27 deletions
+6 -5
View File
@@ -98,14 +98,15 @@ class TPUModelLoader(DefaultModelLoader):
# Check parameters
for name, param in model.named_parameters():
assert param.device.type == device_type, f"Parameter {name} is on \
{param.device.type} instead of {device_type}"
assert param.device.type == device_type, (
f"Parameter {name} is on {param.device.type} "
f"instead of {device_type}")
# Check buffers
for name, buffer in model.named_buffers():
assert buffer.device.type == device_type, \
f"Buffer {name} is on {buffer.device.type} instead of \
{device_type}"
assert buffer.device.type == device_type, (
f"Buffer {name} is on {buffer.device.type} "
f"instead of {device_type}")
for module in model.modules():
if (mesh is not None) and (get_fqn(module) == 'QKVParallelLinear'):