Skip to content

Commit b0592ef

Browse files
barkhayotBarkhayot Juraev
andauthored
[chore] fix minor typos (#457)
Co-authored-by: Barkhayot Juraev <barkhayotjuraev@Barkhayots-MacBook-Pro.local>
1 parent 5f3093d commit b0592ef

6 files changed

Lines changed: 8 additions & 8 deletions

File tree

agentlightning/verl/trainer.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -368,7 +368,7 @@ def _train_step(self, batch_dict: dict) -> dict:
368368
# Calculate the metrics before processing. Refer to the comments of function `compute_data_metrics` for details.
369369
metrics.update(compute_data_metrics(batch=batch, use_critic=self.use_critic, suffix="_before_processing"))
370370

371-
# after advantages are assinged, we begin to drop (1) long prompt (2) floor to ppo minisize
371+
# after advantages are assigned, we begin to drop (1) long prompt (2) floor to ppo minisize
372372
keep_indices = (~batch.batch["is_drop_mask"]).nonzero(as_tuple=True)[0]
373373
metrics["training/n_triplets_prompt_too_long"] = (
374374
batch.batch["is_drop_mask"].shape[0] - keep_indices.shape[0]

examples/apo/apo_debug.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ async def on_trace_end( # type: ignore
8080

8181

8282
def debug_with_trainer():
83-
"""This appraoch integrates the trainer and is very similar to the real `fit()` loop.
83+
"""This approach integrates the trainer and is very similar to the real `fit()` loop.
8484
8585
The trainer will create a mock algorithm which will communicates with the runner.
8686
Do this for end-to-end testing and debugging purposes.

examples/apo/room_selector.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -215,7 +215,7 @@ def room_selector(task: RoomSelectionTask, prompt_template: PromptTemplate) -> f
215215
)
216216
)
217217

218-
# Update the messages for hte next call
218+
# Update the messages for the next call
219219
messages.append(
220220
ChatCompletionAssistantMessageParam(
221221
role="assistant",

examples/spider/spider_eval/evaluation.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -996,7 +996,7 @@ def build_foreign_key_map_from_json(table):
996996
)
997997
args = parser.parse_args()
998998

999-
# only evaluting exact match needs this argument
999+
# only evaluating exact match needs this argument
10001000
kmaps = None
10011001
if args.etype in ["all", "match"]:
10021002
assert args.table is not None, "table argument must be non-None if exact set match is evaluated"

examples/spider/spider_eval/exec_eval.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,7 @@ def postprocess(query: str) -> str:
183183
# that are in the same directory as db
184184
# 0 if denotationally equivalent
185185
# 1 otherwise
186-
# the meaning of each auxillary argument can be seen in the parser definition in evaluation.py
186+
# the meaning of each auxiliary argument can be seen in the parser definition in evaluation.py
187187
def eval_exec_match(
188188
db: str, p_str: str, g_str: str, plug_value: bool, keep_distinct: bool, progress_bar_for_each_datapoint: bool
189189
) -> int:
@@ -229,7 +229,7 @@ def eval_exec_match(
229229
g_flag, g_denotation = run_sync_ephemeral(exec_on_db(db_path, g_str))
230230
p_flag, p_denotation = run_sync_ephemeral(exec_on_db(db_path, pred))
231231

232-
# we should expect the gold to be succesfully executed on the database
232+
# we should expect the gold to be successfully executed on the database
233233
assert g_flag != "exception", "gold query %s has error on database file %s" % (g_str, db_path)
234234

235235
# wrong if execution fails

examples/spider/spider_eval/parse.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -109,8 +109,8 @@ def replace_values(sql: str) -> Tuple[List[str], Set[str]]:
109109
# extract the non-value tokens and the set of values
110110
# from a sql query
111111
def extract_query_values(sql: str) -> Tuple[List[str], Set[str]]:
112-
reformated = reformat_query(query=sql)
113-
query_value_replaced, values = replace_values(reformated)
112+
reformatted = reformat_query(query=sql)
113+
query_value_replaced, values = replace_values(reformatted)
114114
return query_value_replaced, values
115115

116116

0 commit comments

Comments
 (0)