Skip to content

Trouble running tests: Failed to find precompiled modules #7909

@Flamefire

Description

@Flamefire

I want to test my installation like this:

  • DS_BUILD_<...> pip install <--options...> .
  • cd tests
  • pytest --forked unit/

However this doesn't work because deepspeed inserts the source into the syspath:

git_repo_path = abspath(dirname(dirname(__file__)))
sys.path.insert(1, git_repo_path)

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/

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions