Skip to content

Tiny improvements, nicer "sacrebleu -h"#41

Merged
mjpost merged 5 commits intomjpost:masterfrom
martinpopel:details
Sep 1, 2019
Merged

Tiny improvements, nicer "sacrebleu -h"#41
mjpost merged 5 commits intomjpost:masterfrom
martinpopel:details

Conversation

@martinpopel
Copy link
Copy Markdown
Collaborator

See the logs of individual commits for details and motivations.
None of these changes affects the sacreBLEU behavior.
I cherry-picked these (hopefully non-controversial) commits from another branch where I am adding new features (which I plan to put in a separate PR soon, ideally after this PR is merged).

ArgumentParser deletes all newlines are multiple spaces by default.

The script is now called "sacrebleu", not "sacreBLEU"
and most users should have it installed in PATH, so "./" is not needed.
… sets.

The list was included twice in the "sacrebleu -h" output.
The list is getting quite long, so when printed on single line
it is not much readable anyway.
I think a separate --list option is better (it prints 1 test set per line).

However, if anyone (@mjpost) wants to print the list within sacreble -h,
I suggest to use the ArgumentParser's epilog.

I know that `choices=DATASETS.keys()` does also validation
in addition to documentation, but this functionality is already included
(again, with a nicer multi-line listing of available test sets).
`args.langpair is None or args.langpair not in DATASETS[args.test_set])`
this was unnecessarily duplicated.
Also, I think the new structure is more readable.
SacreBLEU is not versioned in sockeye_contrib anymore.

While `sacrebleu` with no arguments still prints all the test set names,
it prints also the error message
`sacreBLEU: I need either a predefined test set (-t) or a list of references'
and ends with non-zero exit code.
Using `sacrebleu --list` seems a tiny bit more user friendly.
@mjpost
Copy link
Copy Markdown
Owner

mjpost commented Aug 21, 2019

Thanks for this and others, @martinpopel! I'll look at these asap. Will you be at MT Marathon next week?

@martinpopel
Copy link
Copy Markdown
Collaborator Author

Thanks. Unfortunately, I won't be at MTM this year.

@mjpost mjpost merged commit 1ab2684 into mjpost:master Sep 1, 2019
@mjpost
Copy link
Copy Markdown
Owner

mjpost commented Sep 1, 2019

Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants