Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@leej3
Copy link
Contributor

@leej3 leej3 commented Apr 26, 2024

Description:
Uses xdist loadgroups to improve performance of tests when running them on multiple workers. Setting --dist=loadgroups when calling pytest should now send all tests with the "distributed" mark to the same worker. This helps to avoids some of the errors where tests are trying to use the resources made available by the distributed fixture. A similar solution is now implemented for tests using the visdom_server fixture.

Also avoids the warnings for unregistered pytest marks and fixes some stray mypy failures.

leej3 added 5 commits April 26, 2024 16:20
fixes error when running tests using pytest -n >1
this fixes the with of the test time progress bars to avoid
some failures in tests.
Tests from a loadgroup are all run sequentially on a single worker.
seems to miss marks in the conftest.py file itself though.
limit setup/teardown of visdom servers using a session
scoped fixture. Add visdom tests to an xdist group to run
them serially to avoid issues with server connection.

add timeout to the tests explicitly requesting the server
to further limit any future issues.
@leej3 leej3 requested a review from vfdev-5 April 26, 2024 16:58
@github-actions github-actions bot added the module: metrics Metrics module label Apr 26, 2024
leej3 added 6 commits April 29, 2024 09:53
Do not clean up visdom_server fixture. Session scoped fixtures are not
guaranteed to be executed just once when using xdist and trying to
cleanup twice can cause hangs.
Timeout all visdom tests to avoid future issues with a hanging/dead server
Copy link
Collaborator

@vfdev-5 vfdev-5 left a comment

Choose a reason for hiding this comment

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

Looks good, thanks John!

@leej3 leej3 merged commit 3f5febf into pytorch:master Apr 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

module: metrics Metrics module

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants