TypeError: backward() got an unexpected keyword argument 'variables'
I am using the recurrent Gaussian Process library. I believe the code is developed by older versions of python and pytorch. I ran one of the experiments of the model after cloning the repository
python ./testing/rnn_rgp_test.py

I got this error message from this line of the rnn_encoder.py script:
./RGP/autoreg/rnn_encoder.py&quot;, line 274, in backward_computation
    torch.autograd.backward( variables=self.forward_means_list + self.forward_vars_list, 
TypeError: backward() got an unexpected keyword argument 'variables'

I will be grateful if someone can point out how I can fix this error?

Version 0.3.1 of PyTorch seems to be the last version with the variables parameter. Ideally, the RGP library should have documented which version of their dependencies they use but they didn't. Given that their Git repo seems to be inactive, you have several choices:

Use old versions of whatever libraries they require. You will have to go from one error to the next, hoping that things work as intended.
Fork RGP and re-implement the logic with current libraries. This will likely involve significant coding and may not even be possible at all.
Try to find a different library that implements RGPs.

