File tree Expand file tree Collapse file tree 1 file changed +5
-9
lines changed
tests/llmcompressor/modifiers/transform/smoothquant Expand file tree Collapse file tree 1 file changed +5
-9
lines changed Original file line number Diff line number Diff line change @@ -54,9 +54,7 @@ def test_reduce_activation_scales_noop_single_gpu():
5454 "llmcompressor.modifiers.transform.smoothquant.base.is_distributed" ,
5555 return_value = False ,
5656 ),
57- patch (
58- "llmcompressor.modifiers.transform.smoothquant.base.dist"
59- ) as mock_dist ,
57+ patch ("llmcompressor.modifiers.transform.smoothquant.base.dist" ) as mock_dist ,
6058 ):
6159 modifier ._reduce_activation_scales ()
6260 mock_dist .all_reduce .assert_not_called ()
@@ -88,9 +86,7 @@ def test_reduce_activation_scales_2n_calls_for_n_layers():
8886 "llmcompressor.modifiers.transform.smoothquant.base.is_distributed" ,
8987 return_value = True ,
9088 ),
91- patch (
92- "llmcompressor.modifiers.transform.smoothquant.base.dist"
93- ) as mock_dist ,
89+ patch ("llmcompressor.modifiers.transform.smoothquant.base.dist" ) as mock_dist ,
9490 patch (
9591 "llmcompressor.modifiers.transform.smoothquant.base.wait_for_comms" ,
9692 side_effect = lambda h : collected .extend (h ),
@@ -270,9 +266,9 @@ def test_smoothquant_distributed_weights_match_single_gpu(tmp_path):
270266 text = True ,
271267 cwd = tmp_path ,
272268 )
273- assert r . returncode == 0 , (
274- f"DDP run failed: \n stdout: \n { r . stdout } \n stderr: \n { r . stderr } "
275- )
269+ assert (
270+ r . returncode == 0
271+ ), f"DDP run failed: \n stdout: \n { r . stdout } \n stderr: \n { r . stderr } "
276272
277273 ddp = torch .load (ddp_out , weights_only = True )
278274
You can’t perform that action at this time.
0 commit comments