Skip to content

Fix the -e flag of moabb.run splitting its value into characters - #1179

Open
NotAFlightRisk wants to merge 1 commit into
NeuroTechX:developfrom
NotAFlightRisk:fix-run-evaluations-flag
Open

Fix the -e flag of moabb.run splitting its value into characters#1179
NotAFlightRisk wants to merge 1 commit into
NeuroTechX:developfrom
NotAFlightRisk:fix-run-evaluations-flag

Conversation

@NotAFlightRisk

Copy link
Copy Markdown
Contributor

-e/--evaluations is declared type=list, so argparse runs list() over the string you pass it. -e WithinSession reaches benchmark() as thirteen seperate letters and the run stops on KeyError: 'W', after it's already printed the paradigms it was about to work through. Every other value does the same, so there isn't a spelling of -e that works.

nargs="+" hands it the list of names the Python API already takes (benchmark(evaluations=["WithinSession"])). The help text went with it, since it was telling you to pass a list and had the options butted up against the "By default" sentence with no space. I've not put choices= on the argument, so a name that isn't one of the three still gets as far as benchmark before it fails, same as today.

Most of the diff is the new test file. There was nothing covering run.py at all, which is probaly how this sat there since #264 - CI calls the runner without -e.

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.

1 participant