Closed BigRiceBall-zz closed 4 years ago
I can confirm this. When trying to use PyTorch model with DQN, currently the following error is raised. For example, when trying to use VisionNetwork from torch we get:
File "/home/shitals/GitHubSrc/ray/python/ray/rllib/agents/dqn/dqn_policy.py", line 215, in build_q_model
parameter_noise=config["parameter_noise"])
File "/home/shitals/GitHubSrc/ray/python/ray/rllib/models/catalog.py", line 263, in get_model_v2
model_interface)
ValueError: ('The given model must subclass', <class 'ray.rllib.agents.dqn.distributional_q_model.DistributionalQModel'>)
It seems TF is hardcoded in dql_policy.py.
Hi, I'm a bot from the Ray team :)
To help human contributors to focus on more relevant issues, I will automatically add the stale label to issues that have had no activity for more than 4 months.
If there is no further activity in the 14 days, the issue will be closed!
You can always ask for help on our discussion forum or Ray's public slack channel.
Hi again! The issue will be closed because there has been no more activity in the 14 days since the last message.
Please feel free to reopen or open a new issue if you'd still like it to be addressed.
Again, you can always ask for help on our discussion forum or Ray's public slack channel.
Thanks again for opening the issue!
Problem Description
I try to implement the DQN with pytorch. The
get_model_v2
in ModelCatalog would call model interface so it can create Q head if the framework is tensorflow. But the model interface is never called if the framework is pytorch.Source code
Tensorflow:
Pytorch: