File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1818 MergedWeightTransferInitInfo ,
1919)
2020from art .megatron .service import MegatronService
21+ from art .megatron .train import _unwrap_art_wrapper_name
2122
2223
2324@pytest .mark .asyncio
@@ -132,6 +133,21 @@ async def fake_create_subprocess_shell(
132133 assert seen ["start_new_session" ] is True
133134
134135
136+ def test_unwrap_art_wrapper_name_strips_compiled_wrapper_segments () -> None :
137+ assert (
138+ _unwrap_art_wrapper_name (
139+ "module.module.decoder.layers.0._orig_mod.self_attention.linear_proj.linear_proj.weight"
140+ )
141+ == "decoder.layers.0.self_attention.linear_proj.weight"
142+ )
143+ assert (
144+ _unwrap_art_wrapper_name (
145+ "module.module.decoder.layers.0._orig_mod.mlp.experts.linear_fc1.linear_fc1.weight7"
146+ )
147+ == "decoder.layers.0.mlp.experts.linear_fc1.weight7"
148+ )
149+
150+
135151@pytest .mark .asyncio
136152async def test_megatron_service_start_openai_server_dedicated_starts_subprocess (
137153 tmp_path : Path ,
You can’t perform that action at this time.
0 commit comments