-
Notifications
You must be signed in to change notification settings - Fork 3
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
Add public anndata test files #42
Conversation
def test_cpu_multi_device(example): | ||
devices = os.environ.get("TEST_DEVICES", "1") | ||
example += f" --devices {devices}" | ||
def test_cpu(example): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Removed _multi_device
because of the error below (with TEST_DEVICES=2
) which I could not get fixed
RuntimeError: The server socket has failed to listen on any local network address. The server socket has failed to bind to [::]:42063 (errno: 98 - Address already in use). The server socket has failed to bind to 0.0.0.0:42063 (errno: 98 - Address already in use).
Strangely this only happens when running all multi device tests (pytest -k multi_device
) but doesn't happen when I run only test_examples
(pytest test/test_examaples.py
).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have a hunch that ddp_spawn
will iron out these issues (though it requires some modifications because the model on the main process will not be updated, as we discussed). Perhaps give it a try, but we can totally live with just testing TEST_DEVICES=2
for the time being (so totally feel free to ignore).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just tried it with ddp_spawn
but still get the same error message. I wonder if it has to do with using check_call([sys.executable, filename] + args)
.
@@ -117,7 +117,6 @@ def test_onepass_mean_var_std_iterable_dataset_multi_device( | |||
accelerator="cpu", | |||
devices=devices, | |||
max_epochs=1, # one pass | |||
strategy="ddp", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ddp
is automatically selected by PyTorch Lightning 2.0
def test_cpu_multi_device(example): | ||
devices = os.environ.get("TEST_DEVICES", "1") | ||
example += f" --devices {devices}" | ||
def test_cpu(example): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have a hunch that ddp_spawn
will iron out these issues (though it requires some modifications because the model on the main process will not be updated, as we discussed). Perhaps give it a try, but we can totally live with just testing TEST_DEVICES=2
for the time being (so totally feel free to ignore).
I created a new issue #44 and merge this PR for now. |
Closes #22.