vizseq.ipynb.fairseq_viz.*
VizSeq can directly import and analyze model predictions generated by fairseq-generate or fairseq-interactive in Jupyter Notebook. The APIs are almost the same as the normal Jupyter Notebook APIs.
view_stats()
Arguments
log_path
: str: The path tofairseq-generate
orfairseq-interactive
log file.
view_scores()
Arguments
log_path
: str: The path tofairseq-generate
orfairseq-interactive
log file.metrics
: List[str]: List of scorer IDs. Useavailable_scorers()
to check all the available ones.
view_examples()
Arguments
log_path
: str: The path tofairseq-generate
orfairseq-interactive
log file.metrics
: Optional[List[str]] = None: List of scorer IDs. Default toNone
. Useavailable_scorers()
to check all the available ones.query
: str = '': The keyword(s) for example filtering. Default to''
.page_sz
: int = 10: Page size. Default to10
.page_no
: int = 1: Page number. Default to1
.sorting
: VizSeqSortingType = VizSeqSortingType.originalneed_g_translate
: bool = False: To show Google Translate results or not. Default toFalse
.disable_alignment
: bool = False: Not to show source-reference and reference-hypothesis alignments for rendering speedup. Default toFalse
.
view_n_grams()
Arguments
log_path
: str: The path tofairseq-generate
orfairseq-interactive
log file.k
: int = 64: Number of n-grams to be shown. Default to64
.