Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions scripts/cmd_args.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,8 @@ def add_common_options(parser):

"""
# Pre-processing
parser.add('--config', required=False,
is_config_file=True, help='config file path')
parser.add('--genome', required=True, type=str,
help='chromosome sizes file for the genome. Sizes \
files for human genome 19 (hg19) and human \
Expand Down Expand Up @@ -142,7 +144,7 @@ def add_common_options(parser):
help="checkpoint path to load the model from for\
inference or resume training")
# dist-env args
parser.add('--gpu_idx', required=False, type=int,
parser.add('--gpu_idx', required=False, type=type_or_none_fn(int),
help='GPU ID to use. ID can be known from nvidia-smi; \
preempted by --distributed which uses all \
available gpus ')
Expand Down Expand Up @@ -241,8 +243,6 @@ def add_inference_options(parser):

"""
add_common_options(parser)
parser.add('--config', required=False,
is_config_file=True, help='config file path')
parser.add('--regions', required=True, type=type_or_none_fn(str),
help='atacworks denoising is done on whole genome by \
default. You can optionally specify a list of \
Expand Down
8 changes: 7 additions & 1 deletion scripts/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -584,7 +584,13 @@ def main():
# Save config parameters
dst_config_path = os.path.join(args.out_home,
args.mode + "_config.yaml")
save_config(dst_config_path, args)
# args object is manipulated in the code, we want to save the original
# unchanged args object.
args_org = parse_args(root_dir)
# Delete mode from args object, as mode is registered as an argument instead of
# a subparser
del args.mode
save_config(dst_config_path, args_org)


if __name__ == '__main__':
Expand Down