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

Speed up test_sorting_s3_nwb_zarr #2767

Merged
merged 3 commits into from
Apr 29, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -290,7 +290,14 @@ def test_sorting_s3_nwb_zarr(tmp_path):

# test to/from dict
sorting_loaded = load_extractor(sorting.to_dict())
check_sortings_equal(sorting, sorting_loaded)

# just take 3 random units to test
rng = np.random.default_rng(seed=2205)
Copy link
Member

Choose a reason for hiding this comment

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

This seed is my brithday :)
You can put your own one if you want!

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I'll celebrate your birthday every time I do a randomised test ;)

three_unit_ids = rng.choice(sorting.unit_ids, size=3)
sorting_sub = sorting.select_units(unit_ids=three_unit_ids)
sorting_loaded_sub = sorting_loaded.select_units(unit_ids=three_unit_ids)

check_sortings_equal(sorting_sub, sorting_loaded_sub)


if __name__ == "__main__":
Expand Down
Loading