Skip to content

Commit

Permalink
explicitly return observe
Browse files Browse the repository at this point in the history
  • Loading branch information
ajfisch committed May 10, 2017
1 parent 3190b97 commit 6812f3f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions parlai/agents/drqa/agents.py
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,7 @@ def observe(self, observation):
observation['text'] = '\n'.join(dialogue)
self.observation = observation
self.episode_done = observation['episode_done']
return self.observation

def act(self):
"""Update or predict on a single example (batchsize = 1)."""
Expand Down
4 changes: 2 additions & 2 deletions parlai/core/worlds.py
Original file line number Diff line number Diff line change
Expand Up @@ -460,8 +460,8 @@ def batch_observe(self, index, batch_actions):
batch_observations = []
for i, w in enumerate(self.worlds):
agents = w.get_agents()
agents[index].observe(validate(batch_actions[i]))
batch_observations.append(agents[index].observation)
observation = agents[index].observe(validate(batch_actions[i]))
batch_observations.append(observation)
return batch_observations

def batch_act(self, index, batch_observation):
Expand Down

0 comments on commit 6812f3f

Please sign in to comment.