Skip to content

Commit

Permalink
remove time leakage columns
Browse files Browse the repository at this point in the history
  • Loading branch information
kexinhuang12345 committed Jan 29, 2024
1 parent d5fb98a commit a3f07d0
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion relbench/datasets/stackex.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ def make_db(self) -> Database:
columns=["Reputation", "Views", "UpVotes", "DownVotes", "LastAccessDate"],
inplace=True,
)

posts.drop(
columns=[
"ViewCount",
Expand All @@ -58,6 +59,9 @@ def make_db(self) -> Database:
"LastEditDate",
"LastActivityDate",
"Score",
"LastEditorDisplayName",
"LastEditorUserId",
"AcceptedAnswerId"
],
inplace=True,
)
Expand Down Expand Up @@ -131,7 +135,6 @@ def make_db(self) -> Database:
df=pd.DataFrame(posts),
fkey_col_to_pkey_table={
"OwnerUserId": "users",
"LastEditorUserId": "users",
"ParentId": "posts", # notice the self-reference
},
pkey_col="Id",
Expand Down

0 comments on commit a3f07d0

Please sign in to comment.