Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve error reports for invalid config.yml file. #629

Open
davidbaines opened this issue Jan 15, 2025 · 0 comments
Open

Improve error reports for invalid config.yml file. #629

davidbaines opened this issue Jan 15, 2025 · 0 comments
Labels
enhancement New feature or request good first issue Good for newcomers pipeline 3: preprocess Issue related to preprocessing.

Comments

@davidbaines
Copy link
Collaborator

There are several items in the config.yml file that require an argument.
corpus_pairs requires at least one pair.
corpus_books requires at least one book.
src and trg require at least one (and sometimes exactly one) text. etc.

Currently if I omit any books from the corpus_books line the error is:
''' File "F:\GitHub\silnlp\silnlp\nmt\config.py", line 223, in parse_corpus_pairs
corpus_books = get_chapters(pair.get("corpus_books", []))
File "C:\Users\David\AppData\Local\pypoetry\Cache\virtualenvs\silnlp-X71j0jgb-py3.10\lib\site-packages\machine\scripture\parse.py", line 139, in get_chapters
for selection in selections:
TypeError: 'NoneType' object is not iterable

It would be helpful to have a quick check of the config.yml file and ensure that it is valid so that we can give informative error messages.

@davidbaines davidbaines added enhancement New feature or request good first issue Good for newcomers pipeline 3: preprocess Issue related to preprocessing. labels Jan 15, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers pipeline 3: preprocess Issue related to preprocessing.
Projects
None yet
Development

No branches or pull requests

1 participant