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

PyTest 8.2.0 in compatible with certain versions of pytorch, especially DDP tests #12273

Open
nWEIdia opened this issue Apr 29, 2024 · 1 comment
Labels
plugin: unittest related to the unittest integration builtin plugin type: regression indicates a problem that was introduced in a release which was working previously

Comments

@nWEIdia
Copy link

nWEIdia commented Apr 29, 2024

_ ERROR collecting test/distributed/_composable/fsdp/test_fully_shard_comm.py __
Traceback (most recent call last):
File "/usr/local/lib/python3.10/dist-packages/_pytest/runner.py", line 341, in from_call
result: Optional[TResult] = func()
File "/usr/local/lib/python3.10/dist-packages/_pytest/runner.py", line 389, in collect
return list(collector.collect())
File "/usr/local/lib/python3.10/dist-packages/_pytest/unittest.py", line 90, in collect
self.session._fixturemanager.parsefactories(self.newinstance(), self.nodeid)
File "/usr/local/lib/python3.10/dist-packages/_pytest/unittest.py", line 75, in newinstance
return self.obj("runTest")
File "/usr/local/lib/python3.10/dist-packages/torch/testing/_internal/common_distributed.py", line 553, in init
fn = getattr(self, method_name)
AttributeError: 'FSDPTest' object has no attribute 'runTest'. Did you mean: 'run_test'?

We encountered this error with pytest 8.2.0.
Not sure if latest pytorch TOT fixed this issue.

@bluetech
Copy link
Member

Looks like a similar problem to #12263, as seen here: https://github.com/pytorch/pytorch/blob/f1d1e3246f3203a4c9641fcda28b0ed66eb8f4d4/torch/testing/_internal/common_distributed.py#L547

The fix in pytorch would be similar to the one shown here for tornado: tornadoweb/tornado#3374

@Zac-HD Zac-HD added type: regression indicates a problem that was introduced in a release which was working previously plugin: unittest related to the unittest integration builtin plugin labels May 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
plugin: unittest related to the unittest integration builtin plugin type: regression indicates a problem that was introduced in a release which was working previously
Projects
None yet
Development

No branches or pull requests

3 participants