@@ -676,7 +676,8 @@ async def test_checkpoint_meta_stores_a_digest_not_the_credential(service):
676676 assert (info ["train_attn" ], info ["train_mlp" ], info ["train_unembed" ]) == (True , True , False )
677677
678678
679- async def test_a_checkpoint_saved_under_other_settings_does_not_load (service ):
679+ @pytest .mark .parametrize ("field,value" , [("lora_alpha" , 99 ), ("experts_shared_outer_loras" , True )])
680+ async def test_a_checkpoint_saved_under_other_settings_does_not_load (service , field , value ):
680681 import json
681682 import os
682683
@@ -689,14 +690,14 @@ async def test_a_checkpoint_saved_under_other_settings_does_not_load(service):
689690 resolve_checkpoint_dir (service .config .checkpoint_root , model_id , "weights" , "ck" ), "META.json"
690691 )
691692 meta = json .loads (open (meta_path ).read ())
692- meta ["lora_alpha" ] = meta [ "lora_alpha" ] + 1 # the same tensors would be scaled differently
693+ meta [field ] = value
693694 open (meta_path , "w" ).write (json .dumps (meta ))
694695
695696 loaded = service .submit (
696697 "tenant" , "load_state" , {"model_id" : model_id , "seq_id" : 2 , "path" : path , "optimizer" : True }
697698 )
698699 future = await await_settled (service , "tenant" , loaded )
699- assert (future .state , future .error_category ) == (FAILED , "user" ) and "lora_alpha" in future .error
700+ assert (future .state , future .error_category ) == (FAILED , "user" ) and field in future .error
700701 assert not service .backend .named ("load_slot" )[1 :], "nothing may touch the slot on a mismatch"
701702
702703
0 commit comments