Skip to content

Commit

Permalink
typos
Browse files Browse the repository at this point in the history
  • Loading branch information
kylebgorman committed Dec 2, 2024
1 parent 3543096 commit 8bc0127
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions yoyodyne/models/expert.py
Original file line number Diff line number Diff line change
Expand Up @@ -461,10 +461,10 @@ def _generate_data(
dataset: data.Dataset,
index: data.Index,
) -> Iterator[Tuple[List[int], List[int]]]:
"""Helper function to manage data encoding for SED."
"""Helper function to manage data encoding for SED.
We want encodings without BOS or EOS tokens. This encodes only raw
source-target text for the Maxwell library.
We want encodings without padding. This encodes only raw source-target
text for the Maxwell library.
Args:
dataset (data.Dataset): dataset for generating expert vocabulary.
Expand Down
2 changes: 1 addition & 1 deletion yoyodyne/predict.py
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ def predict(
# Beam search.
tsv_writer = csv.writer(sink, delimiter="\t")
for predictions, scores in trainer.predict(model, loader):
predictions = util.pad_tensor_after_eos(predictions)
predictions = util.pad_tensor_after_end(predictions)
# TODO: beam search requires singleton batches and this
# assumes that. Revise if that restriction is ever lifted.
targets = [
Expand Down

0 comments on commit 8bc0127

Please sign in to comment.