-
Notifications
You must be signed in to change notification settings - Fork 1
/
TrainAWS.py
executable file
·39 lines (26 loc) · 1.02 KB
/
TrainAWS.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
38
39
#!/usr/bin/env python3
import subprocess
import sys
def run_main_program(board, episodes):
# Run the Main.py program
subprocess.call(['python3', 'Trainer.py', board, episodes])
#def commit_changes(token):
# # Add all changes
# subprocess.call(['git', 'add', 'RKvsRK.json'])
# # Commit changes
# subprocess.call(['git', 'commit', '-m', 'Committing changes from script'])
# # Push changes to GitHub with credentials
# repo_url = 'https://github.com/JoelJa835/BetaZero.git'
# url_with_token = f'https://JoelJa835:{token}@{repo_url.split("://")[1]}'
# subprocess.call(['git', 'push', url_with_token])
def main():
if len(sys.argv) != 3:
print("Please provide command-line arguments.")
return
#token = sys.argv[1]
board = sys.argv[1]
episodes = sys.argv[2]
run_main_program(board,episodes)
#commit_changes(token)
if __name__ == '__main__':
main()