Fix argparse: add missing type= for numeric arguments#8
Open
rec3141 wants to merge 1 commit into
Open
Conversation
Several command-line arguments (--bin_length, --akeep, --batch_size, --epoch, --lrate, --batchsteps) were missing type=int or type=float in their argparse definitions. Without explicit types, argparse treats all CLI values as strings, causing TypeErrors like: TypeError: '<=' not supported between instances of 'str' and 'int' This affects --bin_length in the `bin` and `cluster` subcommands, and training parameters in `cluster` and `train` subcommands. Also fixes help text for --batch_size (said 64, default is 128) and --batchsteps (said "30, 60, 120", default is [30, 100]). Fixes LorMeBioAI#2
rec3141
pushed a commit
to rec3141/danaSeq
that referenced
this pull request
Mar 7, 2026
The $((…)) workaround for LorBin's missing type=int was invalid Groovy syntax. The upstream fix (LorMeBioAI/LorBin#8) is already in the container's pip install, so no cast is needed — just pass the param. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
type=intto--bin_length,--batch_size,--epoch,--batchstepstype=floatto--akeep,--lratebin,cluster,train) where these args were missing types--batch_size(said 64, default is 128) and--batchsteps(said "30, 60, 120", default is [30, 100])Problem
Without explicit
type=inadd_argument(), argparse treats all CLI values as strings. This causesTypeErrorat runtime when the code compares them to integers/floats:at
lorbin.py:95(if bin_length <= 0:), and similar errors for other numeric args.Note: when using the default values (not passing the flag on the CLI), the defaults are already
int/floatso the bug only manifests when the argument is explicitly passed.Fixes #2