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

Add public anndata test files #42

Merged
merged 12 commits into from
Mar 29, 2023
Merged

Add public anndata test files #42

merged 12 commits into from
Mar 29, 2023

Conversation

ordabayevy
Copy link
Contributor

Closes #22.

@ordabayevy ordabayevy added the WIP label Mar 21, 2023
def test_cpu_multi_device(example):
devices = os.environ.get("TEST_DEVICES", "1")
example += f" --devices {devices}"
def test_cpu(example):
Copy link
Contributor Author

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).

Copy link
Member

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).

Copy link
Contributor Author

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",
Copy link
Contributor Author

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):
Copy link
Member

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).

@ordabayevy
Copy link
Contributor Author

I created a new issue #44 and merge this PR for now.

@ordabayevy ordabayevy merged commit a32de7b into main Mar 29, 2023
@ordabayevy ordabayevy deleted the test-data branch March 29, 2023 15:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Create public test anndata
2 participants