Idea of test is taken from: https://github.com/nrontsis/PILCO/edit/master/tests/
This directory contains test cases for the majority of the PILCO codebase:
- Controller, sin squash and parameter changes
- Multivariate (sparse) GP predictions
- Saturating cost function
- Trajectory rollout computation
- Gradients
Running all test is possible by executing:
pytest pilco/test/test_runner.py
The tests must be run in the RL-project
directory.
It is likely that some gradient test will fail.
PILCO can easily run into numerical issues throughout simple matrix multiplications
which results in the gradient difference being below the HIPS/autograd
default precision of 1-e6
compared to the numerical computation.