@@ -628,7 +628,8 @@ async def test_checkpoint_meta_stores_a_digest_not_the_credential(service):
628628 assert (info ["train_attn" ], info ["train_mlp" ], info ["train_unembed" ]) == (True , True , False )
629629
630630
631- async def test_a_checkpoint_saved_under_other_settings_does_not_load (service ):
631+ @pytest .mark .parametrize ("field,value" , [("lora_alpha" , 99 ), ("experts_shared_outer_loras" , True )])
632+ async def test_a_checkpoint_saved_under_other_settings_does_not_load (service , field , value ):
632633 import json
633634 import os
634635
@@ -641,14 +642,14 @@ async def test_a_checkpoint_saved_under_other_settings_does_not_load(service):
641642 resolve_checkpoint_dir (service .config .checkpoint_root , model_id , "weights" , "ck" ), "META.json"
642643 )
643644 meta = json .loads (open (meta_path ).read ())
644- meta ["lora_alpha" ] = meta [ "lora_alpha" ] + 1 # the same tensors would be scaled differently
645+ meta [field ] = value
645646 open (meta_path , "w" ).write (json .dumps (meta ))
646647
647648 loaded = service .submit (
648649 "tenant" , "load_state" , {"model_id" : model_id , "seq_id" : 2 , "path" : path , "optimizer" : True }
649650 )
650651 future = await await_settled (service , "tenant" , loaded )
651- assert (future .state , future .error_category ) == (FAILED , "user" ) and "lora_alpha" in future .error
652+ assert (future .state , future .error_category ) == (FAILED , "user" ) and field in future .error
652653 assert not service .backend .named ("load_slot" )[1 :], "nothing may touch the slot on a mismatch"
653654
654655
0 commit comments