nanoporetech / remora

Methylation/modified base calling separated from basecalling.
https://nanoporetech.com
Other
150 stars 18 forks source link

Parser Errors Handling Optimizer or Scheduler Arugment #176

Open andrewgalbraith21 opened 1 month ago

andrewgalbraith21 commented 1 month ago

Hello,

When inputting either scheduler (i.e. --lr-scheduler StepLR --lr-scheduler-kwargs step_size 3 int --lr-scheduler-kwargs gamma 0.25 float) or optimizer arugments (i.e. --optimizer-kwargs weight_decay 0.00005 float), I get the following error using remora 3.2:

File "{path}/argparse.py", line 1030, in call items.append(values) AttributeError: 'tuple' object has no attribute 'append'

Interestingly, when I delete the default lines from the parser script (i.e. default=constants.DEFAULT_OPT_VALUES, and default=constants.DEFAULT_SCH_VALUES,), the code works.

I am wondering is this is a bug or if I am inputting the values incorrectly?

All the best, Andrew Galbraith

marcus1487 commented 1 month ago

It looks like this is a bug in argparse logged here. I will add a workaround to allow user specified arguments in the next version of remora.