Skip to content

Commit

Permalink
Adding a default value for nbest size for backwards compatibility. (a…
Browse files Browse the repository at this point in the history
  • Loading branch information
tdomhan authored and fhieber committed Dec 13, 2018
1 parent 2de96bd commit 4579f7a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions sockeye/inference.py
Original file line number Diff line number Diff line change
Expand Up @@ -1114,10 +1114,10 @@ class Translator:
:param length_penalty: Length penalty instance.
:param beam_prune: Beam pruning difference threshold.
:param beam_search_stop: The stopping criterion.
:param nbest_size: Size of nbest list of translations.
:param models: List of models.
:param source_vocabs: Source vocabularies.
:param target_vocab: Target vocabulary.
:param nbest_size: Size of nbest list of translations.
:param restrict_lexicon: Top-k lexicon to use for target vocabulary restriction.
:param avoid_list: Global list of phrases to exclude from the output.
:param store_beam: If True, store the beam search history and return it in the TranslatorOutput.
Expand All @@ -1132,10 +1132,10 @@ def __init__(self,
length_penalty: LengthPenalty,
beam_prune: float,
beam_search_stop: str,
nbest_size: int,
models: List[InferenceModel],
source_vocabs: List[vocab.Vocab],
target_vocab: vocab.Vocab,
nbest_size: int = 1,
restrict_lexicon: Optional[lexicon.TopKLexicon] = None,
avoid_list: Optional[str] = None,
store_beam: bool = False,
Expand Down

0 comments on commit 4579f7a

Please sign in to comment.