Skip to content

Commit

Permalink
Hide several less-used CLI options
Browse files Browse the repository at this point in the history
Let's be real, what are the chances a Vamb user is going to experiment with tweaking
alpha or the latent space size?
It's nice to have these flags when testing, but we don't need to display them
in the help menu. All they do is confuse users and drown out the actually
important parameters users need to set.
  • Loading branch information
jakobnissen committed Jul 12, 2024
1 parent 3e5121b commit a8207f1
Showing 1 changed file with 27 additions and 27 deletions.
54 changes: 27 additions & 27 deletions vamb/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -1696,7 +1696,7 @@ def add_input_output_arguments(subparser):

# RPKM arguments
rpkmos = subparser.add_argument_group(
title="RPKM input (either BAMs or .npz required)"
title="RPKM input (exactly one input required)"
)
# Note: This argument is deprecated, but we'll keep supporting it for now.
# Instead, use --bamdir.
Expand Down Expand Up @@ -1753,7 +1753,7 @@ def add_input_output_arguments(subparser):
metavar="",
type=float,
default=None,
help="ignore reads with nucleotide identity below this [0.0]",
help=argparse.SUPPRESS,
)
inputos.add_argument(
"-p",
Expand All @@ -1762,7 +1762,7 @@ def add_input_output_arguments(subparser):
type=int,
default=DEFAULT_THREADS,
help=(
"number of threads to use " "[min(" + str(DEFAULT_THREADS) + ", nbamfiles)]"
"number of threads to use when parsing BAM" "[min(" + str(DEFAULT_THREADS) + ", nbamfiles)]"
),
)
inputos.add_argument(
Expand Down Expand Up @@ -1805,53 +1805,53 @@ def add_vae_arguments(subparser):
type=int,
nargs="+",
default=None,
help="hidden neurons [Auto]",
help=argparse.SUPPRESS,
)
vaeos.add_argument(
"-l",
dest="nlatent",
metavar="",
type=int,
default=32,
help="latent neurons [32]",
help=argparse.SUPPRESS,
)
vaeos.add_argument(
"-a",
dest="alpha",
metavar="",
type=float,
default=None,
help="alpha, weight of TNF versus depth loss [Auto]",
help=argparse.SUPPRESS,
)
vaeos.add_argument(
"-b",
dest="beta",
metavar="",
type=float,
default=200.0,
help="beta, capacity to learn [200.0]",
help=argparse.SUPPRESS,
)
vaeos.add_argument(
"-d",
dest="dropout",
metavar="",
type=float,
default=None,
help="dropout [Auto]",
help=argparse.SUPPRESS,
)

trainos = subparser.add_argument_group(title="Training options", description=None)

trainos.add_argument(
"-e", dest="nepochs", metavar="", type=int, default=300, help="epochs [300]"
"-e", dest="nepochs", metavar="", type=int, default=300, help=argparse.SUPPRESS
)
trainos.add_argument(
"-t",
dest="batchsize",
metavar="",
type=int,
default=256,
help="starting batch size [256]",
help=argparse.SUPPRESS,
)
trainos.add_argument(
"-q",
Expand All @@ -1860,7 +1860,7 @@ def add_vae_arguments(subparser):
type=int,
nargs="*",
default=[25, 75, 150, 225],
help="double batch size at epochs [25 75 150 225]",
help=argparse.SUPPRESS,
)
trainos.add_argument(
"-r",
Expand All @@ -1885,31 +1885,31 @@ def add_predictor_arguments(subparser):
metavar="",
type=int,
default=100,
help="taxonomy predictor epochs [100]",
help=argparse.SUPPRESS,
)
pred_trainos.add_argument(
"-pt",
dest="pred_batchsize",
metavar="",
type=int,
default=1024,
help="batch size for the taxonomy predictor [1024]",
help=argparse.SUPPRESS,
)
pred_trainos.add_argument(
"-pthr",
dest="pred_softmax_threshold",
metavar="",
type=float,
default=0.5,
help="conditional probability threshold for accepting the taxonomic prediction [0.5]",
help=argparse.SUPPRESS,
)
pred_trainos.add_argument(
"-ploss",
dest="ploss",
metavar="",
type=str,
default="flat_softmax",
help='Hierarchical loss (one of flat_softmax, cond_softmax, soft_margin) ["flat_softmax"]',
help=argparse.SUPPRESS,
)
return subparser

Expand All @@ -1923,15 +1923,15 @@ def add_clustering_arguments(subparser):
metavar="",
type=int,
default=300,
help="size of window to count successes [300]",
help=argparse.SUPPRESS,
)
clusto.add_argument(
"-u",
dest="min_successes",
metavar="",
type=int,
default=15,
help="minimum success in window [15]",
help=argparse.SUPPRESS,
)
clusto.add_argument(
"-c",
Expand All @@ -1951,7 +1951,7 @@ def add_clustering_arguments(subparser):
default=None,
const="",
nargs="?",
help="binsplit separator [C] (pass empty string to disable)",
help="binsplit separator [C if present] (pass empty string to disable)",
)
return subparser

Expand Down Expand Up @@ -1989,47 +1989,47 @@ def add_aae_arguments(subparser):
metavar="",
type=int,
default=547,
help="hidden neurons AAE [547]",
help=argparse.SUPPRESS,
)
aaeos.add_argument(
"--z_aae",
dest="nlatent_aae_z",
metavar="",
type=int,
default=283,
help="latent neurons AAE continuous latent space [283]",
help=argparse.SUPPRESS,
)
aaeos.add_argument(
"--y_aae",
dest="nlatent_aae_y",
metavar="",
type=int,
default=700,
help="latent neurons AAE categorical latent space [700]",
help=argparse.SUPPRESS,
)
aaeos.add_argument(
"--sl_aae",
dest="sl",
metavar="",
type=float,
default=0.00964,
help="loss scale between reconstruction loss and adversarial losses [0.00964]",
help=argparse.SUPPRESS,
)
aaeos.add_argument(
"--slr_aae",
dest="slr",
metavar="",
type=float,
default=0.5,
help="loss scale between reconstruction adversarial losses [0.5] ",
help=argparse.SUPPRESS,
)
aaeos.add_argument(
"--aae_temp",
dest="temp",
metavar="",
type=float,
default=0.1596,
help=" Temperature of the softcategorical prior [0.1596]",
help=argparse.SUPPRESS,
)

aaetrainos = subparser.add_argument_group(
Expand All @@ -2042,15 +2042,15 @@ def add_aae_arguments(subparser):
metavar="",
type=int,
default=70,
help="epochs AAE [70]",
help=argparse.SUPPRESS,
)
aaetrainos.add_argument(
"--t_aae",
dest="batchsize_aae",
metavar="",
type=int,
default=256,
help="starting batch size AAE [256]",
help=argparse.SUPPRESS,
)
aaetrainos.add_argument(
"--q_aae",
Expand All @@ -2059,7 +2059,7 @@ def add_aae_arguments(subparser):
type=int,
nargs="*",
default=[25, 50],
help="double batch size at epochs AAE [25,50]",
help=argparse.SUPPRESS,
)
return subparser

Expand Down

0 comments on commit a8207f1

Please sign in to comment.