Skip to content

Improve unit tests - #209

Merged
mrwyattii merged 7 commits into
mainfrom
mrwyattii/refactor-unit-tests
Jun 29, 2023
Merged

mrwyattii merged 7 commits into
mainfrom
mrwyattii/refactor-unit-tests

Conversation

@mrwyattii

@mrwyattii mrwyattii commented Jun 28, 2023 •

Copy link
Copy Markdown
Contributor

As part of an effort to reduce the overall unit test time of DeepSpeed repositories in deepspeedai/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