kausmees / GenoCAE

Convolutional autoencoder for genotype data
BSD 3-Clause "New" or "Revised" License
15 stars 10 forks source link

Suggest: improve CLI error messages #17

Open richelbilderbeek opened 3 years ago

richelbilderbeek commented 3 years ago

Dear GenoCAE maintainers,

I enjoy GenoCAE quite a bit and especially the examples are great!

What would make me like GenoCAE even better, is to have clearer error messages from the CLI. I think redirecting the user to the help is great, but a clearer error message to guide the user to the next step would be even better.

Some examples:

Example 1

This is not something a user will blame you for, it is more of an opening to the next example.

python run_gcae.py train

I get:

2021-07-02 11:35:47.399470: I tensorflow/stream_executor/platform/default/dso_loader.cc:48] Successfully opened dynamic library libcudart.so.10.1
tensorflow version 2.3.3
Invalid command. Run 'python run_gcae.py --help' for more information.

I expected something like:

`datadir` is missing. Please specify the data folder using `--datadir [data dir]`, e.g. `--datadir example_tiny/`

Example 2

This is what I had myself:

python run_gcae.py train --datadir example_tiny/ --data HumanOrigins249_tiny --model_id M1 --train_opts_id ex3 --data_opts_id b_0_4

I got:


2021-07-02 11:35:25.100815: I tensorflow/stream_executor/platform/default/dso_loader.cc:48] Successfully opened dynamic library libcudart.so.10.1
tensorflow version 2.3.3
Invalid command. Run 'python run_gcae.py --help' for more information.

I expected something like:

`epochs` is missing. Please specify the number of epochs using `--epochs [number]`, e.g. `--epochs 20`
richelbilderbeek commented 3 years ago

Note that even my suggestion at example 2 was wrong :-)