You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -21,24 +22,29 @@ class SimpleInference(Serializable):
21
22
Main class to perform decoding.
22
23
23
24
Args:
24
-
src_file (str): path of input src file to be translated
25
-
trg_file (str): path of file where trg translatons will be written
26
-
ref_file (str): path of file with reference translations, e.g. for forced decoding
27
-
max_src_len (int): Remove sentences from data to decode that are longer than this on the source side
28
-
post_process (str): post-processing of translation outputs: ``none/join-char/join-bpe/join-piece``
29
-
report_path (str): a path to which decoding reports will be written
30
-
report_type (str): report to generate ``file/html``. Can be multiple, separate with comma.
31
-
search_strategy (SearchStrategy): a search strategy used during decoding.
32
-
mode (str): type of decoding to perform. ``onebest``: generate one best. ``forced``: perform forced decoding. ``forceddebug``: perform forced decoding, calculate training loss, and make suer the scores are identical for debugging purposes.
33
-
batcher (Batcher):
25
+
src_file: path of input src file to be translated
26
+
trg_file: path of file where trg translatons will be written
27
+
ref_file: path of file with reference translations, e.g. for forced decoding
28
+
max_src_len: Remove sentences from data to decode that are longer than this on the source side
29
+
post_process: post-processing of translation outputs: ``none/join-char/join-bpe/join-piece``
30
+
report_path: a path to which decoding reports will be written
31
+
report_type: report to generate ``file/html``. Can be multiple, separate with comma.
32
+
search_strategy: a search strategy used during decoding.
33
+
mode: type of decoding to perform.
34
+
``onebest``: generate one best.
35
+
``forced``: perform forced decoding.
36
+
``forceddebug``: perform forced decoding, calculate training loss, and make suer the scores are identical
37
+
for debugging purposes.
38
+
batcher: inference batcher, needed e.g. in connection with ``pad_src_token_to_multiple``
src_file (str): path of input src file to be translated
60
-
trg_file (str): path of file where trg translatons will be written
61
-
candidate_id_file (str): if we are doing something like retrieval where we select from fixed candidates, sometimes we want to limit our candidates to a certain subset of the full set. this setting allows us to do this.
66
+
generator: the model to be used
67
+
src_file: path of input src file to be translated
68
+
trg_file: path of file where trg translatons will be written
69
+
candidate_id_file: if we are doing something like retrieval where we select from fixed candidates, sometimes we
70
+
want to limit our candidates to a certain subset of the full set. this setting allows us to do
0 commit comments