Skip to content

Commit 604fc55

Browse files
committed
Fixed CI/CD for other packages
Signed-off-by: romit <romit@ibm.com>
1 parent 334a0b7 commit 604fc55

5 files changed

Lines changed: 7 additions & 11 deletions

File tree

plugins/accelerated-moe/src/fms_acceleration_moe/utils/checkpoint_utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ def save_fsdp_optimizer(
113113
)
114114
sd_options = _prepare_sd_options(fsdp_plugin)
115115
# get the state dicts for model and optimize
116-
(model_state_dict, optimizer_state_dict) = get_state_dict(
116+
model_state_dict, optimizer_state_dict = get_state_dict(
117117
model, optimizer, options=sd_options
118118
)
119119

plugins/accelerated-moe/src/fms_acceleration_moe/utils/scattermoe.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -389,7 +389,7 @@ def _maybe_scatter(
389389

390390
# expect these products to be produced by an earlier
391391
# all-to-all gather call
392-
(send_counts, recv_counts, bins, sorted_expert_idxs, sorted_scattered_idxs) = (
392+
send_counts, recv_counts, bins, sorted_expert_idxs, sorted_scattered_idxs = (
393393
gather_products
394394
)
395395

@@ -421,7 +421,7 @@ def forward(self, hidden_states: torch.Tensor):
421421
# compute the routing logits, weights, and expert assigments
422422
# - router_logits: will be passed out of forward, used for computing
423423
# routing loss.
424-
(router_logits, routing_weights, selected_experts) = (
424+
router_logits, routing_weights, selected_experts = (
425425
self._compute_routing_weights(hidden_states)
426426
)
427427

plugins/accelerated-moe/src/fms_acceleration_moe/utils/scattermoe_state_dict.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,7 @@ def _maybe_reshape_scattermoe_expert_weights(
188188
num_experts: int,
189189
intermediate_size: int,
190190
):
191-
(_is_w1, _is_w2, _is_w3) = [
191+
_is_w1, _is_w2, _is_w3 = [
192192
f"{x}.weight" in scatter_key for x in PARAM_NAME_WEIGHT_SCATTERMOE
193193
]
194194

plugins/accelerated-peft/src/fms_acceleration_peft/gptqmodel/utils/peft.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -163,10 +163,8 @@ def get_gptq_peft_model(
163163
model.model, model_id, adapter_name
164164
)
165165
except Exception as exc:
166-
raise NotImplementedError(
167-
f"{model.__class__.__name__} not support \
168-
{peft_config.peft_type.value} peft type yet."
169-
) from exc
166+
raise NotImplementedError(f"{model.__class__.__name__} not support \
167+
{peft_config.peft_type.value} peft type yet.") from exc
170168

171169
return peft_model
172170

plugins/accelerated-peft/tests/test_gptqmodel.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -297,7 +297,5 @@ def test_quantizing_pretrained_model_outputs_match(
297297
target = torch.nn.functional.softmax(original_logits, dim=-1)
298298
target = target.view(BS * SEQLEN, -1)
299299
error = loss_fn(input, target)
300-
assert error.lt(
301-
LOSS_TOLERANCE
302-
), "Model logits don't match between both libraries \
300+
assert error.lt(LOSS_TOLERANCE), "Model logits don't match between both libraries \
303301
after quantization"

0 commit comments

Comments
 (0)