Finally, train.py is where all the functions we implemented in the controller are called and coordinated. More specifically, we execute each step as subprocess:
import subprocessimport sysfrom utils import timerimport osfrom constants import PATHSimport logginglogger = logging.getLogger(__name__)def main(): if not os.path.exists(PATHS.SELFPLAY_DIR): with timer("Initialize"): logger.info('==========================================') logger.info("============ Initializing...==============") logger.info('==========================================') res = subprocess.call("python controller.py initialize-random-model", shell=True) with timer('Initial Selfplay'): logger.info('=======================================') logger.info('============ ...