Check the order of command line arguments and give helpful error message.
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 39
- Forks
- 7
- Avg merge
- 1d 9h
- Merged PRs (30d)
- 5
Description
I tried this command:
F:\GitHub\silnlp>poetry run python -m silnlp.nmt.translate --memory-growth --clearml-queue langtech_40gb --src-project GELA3_2022_12_12 --books OT BT-English-NLLB\experiment
And there was this error message:
2022-12-15 14:31:47,439 - silnlp.common.environment - INFO - Using workspace: S: as per environment variable SIL_NLP_DATA_PATH.
usage: translate.py [-h] [--memory-growth] [--checkpoint CHECKPOINT] [--src SRC] [--trg TRG] [--src-prefix SRC_PREFIX] [--trg-prefix TRG_PREFIX] [--start-seq START_SEQ] [--end-seq END_SEQ]
[--src-project SRC_PROJECT] [--books books [books ...]] [--src-iso SRC_ISO] [--trg-iso TRG_ISO] [--output-usfm OUTPUT_USFM] [--eager-execution] [--clearml-queue CLEARML_QUEUE]
experiment
translate.py: error: the following arguments are required: experiment
I think this is because the --books parameter is a list option and so the experiment is included as a book to be translated.
Could we check for the order of the arguments and provide an error message that explains the problem, or better still checks to see whether the last book is actually an experiment?
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the command through the silnlp.nmt.translate entry point and inspect how the --books list and required experiment argument are parsed. Confirm the reported ordering failure, then add validation or an error message that explains the conflict and verify that valid translations still work.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- cli
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100