sbi icon indicating copy to clipboard operation
sbi copied to clipboard

Runtime of some tests could be reduced by reducing num simulations

Open janfb opened this issue 3 years ago • 1 comments

See #413

janfb avatar Jan 05 '22 21:01 janfb

So I ran pytest --durations=0 to determine which tests to prioritise and this was the output: pytest_output.txt

The main two takeaways:

  1. linearGaussian_snle_test.py takes by far the longest (see top 10).
319.54s call     tests/linearGaussian_snle_test.py::test_c2st_multi_round_snl_on_linearGaussian[3]
164.86s call     tests/linearGaussian_snle_test.py::test_c2st_multi_round_snl_on_linearGaussian[1]
156.51s call     tests/linearGaussian_snpe_test.py::test_sample_conditional
136.53s call     tests/inference_with_NaN_simulator_test.py::test_inference_with_nan_simulator[SNLE_A-True-0.05]
120.97s call     tests/abc_test.py::test_smcabc_sass_lra[2-True]
116.58s call     tests/abc_test.py::test_smcabc_kde[cv]
112.93s call     tests/inference_on_device_test.py::test_training_and_mcmc_on_device[cuda:0-cuda:00-cpu-SNLE_A-nsf-slice_np]
112.54s call     tests/abc_test.py::test_smcabc_inference_on_linear_gaussian[gaussian-2]
111.00s call     tests/inference_on_device_test.py::test_training_and_mcmc_on_device[cuda:0-cuda:00-cuda:0-SNLE_A-nsf-slice_np]
110.83s call     tests/abc_test.py::test_smcabc_inference_on_linear_gaussian[uniform-2]
106.27s call     tests/abc_test.py::test_smcabc_inference_on_linear_gaussian[gaussian-1]
  1. test_c2st_sre_variants_on_linearGaussian in linearGaussian_snre_test.py failed on my machine.

jnsbck avatar Jan 25 '22 08:01 jnsbck

fixed through #923 and #924

janfb avatar Jan 30 '24 11:01 janfb