Skip to content

Commit 9bcc916

Browse files
authored
fix typos (#3036)
1 parent b509c2b commit 9bcc916

File tree

17 files changed

+20
-20
lines changed

17 files changed

+20
-20
lines changed

backend/export.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -232,7 +232,7 @@ def export_trees(
232232
db,
233233
message_tree_id=tree_id,
234234
deleted=deleted,
235-
synthetic=None, # pass None here (export trees, filtering happend in fetch_tree_ids)
235+
synthetic=None, # pass None here (export trees, filtering happened in fetch_tree_ids)
236236
prompts_only=prompts_only,
237237
lang=None, # pass None, trees were selected based on lang of prompt
238238
review_result=review_result,
@@ -255,7 +255,7 @@ def export_trees(
255255
db,
256256
message_tree_id=tree_id,
257257
deleted=deleted,
258-
synthetic=None, # pass None here (export trees, filtering happend in fetch_tree_ids)
258+
synthetic=None, # pass None here (export trees, filtering happened in fetch_tree_ids)
259259
prompts_only=prompts_only,
260260
lang=None, # pass None here, trees were selected based on lang of prompt
261261
review_result=review_result,

backend/oasst_backend/scheduled_tasks.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ def update_user_streak() -> None:
9494
if lastactitvitydelta.days > 1 or user.streak_days is None:
9595
user.streak_days = 0
9696
user.streak_last_day_date = current_time
97-
# streak_last_day_date has a current timestamp in DB. Idealy should not be NULL.
97+
# streak_last_day_date has a current timestamp in DB. Ideally should not be NULL.
9898
if streak_last_day_date is not None:
9999
streak_delta = current_time - streak_last_day_date
100100
# if user completed tasks on consecutive days then increment the streak days

backend/oasst_backend/utils/language_classification.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ def main(foldername, modelname, num_words):
6060
save_model(clf, langmap, num_words, modelname)
6161
model = load(modelname)
6262
print(
63-
"running infernence on long tests",
63+
"running inference on long tests",
6464
inference_voter(
6565
model,
6666
"""

data/datasets/nsfw_selfharm_reddit/utils/reddit.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ def init_praw_reddit(client_id: str | None = None, client_secret: str | None = N
2828
def scrap_subreddit(subreddit: str, reddit) -> pd.DataFrame | None:
2929
"""
3030
Scrap "hot", "top", "rising" given a subreddit and return
31-
dedupped DataFrame.
31+
deduped DataFrame.
3232
"""
3333
items = []
3434
dfs = []

data/datasets/safety_directory/child_help/child_help.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -322,7 +322,7 @@
322322
"ChildHelp Sierra Leone": {
323323
"region": "Sierra Leone",
324324
"page": "https://childhelplineinternational.org/sierra-leone-childhelp-sierra-leone/",
325-
"description": "ChildHelp Sierra Leone is designed specifically to meet both immediate and long-term needs of impoverished and underprivileged needy children, their families and communities in needand living in difficult circumstances.",
325+
"description": "ChildHelp Sierra Leone is designed specifically to meet both immediate and long-term needs of impoverished and underprivileged needy children, their families and communities in need and living in difficult circumstances.",
326326
"contacts": {
327327
"Website": {"type": "website", "link": "http://www.childhelpsl.org/"},
328328
"+232 78 666269": {"type": "phone", "link": "tel:+23278666269"},
@@ -598,7 +598,7 @@
598598
"Ayudo pa mucha i hoben 918": {
599599
"region": "Curaçao",
600600
"page": "https://childhelplineinternational.org/curacao-ayudo-pa-mucha-i-hoben-918/",
601-
"description": "Ayudo pa mucha i hoben 918 is free to contact via phone, chat, and forum. It is avaialble for all children, young people and young adults on Curaçao up to and including 25 years old.",
601+
"description": "Ayudo pa mucha i hoben 918 is free to contact via phone, chat, and forum. It is available for all children, young people and young adults on Curaçao up to and including 25 years old.",
602602
"contacts": {
603603
"Website": {"type": "website", "link": "https://www.918.cw"},
604604
"918": {"type": "phone", "link": "tel:918"},
@@ -1223,7 +1223,7 @@
12231223
"National Hotline for Child Protection 111": {
12241224
"region": "Vietnam",
12251225
"page": "https://childhelplineinternational.org/vietnam-national-hotline-for-child-protection-111/",
1226-
"description": "The Vietnamese National Hotline for Child Protection is run by the Department of Child Affairs, part of the Ministry of Labour, Invalids and Social Affairs. While the hotline deals primarily with information, reports and denuncations on risks and acts of child abuse, it also provides counselling to children.",
1226+
"description": "The Vietnamese National Hotline for Child Protection is run by the Department of Child Affairs, part of the Ministry of Labour, Invalids and Social Affairs. While the hotline deals primarily with information, reports and denunciations on risks and acts of child abuse, it also provides counselling to children.",
12271227
"contacts": {
12281228
"Website": {"type": "website", "link": "http://tongdai111.vn/"},
12291229
"111": {"type": "phone", "link": "tel:111"},

model/model_eval/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,4 +60,4 @@ python model/model_eval/rejection_sampling.py --data_path model/model_eval/manua
6060
}
6161
```
6262

63-
- additionally, selected and rejected samples will be saved to seperate files
63+
- additionally, selected and rejected samples will be saved to separate files

model/model_eval/eval_rm.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ def batch_inference(inputs, model):
4949
if __name__ == "__main__":
5050
parser = argparse.ArgumentParser(description="")
5151
parser.add_argument("--dataset", type=str, help="name of evaluation dataset")
52-
parser.add_argument("--split", type=str, help="dataset splits seperated by comma", default="train")
52+
parser.add_argument("--split", type=str, help="dataset splits separated by comma", default="train")
5353
parser.add_argument("--model", type=str, help="Path or url of the model file")
5454
parser.add_argument("--metrics", type=str, help="metrics to evaluate", default="accuracy")
5555
parser.add_argument("--batch_size", type=int, help="Batch Size", default=8)

model/model_training/check_dataset_counts.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ def argument_parsing(notebook=False, notebook_args=None):
8989
raise ValueError(
9090
f'Error: Could not find the dataset "{name}" in {mode.config_name()}. ',
9191
f"Tried to look for this dataset within th key {mode.default_config()} ",
92-
"and as seperate key.",
92+
"and as separate key.",
9393
)
9494

9595
datasets_list.extend(datasets_value)

model/model_training/custom_datasets/formatting.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ def get_formatted(self, mode: Mode, eos_token: str, **kwargs) -> str | list[str]
135135

136136
@classmethod
137137
def create_from_prompter_assistant_interplay(cls, qa: dict[str, str]):
138-
"""Creates a DatasetEntry from a qa of given structure. Even if qa contains consecutative assistant or prompter phrases.
138+
"""Creates a DatasetEntry from a qa of given structure. Even if qa contains consecutive assistant or prompter phrases.
139139
140140
141141
Returns:

model/model_training/custom_datasets/oasst_dataset.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ def load_oasst_export(
5454
if tree.tree_state not in ("ready_for_export", "prompt_lottery_waiting"):
5555
continue
5656

57-
# extract all threads up to last asssitant reply
57+
# extract all threads up to last assistant reply
5858
threads: list[list[ExportMessageNode]] = []
5959

6060
def thread_filter(thread: list[ExportMessageNode]) -> bool:

0 commit comments

Comments
 (0)