Custom eval function error with custom RNN model

How severe does this issue affect your experience of using Ray?

  • High: It blocks me to complete my task.

I use custom evaluation function and custom models from the following code:

When I use default model, it can work well without errors.

My feature is the following and I want to get a batch of actions
[[obs1], [obs2], [obs3]]

obs1 is something like [0, 1, 2]

File “”, line 71, in eval
actions, unbatched_states, infos = trainer.get_policy().compute_actions(feature, state = None, full_fetch=False)
File “/home/user/anaconda3/lib/python3.7/site-packages/ray/rllib/policy/”, line 331, in compute_actions
seq_lens, explore, timestep)
File “/home/user/anaconda3/lib/python3.7/site-packages/ray/rllib/utils/”, line 21, in wrapper
return func(self, *a, **k)
File “/home/user/anaconda3/lib/python3.7/site-packages/ray/rllib/policy/”, line 935, in _compute_action_helper
File “/home/user/anaconda3/lib/python3.7/site-packages/ray/rllib/models/”, line 243, in call
res = self.forward(restored, state or , seq_lens)
File “/home/user/anaconda3/lib/python3.7/site-packages/ray/rllib/models/torch/”, line 85, in forward
output, new_state = self.forward_rnn(inputs, state, seq_lens)
File “/home/user/log_ad/ARM-Net/”, line 65, in forward_rnn
x, [torch.unsqueeze(state[0], 0), torch.unsqueeze(state[1], 0)]
IndexError: list index out of range

Any advice for it?