Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NameError: name 'Toy_Env' is not defined #8

Open
wulin0108 opened this issue Oct 16, 2023 · 2 comments
Open

NameError: name 'Toy_Env' is not defined #8

wulin0108 opened this issue Oct 16, 2023 · 2 comments

Comments

@wulin0108
Copy link

刘老师您好,我是一名多智能体强化学习的初学者,在尝试运行您发布的xuance框架时,选择的是tensorflow+gpu,遇到了如下报错,
Traceback (most recent call last):
File "C:\Users\50\Desktop\MADRLTEST\main.py", line 5, in
is_test=False)
File "F:\anaconda\envs\xpolicy\lib\site-packages\xuanpolicy\common\common_tools.py", line 121, in get_runner
from xuanpolicy.tensorflow.runners import REGISTRY as run_REGISTRY
File "F:\anaconda\envs\xpolicy\lib\site-packages\xuanpolicy\tensorflow\runners_init_.py", line 1, in
from .runner_drl import Runner_DRL as DRL_runner
File "F:\anaconda\envs\xpolicy\lib\site-packages\xuanpolicy\tensorflow\runners\runner_drl.py", line 2, in
from xuanpolicy.tensorflow.agents import get_total_iters
File "F:\anaconda\envs\xpolicy\lib\site-packages\xuanpolicy\tensorflow\agents_init_.py", line 36, in
from .policy_gradient.pdqn_agent import PDQN_Agent
File "F:\anaconda\envs\xpolicy\lib\site-packages\xuanpolicy\tensorflow\agents\policy_gradient\pdqn_agent.py", line 6, in
class PDQN_Agent(Agent):
File "F:\anaconda\envs\xpolicy\lib\site-packages\xuanpolicy\tensorflow\agents\policy_gradient\pdqn_agent.py", line 12, in PDQN_Agent
device: str = 'cpu'):
NameError: name 'Toy_Env' is not defined
报错称这个toy_env没有得到定义,我不太清楚代码本身的含义,看到报错中的device: str = 'cpu'也尝试修改成了gpu,并没有起作用,请问我应该怎么修改代码?或者是否是我在环境安装的某个节点出现了问题?
恳请您百忙之中抽空查看我的问题,万分感谢!

@wenzhangliu
Copy link
Collaborator

您好,由于玄策近期正在进行版本更新,我们首先在PyTorch版玄策中进行功能更新,因此可能会遇到对TensorFlow或MindSpore不兼容的情况。我们建议您暂时先使用最新版的PyTorch版玄策来学习MARL,在接下来的时间里我们会尽快完成对TensorFlow和MindSpore的兼容。给您造成不变,非常抱歉。如有其它问题,欢迎随时联系!

@wulin0108
Copy link
Author

您好,由于玄策近期正在进行版本更新,我们首先在PyTorch版玄策中进行功能更新,因此可能会遇到对TensorFlow或MindSpore不兼容的情况。我们建议您暂时先使用最新版的PyTorch版玄策来学习MARL,在接下来的时间里我们会尽快完成对TensorFlow和MindSpore的兼容。给您造成不变,非常抱歉。如有其它问题,欢迎随时联系!

好的,感谢您的回复!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants