代码拉取完成,页面将自动刷新
import multiprocessing
import time
import signal
import click
import os
from lib.train import train
from lib.play import play, self_play
from lib.process import MyPool
@click.command()
@click.option("--folder", default=-1)
@click.option("--version", default=False)
def main(folder, version):
## Start method for PyTorch
multiprocessing.set_start_method('spawn')
## Create folder name if not provided
if folder == -1:
current_time = str(int(time.time()))
else:
current_time = str(folder)
current_time = str(1634727179)
## Catch SIGNINT
original_sigint_handler = signal.signal(signal.SIGINT, signal.SIG_IGN)
# pool = MyPool(2)
# signal.signal(signal.SIGINT, original_sigint_handler)
#
# try:
# # self_play_proc = pool.apply_async(self_play, args=(current_time, version,))
# train_proc = pool.apply_async(train, args=(current_time, version,))
#
# ## Comment one line or the other to get the stack trace
# ## Must add a loooooong timer otherwise signals are not caught
# # self_play_proc.get(60000000)
# train_proc.get(60000000)
#
# except KeyboardInterrupt:
# pool.terminate()
# else:
# pool.close()
# pool.join()
self_play(current_time,False)
# train(current_time,False)
if __name__ == "__main__":
main()
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。