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

"TypeError: 'range' object cannot be interpreted as an integer" when attempting to use the __call__() method of IRLTrainer #159

Open
peteris-racinskis opened this issue Apr 7, 2022 · 0 comments

Comments

@peteris-racinskis
Copy link

Caused by a duplicate range() call in experiments/irl_trainer.py.

On line 71:
self._random_range = range(expert_obs.shape[0])

Then on line 150:
indices = random.sample(range(self._random_range), self._irl.batch_size)

Removing this duplicate call resolved the issue for me. As far as I can tell this looks like a bug, as line 150 is the only reference to _random_range.

@peteris-racinskis peteris-racinskis changed the title TypeError: 'range' object cannot be interpreted as an integer when attempting to use the __call__() method of IRLTrainer "TypeError: 'range' object cannot be interpreted as an integer" when attempting to use the __call__() method of IRLTrainer Apr 7, 2022
ymd-h added a commit to ymd-h/tf2rl that referenced this issue Apr 7, 2022
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

1 participant