Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prioritized replay index out-of-range #45

Closed
mryellow opened this issue Jul 22, 2017 · 3 comments
Closed

Prioritized replay index out-of-range #45

mryellow opened this issue Jul 22, 2017 · 3 comments
Assignees

Comments

@mryellow
Copy link
Contributor

Traceback (most recent call last):
  File "examples/openai_gym.py", line 121, in <module>
    main()
  File "examples/openai_gym.py", line 112, in main
    runner.run(args.episodes, args.max_timesteps, episode_finished=episode_finished)
  File "/home/yellow/work/tf/tensorforce/tensorforce/execution/runner.py", line 144, in run
    self.agent.observe(reward=reward, terminal=terminal)
  File "/home/yellow/work/tf/tensorforce/tensorforce/agents/dqn_agent.py", line 94, in observe
    super(DQNAgent, self).observe(reward=reward, terminal=terminal)
  File "/home/yellow/work/tf/tensorforce/tensorforce/agents/memory_agent.py", line 84, in observe
    internal=self.current_internal
  File "/home/yellow/work/tf/tensorforce/tensorforce/core/memories/prioritized_replay.py", line 55, in add_observation
    priority, _ = self.observations.pop(self.positive_priority_index)
IndexError: pop index out of range
@mryellow
Copy link
Contributor Author

print(len(self.observations), self.positive_priority_index)

10000 -10001

@michaelschaarschmidt
Copy link
Contributor

thanks for bringing it up, will fix this weekend!

@AlexKuhnle
Copy link
Member

It should be fixed now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants