Skip to content

Add missing __init__.py to deepspeed/moe/v2opt - #3

Open
konstde00 wants to merge 1 commit into
Supercomputing-System-AI-Lab:masterfrom
konstde00:fix-v2opt-package
Open

konstde00 wants to merge 1 commit into
Supercomputing-System-AI-Lab:masterfrom
konstde00:fix-v2opt-package

Conversation

@konstde00

Copy link
Copy Markdown

The nightly python workflow fails on all five Python versions with ModuleNotFoundError: No module named 'deepspeed.moe.v2opt' when ds_report imports DeepSpeed (for example https://github.com/Supercomputing-System-AI-Lab/X-MoE/actions/runs/40053119642).

deepspeed/moe/v2opt/ has no __init__.py, so find_packages (setup.py:320) skips it and a regular pip install . leaves out the 13 v2opt modules, even though deepspeed/moe/sharded_moe.py:37 imports .v2opt.gating. An editable install (pip install -e ., as in the README) still works because Python finds the directory as a namespace package, which is why this doesn't show up in a development checkout.

This adds the same empty __init__.py that the liheng/GroupedGEMM, ELMoE, X-MoE-4D, zixian/pp_dev and zixian/shared_exp_impl branches already have, so merging those branches later won't conflict.

Tests

On 3.8, 3.9 and 3.10 the job now stops at No module named 'triton', because the v2opt kernels import triton and the gh-builder images for those versions ship torch 1.12.1 without it. cpu-torch-latest installs CPU torch, so it stops at the same import (and would then hit its --torch_ver="2.5" check). I didn't touch these here, since whether to drop old Python versions from CI or guard the triton import is your call.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant