stanfordmlgroup / ngboost

Natural Gradient Boosting for Probabilistic Prediction
Apache License 2.0
1.62k stars 214 forks source link

speed up tests by loading sample once #341

Closed ryan-wolbeck closed 7 months ago

ryan-wolbeck commented 7 months ago

This pull request introduces improvements to our test suite, resulting in a substantial reduction in build and test run times. Previously, our tests took approximately 45 minutes to complete. With the changes implemented in this PR, the test suite now completes in about 15 minutes. This represents a time savings of approximately 67%, a substantial improvement that enhances the efficiency of our development process. The reduced test run time will make it easier and more convenient for developers to run tests before committing code to the repository.

The optimization was achieved by modifying the test setup to sample 1000 records once and pass them to each test. This approach is more efficient and still allows us to thoroughly test our functions.