Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve unit tests #209

Merged
merged 7 commits into from
Jun 29, 2023
Merged

Improve unit tests #209

merged 7 commits into from
Jun 29, 2023

Conversation

mrwyattii
Copy link
Contributor

@mrwyattii mrwyattii commented Jun 28, 2023

As part of an effort to reduce the overall unit test time of DeepSpeed repositories in microsoft/DeepSpeed#3829.

Reduced UT time from ~37m to 25m

  • Refactor unit tests:
    • Move shared fixtures to conftest.py to follow pytest best practices
    • Split tests into multiple files with more descriptive names
  • Consolidate fixtures for deployment types
    • Added a new deployment_type fixture that allows easy switching of the deployment type in the deployment fixture
  • Reduce number of tests being done
    • MII unit tests were initially testing DeepSpeed-inference, however DS-inference has unit tests now on the DeepSpeed repo. This means that we don't need to test all the functionality of DS-inference, just the MII functionality here
  • Add coverage report Adding a coverage report is not straightforward because of how we spawn and terminate subprocesses with MII. Will need to look into this further.
  • Consolidate CPU-only and GPU tests to just run on self-hosted runners (overhead for CPU-only tests was excessive for how short the CPU tests are)
  • Add @pytest.mark.deepspeed for indicating which tests DeepSpeed CI should run

@mrwyattii mrwyattii marked this pull request as ready for review June 28, 2023 22:45
@mrwyattii mrwyattii merged commit ce80314 into main Jun 29, 2023
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.

2 participants