Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -113,8 +113,12 @@ def save_fsdp_optimizer(
(model_state_dict, optimizer_state_dict) = get_state_dict(model, optimizer)

# filter out lora state dict
# TODO: Once expert layers are supported for LoRA tuning
# remove the "router" filtering
lora_state_dict = {
k: v for k, v in model_state_dict.items() if "lora_A" in k or "lora_B" in k
k: v
for k, v in model_state_dict.items()
if ("lora_A" in k or "lora_B" in k) and "router" not in k
}

# - save model
Expand Down
1 change: 1 addition & 0 deletions plugins/accelerated-moe/tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ envlist = py, lint
[testenv]
deps =
pytest>=7
importlib-metadata
Copy link
Collaborator

@anhuong anhuong Apr 30, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Noting this change: Error coming from linting failing to import from torch

.tox/py/lib/python3.9/site-packages/torch/distributed/elastic/rendezvous/__init__.py:142: in <module>
    from .registry import _register_default_handlers, _register_out_of_tree_handlers
.tox/py/lib/python3.9/site-packages/torch/distributed/elastic/rendezvous/registry.py:19: in <module>
    from importlib_metadata import entry_points
E   ModuleNotFoundError: No module named 'importlib_metadata'

Which looks like something that was added 7 months ago - https://github.com/pytorch/pytorch/blame/main/torch/distributed/elastic/rendezvous/registry.py#L18

So not sure why this is coming up as a new error when it didn't fail previously. But this should not affect the image build since we run on python 3.12 and this import only happens on python < 3.10.

-e {toxinidir}
skip_install = true
commands =
Expand Down