LLNL / MuyGPyS

A fast, pure python implementation of the MuyGPs Gaussian process realization and training algorithm.
Other
23 stars 11 forks source link

Need to move all fast kernel interpolation tests into their own file(s) #81

Closed bwpriest closed 1 year ago

bwpriest commented 1 year ago

For the foreseeable future the fast kernel interpolation workflow will not support MPI. However, relevant functions such as MuyGPyS.gp.distance.make_fast_regress_tensors and MuyGPyS.gp.muygps.MuyGPS.fast_regress are tested in the same files as other core functions that do support MPI. This means that those files cannot be tested in MPI mode without throwing errors. Accordingly, we need to move all of these functions into their own test scripts so that the in-dept versionwise CI can function properly.

alecmdunton commented 1 year ago

In terms of organization does this mean we want new files in the backend directory? I created a fast_regressor test script in the tests/ directory one level higher.

bwpriest commented 1 year ago

I don't think that those tests should go in tests/backend/, but it makes sense that they also should not go in the root tests/ if there is more than one file directory since they are backend dependent. I think we should create an additional directory tests/precompute/ (or tests/fast_regress/ or whatever you think is best). We'll also want to move tests/api/fast_regress.py in there.

I believe that we will want to do the same with a tests/torch/ directory, once you write the tests for MuyGPyS.torch. We'll want to move tests/api/torch.py in there as well. Once we have mpi-only features we'll do the same for them.

It might also be a good idea to drop READMEs into those directories that make clear that the contained tests can only be run using certain backends. That will help people who aren't us understand how the testing harness works.

alecmdunton commented 1 year ago

Just to clarify - I should pull out the fast regression rests from torch_correctness and jax_correctness and host them in a different directory, but still test the functions for the individual backends?

bwpriest commented 1 year ago

oh sorry, I must have misunderstood your questions. You can leave tests/backend/ alone. I was talking about relocating the fast_regress tests in tests/gp.py and tests/multivariate.py into their own file in tests/fast_regress/, and moving tests/api/fast_regress.py into tests/fast_regress/. Similarly, we need new tests of MuyGPyS.torch in a file in tests/torch/, and also to relocate tests/api/torch.py into that directory as well.

bwpriest commented 1 year ago

The tests in tests/backend/ are only ever intended to be run in their respective backends active. That's why I'm not asking to move the fast_regress stuff out of them. This doesn't actually make a difference for most of the them at the moment aside from tests/backend/mpi_correctness.py, which has to be run using mpirun or similar.

alecmdunton commented 1 year ago

Thanks for letting me know! The organizational changes have been added. Currently working on adding more low-level torch API tests on synthetic data.