Skip to content

Use class to organize distributed tests in modules#3069

Merged
vfdev-5 merged 1 commit intopytorch:masterfrom
sadra-barikbin:Improvement-use-distributed-fixture-as-class-scoped-fixture
Sep 24, 2023
Merged

Use class to organize distributed tests in modules#3069
vfdev-5 merged 1 commit intopytorch:masterfrom
sadra-barikbin:Improvement-use-distributed-fixture-as-class-scoped-fixture

Conversation

@sadra-barikbin
Copy link
Copy Markdown
Collaborator

@sadra-barikbin sadra-barikbin commented Sep 23, 2023

As already suggested by @vfdev-5

Description:

The gola of the PR is to reduce the number of distributed context setup/destroy calls.

We can either use distributed fixture per method or write a class like in the PR

For simple test metthods with distributed fixture, they are instantiated once per method then. It falls back to scope=function for those test items.

@github-actions github-actions bot added the module: engine Engine module label Sep 23, 2023
Copy link
Copy Markdown
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.

Thanks @sadra-barikbin , LGTM

@vfdev-5 vfdev-5 merged commit ea7cb1d into pytorch:master Sep 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

module: engine Engine module

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants