-
Notifications
You must be signed in to change notification settings - Fork 1
/
trainingcli.py
38 lines (27 loc) · 1.11 KB
/
trainingcli.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
# import asyncio
import argparse
from training.main import main as training
def main() -> None:
parser = argparse.ArgumentParser(description = "Tebakaja Model Trainer")
parser.add_argument('-a', '--algorithm', type = str, required = True,
help = 'select the algorithm to be trained (LSTM, GRU, LSTM_GRU)')
parser.add_argument('-e', '--epochs', type = int, required = True, help = 'epochs')
parser.add_argument('-b', '--batchs', type = int, required = True, help = 'batch length')
parser.add_argument('-s', '--sequences', type = int, required = True, help = 'sequences length')
args = parser.parse_args()
training(
epochs = args.epochs,
batch_size = args.batchs,
algorithm = args.algorithm,
sequence_length = args.sequences
)
# event_loop = asyncio.get_event_loop()
# event_loop.run_until_complete(
# training(
# epochs = args.epochs,
# batch_size = args.batchs,
# algorithm = args.algorithm,
# sequence_length = args.sequences
# )
# )
if __name__ == "__main__": main()