CUQI-DTU / CUQIpy

https://cuqi-dtu.github.io/CUQIpy/
Apache License 2.0
42 stars 9 forks source link

Reduce the time of testing for the experimental module #413

Closed amal-ghamdi closed 4 months ago

chaozg commented 4 months ago

Top 15 time-consuming tests before and after reducing sample sizes:

(before)===================================================================================== slowest durations =====================================================================================
4.82s call     tests/zexperimental/test_mcmc.py::test_RegularizedLinearRTO_regression_warmup[target5]
2.94s call     tests/zexperimental/test_mcmc.py::test_RegularizedLinearRTO_regression_warmup[target2]
2.67s call     tests/zexperimental/test_mcmc.py::test_NUTS_regression_warmup[target1]
2.52s call     tests/zexperimental/test_mcmc.py::test_RegularizedLinearRTO_regression_sample[target5]
2.48s call     tests/zexperimental/test_mcmc.py::test_NUTS_regression_sample[target1]
2.38s call     tests/zexperimental/test_mcmc.py::test_RegularizedLinearRTO_regression_warmup[target4]
2.08s call     tests/zexperimental/test_mcmc.py::test_RegularizedLinearRTO_regression_warmup[target3]
1.86s call     tests/zexperimental/test_mcmc.py::test_NUTS_regression_warmup[target2]
1.80s call     tests/zexperimental/test_mcmc.py::test_UGLA_regression_warmup[128]
1.67s call     tests/zexperimental/test_mcmc.py::test_RegularizedLinearRTO_regression_sample[target2]
1.59s call     tests/zexperimental/test_mcmc.py::test_UGLA_regression_warmup[64]
1.54s call     tests/zexperimental/test_mcmc.py::test_RegularizedLinearRTO_regression_warmup[target1]
1.47s call     tests/zexperimental/test_mcmc.py::test_CWMH_regression_warmup[target2]
1.29s call     tests/zexperimental/test_mcmc.py::test_RegularizedLinearRTO_regression_warmup[target0]
1.29s call     tests/zexperimental/test_mcmc.py::test_RegularizedLinearRTO_regression_sample[target4]
(after)================================================================================================= slowest durations =================================================================================================
1.31s call     tests/zexperimental/test_mcmc.py::test_NUTS_regression_warmup[target1]
0.95s call     tests/zexperimental/test_mcmc.py::test_RegularizedLinearRTO_regression_warmup[target3]
0.78s call     tests/zexperimental/test_mcmc.py::test_NUTS_regression_sample_tune_first_step_only[target1]
0.56s call     tests/zexperimental/test_mcmc.py::test_RegularizedLinearRTO_regression_warmup[target1]
0.55s call     tests/zexperimental/test_mcmc.py::test_RegularizedLinearRTO_regression_sample[target3]
0.42s call     tests/zexperimental/test_mcmc.py::test_CWMH_regression_warmup[target1]
0.36s call     tests/zexperimental/test_mcmc.py::test_RegularizedLinearRTO_regression_warmup[target2]
0.33s call     tests/zexperimental/test_mcmc.py::test_MH_regression_sample[target0]
0.32s call     tests/zexperimental/test_mcmc.py::test_UGLA_regression_warmup[128]
0.31s call     tests/zexperimental/test_mcmc.py::test_checkpointing[sampler3]
0.28s call     tests/zexperimental/test_mcmc.py::test_RegularizedLinearRTO_regression_sample[target1]
0.27s call     tests/zexperimental/test_mcmc.py::test_checkpointing[sampler2]
0.27s call     tests/zexperimental/test_mcmc.py::test_state_is_fully_updated_after_warmup_step[sampler6]
0.24s call     tests/zexperimental/test_mcmc.py::test_RegularizedLinearRTO_regression_warmup[target0]
0.24s call     tests/zexperimental/test_mcmc.py::test_NUTS_regression_sample_tune_first_step_only[target0]