未验证 提交 39ee8eb3 编写于 作者: C ceci3 提交者: GitHub

Fix warning (#345)

* fix

* refine warning
上级 229f3699
......@@ -19,9 +19,7 @@ try:
import parl
from .ddpg import *
except ImportError as e:
_logger.warn(
"If you want to use DDPG in RLNAS, please pip install parl first. Now states: {}".
format(e))
pass
from .lstm import *
from .utils import *
......@@ -76,6 +76,15 @@ class RLNAS(object):
self.save_controller = save_controller
self.load_controller = load_controller
if key.upper() in ['DDPG']:
try:
import parl
except ImportError as e:
_logger.error(
"If you want to use DDPG in RLNAS, please pip install parl first. Now states: {}".
format(e))
os._exit(1)
cls = RLCONTROLLER.get(key.upper())
server_ip, server_port = server_addr
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册