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

[BUG]: Python testing time doubled by test_equals_only_binpreds.py #1014

Closed
harrism opened this issue Mar 28, 2023 · 2 comments · Fixed by #1051
Closed

[BUG]: Python testing time doubled by test_equals_only_binpreds.py #1014

harrism opened this issue Mar 28, 2023 · 2 comments · Fixed by #1051
Assignees
Labels
bug Something isn't working tests Relating to tests and test automation

Comments

@harrism
Copy link
Member

harrism commented Mar 28, 2023

Version

23.04

On which installation method(s) does this occur?

Docker, Source, Rapids-Compose

Describe the issue

equals-only binpreds pytests doubled cuSpatial's Python testing time (on my machine). Without test_equals_only_binpreds.py: 16.24s. With that file: 33.10s.

It would be nice to keep testing as fast as possible, so if we don't need such large test cases, let's reduce them.

Minimum reproducible example

No response

Relevant log output

No response

Environment details

No response

Other/Misc.

No response

@harrism harrism added bug Something isn't working tests Relating to tests and test automation labels Mar 28, 2023
@thomcom thomcom self-assigned this Mar 28, 2023
@thomcom
Copy link
Contributor

thomcom commented Mar 30, 2023

The main reason that these tests are slow is because they use some length 10000 object arrays, which take a non-trivial amount of time for Shapely to initialize. We have at least two choices:

  1. Just test 100 features instead of 10000
  2. Write gpu-based random feature generators (we have a couple of passes of this already in libcuspatial and cuSpatial) to generate the features instead of Shapely

@harrism
Copy link
Member Author

harrism commented Mar 31, 2023

I think large numbers should be benchmarks, not tests. On the other hand 100 is not very large. My general rule of thumb is "should be large enough to require more than one thread block in the kernels" (I believe this is in our C++ developer guide).

I prefer to do those larger tests in C++ when possible, since it's much faster. Probably not yet possible in the binpreds tests...

For now, I think we should consider both options and see if there's an easy solution that doesn't compromise coverage.

@thomcom thomcom moved this from Todo to In Progress in cuSpatial Apr 7, 2023
@thomcom thomcom moved this from In Progress to Review in cuSpatial Apr 7, 2023
@rapids-bot rapids-bot bot closed this as completed in 0985aef Apr 7, 2023
@github-project-automation github-project-automation bot moved this from Review to Done in cuSpatial Apr 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working tests Relating to tests and test automation
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

2 participants