a622cade81f2a17af5ba5798c9316ea2a78388f6,parlai/mturk/core/agents.py,MTurkManager,send_new_message,#MTurkManager#Any#Any#Any#Any#Any#Any#,146
Before Change
if reward:
post_data_dict["reward"] = reward
request = requests.post(self.json_api_endpoint_url, data=json.dumps(post_data_dict) )
try:
ret = json.loads(request.json())
return ret
After Change
def send_new_message(self, task_group_id, conversation_id, agent_id, message_text=None, reward=None, episode_done=False):
with self.unsent_messages_lock:
self.unsent_messages.append({
"task_group_id": task_group_id,
"conversation_id": conversation_id,
"text": message_text,
"id": agent_id,
"reward": reward,
"episode_done": episode_done,
})
def send_new_messages_in_bulk(self):
with self.unsent_messages_lock:
post_data_dict = {
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 3
Instances Project Name: facebookresearch/ParlAI
Commit Name: a622cade81f2a17af5ba5798c9316ea2a78388f6
Time: 2017-07-07
Author: willfeng@fb.com
File Name: parlai/mturk/core/agents.py
Class Name: MTurkManager
Method Name: send_new_message
Project Name: zake7749/PTT-Chat-Generator
Commit Name: fe87da76b6b7e54e766ac238f4b5b46d2f578493
Time: 2016-10-20
Author: zake7749@gmail.com
File Name: filter.py
Class Name: ArticleFilter
Method Name: load_processed_corpus
Project Name: zake7749/PTT-Chat-Generator
Commit Name: fe87da76b6b7e54e766ac238f4b5b46d2f578493
Time: 2016-10-20
Author: zake7749@gmail.com
File Name: filter.py
Class Name: ArticleFilter
Method Name: generate_corpus