Skip to content

Commit

Permalink
fix: rename "original text" to "biased_text" in debias_info DataFrame
Browse files Browse the repository at this point in the history
  • Loading branch information
chakravarthik27 committed Jan 17, 2025
1 parent 47d5bf7 commit c9dbc5e
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions langtest/augmentation/debias.py
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ def __init__(
self.debias_info = pd.DataFrame(
columns=[
"row",
"original text",
"biased_text",
"reason",
"category",
"sub_category",
Expand All @@ -169,7 +169,7 @@ def initialize(
self.debias_info = pd.DataFrame(
columns=[
"row",
"original text",
"biased_text",
"reason",
"category",
"sub_category",
Expand All @@ -185,14 +185,14 @@ def identify_bias(self):
if index not in self.debias_info["row"].values:
self.debias_info.loc[len(self.debias_info)] = {
"row": index,
"original text": text,
"biased_text": text,
"reason": rationale,
"category": category,
"sub_category": sub_category,
"steps": steps,
}
else:
self.debias_info.loc[row["row"], "original text"] = text
self.debias_info.loc[row["row"], "biased_text"] = text
self.debias_info.loc[row["row"], "reason"] = rationale
self.debias_info.loc[row["row"], "category"] = category
self.debias_info.loc[row["row"], "sub_category"] = sub_category
Expand Down

0 comments on commit c9dbc5e

Please sign in to comment.