deepspeedai / deepspeedai/DeepSpeed
Trouble running tests: Failed to find precompiled modules
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 43.1k
- Forks
- 5k
- Avg merge
- 4d 15h
- Merged PRs (30d)
- 112
Description
I want to test my installation like this:
DS_BUILD_<...> pip install <--options...> .cd testspytest --forked unit/
However this doesn't work because deepspeed inserts the source into the syspath: https://github.com/deepspeedai/DeepSpeed/blob/5f7b687018bd1e0340c661859820fd97aa80a616/tests/conftest.py#L20-L21
Consequently it fails to find the installed ops.
Given the recent discovery of issues with (pre)compiled ops I think this should be changed. If someone really wants to test the source without precompiled ops they can modify PYTHONPATH or not install deepspeed and run from the source directory as pytest tests/unit/
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with tests/conftest.py at lines 20-21 and inspect how the source directory is inserted into sys.path. Install DeepSpeed with the DS_BUILD options, then run pytest --forked unit/ from tests; done means the tests load the installed package and can find its precompiled ops.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- testing-qa
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Active
- Clarity
- Clearly specified
- Newbie friendliness
- 74/100