-
Notifications
You must be signed in to change notification settings - Fork 0
/
testing_script.py
29 lines (23 loc) · 1.15 KB
/
testing_script.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
import sys
from multiprocessing import set_start_method
from multiprocessing import Process
from multiprocessing import Lock
from colab_run_single_agent import configure_single_agent_on_colab
from colab_run_multi_agent import configure_multi_agent_on_colab
from src.Utilities import settings, multi_agent_settings
from src.Utilities.Helper import Helper
if __name__ == "__main__":
set_start_method("spawn")
# ****************** CUSTOM ARGUMENTS ***************************
if len(sys.argv) > 1:
settings.PPO_ENTROPY_COEFFICIENT = float(sys.argv[1])
settings.PPO_ENTROPY_COEFFICIENT_DECAY = float(sys.argv[2])
Helper.output_information("Testing with ENTROPY_COEFFICIENT: " + str(settings.PPO_ENTROPY_COEFFICIENT),
file=sys.stderr)
Helper.output_information("Testing with ENTROPY_DECAY: " + str(settings.PPO_ENTROPY_COEFFICIENT_DECAY),
file=sys.stderr)
# ***************************************************************
lock = Lock()
process = Process(target=configure_multi_agent_on_colab(), args=(lock,))
process.start()
process.join()