Closed ghost closed 3 years ago
Thanks for posting this.
Converting list spaces to tuples is an issue of upstream hyperopt (though I guess semantically it makes sense, as a tuple is just an immutable sequence).
However, #14308 addresses this on our end by casting the config object to a list before doing list-related operations.
Thanks for raising this issue!
Thanks for quick reply!
What is the problem?
I am working with DQN of rllib and HyperOptSearch of tune. I found that there is something wrong with creating fcnet.
When I run the code (at the bottom), it throws an error. Here is a brief of error message:
After digging a bit into the code I find that the value of hyperparameter
fcnet_hiddens
become a tuple object after some operations ofHyperOptSearch
, though it was a list object. So,config["model"]["fcnet_hiddens"]
(tuple object) cannot concatenate to[256]
(list object). If I don't useHyperOptSearch
(i.e., normal FIFO scheduler instead), there will be nothing wrong.To deal with this issue, I tried to set
hiddens
(a hyperparameter of Dueling DQN) to[]
instead of[256]
(which is DQN default setting). The issue above was then solved but another similar issue occurred:This time, it is because
post_fcnet_hiddens
is a empty list object by default andfcnet_hiddens
is still a tuple object. To deal with it, I tried to setpost_fcnet_hiddens
to an empty tuple .Up to now, the two issues are solved via some redundant settings. But I think it would be better to make some changes in the source code to avoid these issues.
BTW, these issues occur no matter how I set
dueling
(True
orFalse
). But I think if user setdueling
toFalse
, the hyperparameterhiddens
won't influence anything, isn't right?Ray version and other system information (Python version, TensorFlow version, OS): Python version: 3.7.9 Pytorch version: 1.7.1 TensorFlow version: 2.4.1 OS: Ubuntu 20.04.2 LTS
Reproduction (REQUIRED)
Please provide a short code snippet (less than 50 lines if possible) that can be copy-pasted to reproduce the issue. The snippet should have no external library dependencies (i.e., use fake or mock data / environments):
If the code snippet cannot be run by itself, the issue will be closed with "needs-repro-script".