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

Remove global counters in tests #5661

Merged
merged 11 commits into from Oct 18, 2023

Conversation

justinchuby
Copy link
Contributor

@justinchuby justinchuby commented Oct 11, 2023

Remove global counters in tests from reference_evaluator_backend_test and automatic_upgrade_test to allow parallel test execution.

Run tests in parallel in CI.

@justinchuby justinchuby requested a review from a team as a code owner October 11, 2023 17:55
Signed-off-by: Justin Chu <justinchu@microsoft.com>
Copy link
Member

@jcwchen jcwchen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess the original test stats will be covered by the new codecov: #5660 instead?

@justinchuby
Copy link
Contributor Author

justinchuby commented Oct 11, 2023

I guess the original test stats will be covered by the new codecov: #5660 instead?

Yep! Even without #5660, we should still remove global states in tests because they make parallelization hard

Signed-off-by: Justin Chu <justinchu@microsoft.com>
Signed-off-by: Justin Chu <justinchu@microsoft.com>
@justinchuby
Copy link
Contributor Author

Need to test the notebooks separately because they are not parallelizable.

@justinchuby
Copy link
Contributor Author

OK we need --dist loadscope

.azure-pipelines/Linux-CI.yml Outdated Show resolved Hide resolved
.azure-pipelines/MacOS-CI.yml Outdated Show resolved Hide resolved
.azure-pipelines/MacOS-CI.yml Outdated Show resolved Hide resolved
.azure-pipelines/Windows-CI.yml Outdated Show resolved Hide resolved
.azure-pipelines/Windows-CI.yml Outdated Show resolved Hide resolved
Signed-off-by: Justin Chu <justinchuby@users.noreply.github.com>
@codecov-commenter
Copy link

codecov-commenter commented Oct 12, 2023

Codecov Report

All modified lines are covered by tests ✅

Files Coverage Δ
...x/test/version_converter/automatic_upgrade_test.py 99.63% <100.00%> (+<0.01%) ⬆️

📢 Thoughts on this report? Let us know!.

@justinchuby
Copy link
Contributor Author

cc @xadupre

@jcwchen jcwchen added the run release CIs Use this label to trigger release tests in CI label Oct 13, 2023
Copy link
Member

@jcwchen jcwchen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for pytest -n auto --dist loadscope, but I am surprise that the CI running time seems similar.

@justinchuby
Copy link
Contributor Author

Thanks for pytest -n auto --dist loadscope, but I am surprise that the CI running time seems similar.

The Python tests don’t take much time so we may not see a big difference. Nevertheless enabling parallel testing allows us to catch undesirable order dependencies or global state dependencies in our tests

Signed-off-by: Justin Chu <justinchuby@users.noreply.github.com>
Signed-off-by: Justin Chu <justinchuby@users.noreply.github.com>
Signed-off-by: Justin Chu <justinchuby@users.noreply.github.com>
Signed-off-by: Justin Chu <justinchuby@users.noreply.github.com>
@justinchuby justinchuby added this pull request to the merge queue Oct 18, 2023
Merged via the queue into onnx:main with commit 59995e5 Oct 18, 2023
47 of 55 checks passed
@justinchuby justinchuby deleted the justinchu/remove-test-globals branch October 18, 2023 22:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
run release CIs Use this label to trigger release tests in CI test
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

None yet

4 participants