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

num_rollouts #24

Closed
msaebi opened this issue Apr 11, 2019 · 2 comments
Closed

num_rollouts #24

msaebi opened this issue Apr 11, 2019 · 2 comments

Comments

@msaebi
Copy link

msaebi commented Apr 11, 2019

Hi,
I'm getting the following error:

File ".../grapher.py", line 65, in return_next_actions if entities[j] in all_correct_answers[i/rollouts] and entities[j] != correct_e2: TypeError: list indices must be integers or slices, not float

This function is called in environment.py:

next_actions = self.grapher.return_next_actions(self.current_entities, self.start_entities, self.query_relation,self.end_entities, self.all_answers, self.current_hop == self.path_len - 1,self.num_rollouts)

I wonder what the value of num_rollouts should be to prevent i/rollouts to become a float (as far as I see, i is already an integer.

@yifding
Copy link

yifding commented Jul 3, 2019

I met the same issue and it can be fixed by changing the i/rollouts to int(i/rollouts)

@shehzaadzd
Copy link
Owner

@msaebi ; the code was written in Python 2.7. You would need to make a few changes to run in Python 3.

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