0

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", 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?

2
  • How are we supposed to answer your question without seeing the code? Commented May 11, 2022 at 22:49
  • @DYZ I think the answer to your question is very simple. I put a link to the repository in my question and then I posted which script I ran. Commented May 12, 2022 at 0:05

1 Answer 1

1

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:

  1. 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.
  2. Fork RGP and re-implement the logic with current libraries. This will likely involve significant coding and may not even be possible at all.
  3. Try to find a different library that implements RGPs.
Sign up to request clarification or add additional context in comments.

2 Comments

thank you for your answer. Unfortunately this repo is the only implementation and I want to use this code. I will appreciate if you could suggest how this line should be implemented in the new version of pytorch since they used it multiple times in this library (here).
@Dalek you could try to remove the parameter names, i.e. variables= and grad_variables=. The meanings of these options have slightly evolved but I'm not sure the data types are still compatible.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.