misc: small fix or general refactoring i did not bother commenting
This commit is contained in:
parent
7954bb5fcf
commit
8b00e0ae10
@ -16,6 +16,8 @@ def load(config, agent, epoch, from_disk=True):
|
|||||||
return False
|
return False
|
||||||
|
|
||||||
try:
|
try:
|
||||||
|
begin = time.time()
|
||||||
|
|
||||||
logging.info("[ai] bootstrapping dependencies ...")
|
logging.info("[ai] bootstrapping dependencies ...")
|
||||||
|
|
||||||
start = time.time()
|
start = time.time()
|
||||||
@ -53,8 +55,11 @@ def load(config, agent, epoch, from_disk=True):
|
|||||||
for key, value in config['params'].items():
|
for key, value in config['params'].items():
|
||||||
logging.info(" %s: %s" % (key, value))
|
logging.info(" %s: %s" % (key, value))
|
||||||
|
|
||||||
|
logging.debug("[ai] total loading time is %.2fs" % (time.time() - begin))
|
||||||
|
|
||||||
return a2c
|
return a2c
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
logging.exception("error while starting AI")
|
logging.exception("error while starting AI")
|
||||||
|
|
||||||
|
logging.warning("[ai] AI not loaded!")
|
||||||
return False
|
return False
|
||||||
|
Loading…
x
Reference in New Issue
Block a user