Parse data and label files from CLI arguments
This commit is contained in:
parent
a3780c9761
commit
bcc4f4b4d4
|
@ -0,0 +1,27 @@
|
|||
from argparse import ArgumentParser
|
||||
from time import time
|
||||
|
||||
from model import run
|
||||
|
||||
|
||||
def parse_arguments():
|
||||
parser = ArgumentParser()
|
||||
parser.add_argument(
|
||||
"data_file", help="FASTQ file containing the sequences with errors"
|
||||
)
|
||||
parser.add_argument(
|
||||
"label_file", help="FASTQ file containing the sequences without errors"
|
||||
)
|
||||
return parser.parse_args()
|
||||
|
||||
|
||||
def main():
|
||||
args = parse_arguments()
|
||||
start_time = time()
|
||||
run(data_file=args.data_file, label_file=args.label_file)
|
||||
end_time = time()
|
||||
print(f"Elapsed time: {end_time - start_time}")
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
|
@ -75,7 +75,3 @@ def run(data_file, label_file, seed_value=42) -> None:
|
|||
model.fit(train_data, epochs=hyperparams.epochs, validation_data=eval_data)
|
||||
print("Training complete. Obtaining the model's metrics...")
|
||||
show_metrics(model, eval_data, test_data)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
run(data_file="data/curesim-HVR.fastq", label_file="data/HVR.fastq")
|
||||
|
|
Loading…
Reference in New Issue