Skip to content

Commit b772ffc

Browse files
authored
fix RC bug in reddit human experiment (#67)
Thanks very much to lily_wu for finding this problem!
2 parents 220332b + 5714b55 commit b772ffc

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

scripts/reddit_simulation_align_with_human/business_3600.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,5 +23,5 @@ inference:
2323
model_path: /ibex/user/yangz0h/open_source_llm/llama-3
2424
stop_tokens: [<|eot_id|>, <|end_of_text|>]
2525
server_url:
26-
- host: 10.109.1.8
26+
- host: 10.109.1.9
2727
ports: [8002, 8003, 8005]

scripts/reddit_simulation_align_with_human/reddit_simulation_align_with_human.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -162,9 +162,12 @@ async def export_data(i):
162162
if rs_rc_index >= len(pairs):
163163
return
164164
else:
165-
content = pairs[rs_rc_index]["RC_1"]["body"]
165+
title = pairs[rs_rc_index]["RS"]["title"]
166+
content = pairs[rs_rc_index]["RS"]["selftext"]
167+
formatted_content = f"Title: {title}.\nContent: {content}"
168+
166169
response = await post_agent.perform_action_by_data(
167-
"create_post", content=content)
170+
"create_post", content=formatted_content)
168171
post_id = response["post_id"]
169172
for i in range(1, 11):
170173
key_name = f"RC_{i}"

0 commit comments

Comments
 (0)